Split, Merge, Foreach, and Loop

Flow BuilderWorkflow designers3 min read
What you’ll learnHow current parallel paths, list iteration, and retry loops differ and how to configure each one.

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

  1. Drag Split Branches from Logic after the step where parallel work begins.
  2. Connect the preceding node to it.
  3. Draw one outgoing connection for each parallel path.
  4. Build each path independently.
  5. 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

  1. Every split path either reaches the intended merge or ends independently.
  2. Merge Count does not exceed its incoming connections.
  3. Foreach receives a list before it runs and its alias matches downstream variables.
  4. Loop Limited has both Retry and Limit reached routes.
  5. Loop Unlimited has an earlier condition or human outcome that can exit.
  6. Save and test with a small list or low retry count before production use.
Still stuck? See Get Help with Support or reach your workspace administrator.