Iterate over an array and run a loop body once per item.
Type: LOGIC · Handler: BUILT_IN · Rendering: loop
Ports
| Port | Handle | When it runs |
|---|---|---|
| Loop body | body | Connected nodes run once per array item |
| Completed | output | Runs after all iterations finish |
| Break | break | Optional early-exit path (advanced) |
Connect the body branch from Loop body, not the default output. Connect downstream “done” logic from Completed.
Configuration
| Field | Required | Description |
|---|---|---|
array | Yes | Array to iterate (from upstream or template) |
itemVariable | No | Variable name for current item (default item) |
indexVariable | No | Variable name for index (default index) |
Inside the loop body, use {{vars.item}} and {{vars.index}} (or your custom names).
Outputs
| Field | Description |
|---|---|
total | Length of the array |
iterations | Count of iterations executed |
iterationResults | Per-iteration node results |
item / index | Last iteration values |
breakEarly | True if loop exited early |
Recommended chain
Do not use For Each for sorting/filtering lists. Use Transform Data first:
[data] → transform_data (filter | sort | chunk) → for_each (body) → …
Requires
None. Install Transform Data if you need to shape the list before looping.
Was this helpful?
historyLast updated: May 10, 2026
