This document’s purpose is to accelerate your development process by providing a collection of reusable patterns for common tasks.
Instead of showcasing entire** end-to-end** use cases, this guide focuses on individual, common “steps” you’ll encounter while building. For each pattern, we recommend the most efficient method, whether it’s an LLM action, a Moveworks Data Mapper expression, a DSL query, or a Python Script.
Let’s dive into the patterns.
Problem: You want to perform a series of actions repetitively for a list elements. For example, sending a notification to a group of users.
Problem: You have a list that contains duplicate values, and you need a list with only unique elements.
In this case we will deduplicating a list of objects that have the same email key
Problem: You need to provide a list of elements sorted alphabetically
Problem: You want to sort a list of based on the timestamp
Problem: You need to paginate through an API that returns results page-by-page using a pagination token (e.g., nextPageToken), but compound actions don’t support while loops.
Solution: Use a for loop with a fixed range (0 to MAX_PAGES), and on each iteration:
index - 1condition to skip iterations once there are no more pagesnil for the first page) into the HTTP actionDo not use parallel expressions with this pattern. Because each iteration reads from the previous iteration’s output in the data tree, the loop must execute sequentially.
Why not a while loop? Open-ended while loops are not supported in compound actions for safety reasons — a misconfigured loop could run indefinitely. The for-loop-with-condition pattern gives you the same pagination behavior with a guaranteed upper bound on iterations.
First, create a helper action (e.g., a Script Action) that generates a range list for the for loop to iterate over:
After the loop completes, you can use a Script Action to flatten all pages into a single list:
This same pattern works for polling use cases (e.g., waiting for an Okta push verification):
Problem: You want to a multiline string’s structure to be maintained
Solution: Use Render() and the | character with your template value indented