What is the Loop Action?
The Loop Action in Workflow Designer allows you to execute a set of actions repeatedly within a single workflow run. Instead of handling one item at a time, you can loop through lists, variables, or repeat actions for a defined number of times. This makes it possible to automate batch processing, iterative approvals, or repeated notifications.
When to use the Loop Action?
Loop Actions are useful whenever you need to handle multiple items or repeat the same task systematically. Common use cases include:
Batch processing records: Iterate through query results and apply actions to each record (e.g., update multiple records at once).
Bulk notifications: Send emails or alerts to multiple recipients in one workflow run.
Approval handling: Trigger approval actions for each record in a pending list.
Repeated checks: Run a validation a fixed number of times within one workflow run. Add an early exit if a result should end the checks.
By using a Loop, you can avoid building repetitive steps manually and ensure your workflow remains concise and maintainable.
Configure the Loop Action
When configuring a Loop Action, you can define:
Action name: A custom label for the loop step.
Description: Optional notes to describe its purpose.
Loop type: Choose how the loop should iterate:
Loop through list items – iterate through each item in a list variable.
Example: Process each record returned by a Query Data action.
Loop through multiple values – iterate through a set of variables or values.
Example: Send a message to several specified users.
Loop for fixed times – repeat actions a defined number of times.
Enter the number of times to run the loop body. This sets the planned count. If a step needs to wait, configure and test the timing separately. Delay Action
Conditions:
Run only when: Run the loop body for this iteration if the condition is true. If it is false, skip this iteration and continue.
Break when (exit loop): The workflow checks this condition before each iteration. If it is true, the workflow exits the loop and continues to the next step.
Inside a Loop, you can access Current Loop context variables, which provide useful information to control workflow behavior:
Current iteration – the index of the current run (starts from 1).
Planned total – the total number of iterations expected.
Actual executed: The number of iterations the workflow reports as executed.
Current object – the data object of the current loop item (only valid when using Loop through list items or Loop through multiple values).
These values can be referenced in expressions or conditions inside the Loop body, or passed to subsequent actions such as Set Variable or Send Email.
In the Expression Editor, select Current Loop and choose the field you need. Understand the Expression Editor
Using Loop Break inside a Loop
Besides defining a Break when condition, you can insert a Loop Break action directly within the loop body.
The Loop Break action will immediately stop the loop, even if there are remaining iterations.
This is useful when you only need to process until a certain condition is met, and further iterations are unnecessary.
Example use case:
You query a list of tasks and loop through them. Once the first task marked “High Priority” is found, you can insert a Loop Break action to stop the loop, avoiding unnecessary iterations over the remaining tasks.
Best Practices
Use conditions wisely: Apply filters to avoid unnecessary iterations and reduce execution time.
Configure an early exit when needed: Use Break when to check the condition before each iteration. Use Loop Break when a step inside the loop produces the result that should end it.
Check what ran before retrying: Open the workflow instance and review Workflow logs. Check any writes or notifications that may already have happened before running the workflow again. View and manage workflow instances
Keep performance in mind: For large datasets, consider whether processing in batches or applying pre-filters is more efficient.



