Split, Merge, Foreach, and Loop
Choose the correct node
| Need | Node |
|---|---|
| Run two or more paths in parallel | Split Branches |
| Rejoin parallel paths | Merge Branches |
| Create one task per item in a list | Foreach — Enterprise |
| Return to an earlier step for retry or revision | Loop |
Foreach and Loop are different nodes. Foreach consumes a list. Loop creates an intentional backward route and limits retries when configured.
Split Branches
- Drag Split Branches from Logic after the step where parallel work begins.
- Connect the preceding node to it.
- Draw one outgoing connection for each parallel path.
- Build each path independently.
- End each path or connect its final node to the same Merge Branches node.
Split Branches has no properties form. Its outgoing connections define the parallel paths.
Merge Branches
Connect every participating branch into Merge Branches, open its properties, then select:
| Option | Behavior |
|---|---|
| Wait for All Branches | Continue only when every incoming branch completes. |
| Wait for Any Branch | Continue when the first branch completes and expire the other active branches. |
| Wait for a specific number | Continue after the required count completes; the maximum is the number of incoming branches. |
Use All when every result is required, Any for a race, and Count for a quorum. Save the node, then connect its output to the next step.
Foreach
Foreach appears in the Basic palette for Enterprise accounts. It iterates over a list and creates a task for each item.
Configure:
| Field | Meaning |
|---|---|
| Items Variable | Required variable holding the list, such as db_rows. |
| Item Alias | Name used for the current item; default is item. |
| Completion Rule — All | Proceed when every generated task is actioned. |
| Completion Rule — Any | Proceed after the first generated task is actioned. |
The current item is available through the alias. For example, with alias employee, downstream task fields can use values such as {{employee.email}} when that property exists.
Foreach also exposes result values for the selected items variable:
{items_variable}_results.items_processed{items_variable}_results.tasks_completed{items_variable}_results.completion_rule
Use the Variable Panel to copy the exact generated names for the current node.
Loop
Use Loop to connect back to an earlier node. Open its properties and provide the required Node Label plus an optional description.
Choose the attempt behavior:
| Setting | Behavior |
|---|---|
| Limited | Retry up to Max Attempts, then use Limit reached. |
| Unlimited | Keep taking Retry until an earlier decision routes elsewhere. |
| Max Attempts | Required for Limited; accepts 1 through 100 and defaults to 3. |
After saving, connect both outcomes where applicable:
- Retry returns to the earlier step.
- Limit reached goes to escalation, failure handling, or End.
An Unlimited loop needs a real exit condition earlier in the cycle. Without one, the instance can continue indefinitely.
Validation checklist
- Every split path either reaches the intended merge or ends independently.
- Merge Count does not exceed its incoming connections.
- Foreach receives a list before it runs and its alias matches downstream variables.
- Loop Limited has both Retry and Limit reached routes.
- Loop Unlimited has an earlier condition or human outcome that can exit.
- Save and test with a small list or low retry count before production use.
