Loop
Type ID: core.loop · Kind: Action · Ports: 1 in, 2 out (body, main)
Runs the connected body once per item in items. Output index 0 (body) fires once per iteration, carrying the current item as $item; output index 1 (main) fires exactly once, after the loop ends, carrying the aggregated results array.
The body must end in a single Loop Output step — that's what gets collected into the results array. See Loops for how to build one with workflow.loop().
Credentials
None
Properties
| Property | Key | Type | Required | Default | Possible values | Applies when |
|---|---|---|---|---|---|---|
| Items | items | array | Yes | - | The list to iterate over, one iteration per item | Always |
| Parallel | parallel | boolean | Yes | - | true - every iteration runs concurrently; false - one at a time | Always |
Notes
parallelhas no default — every loop must state its execution mode explicitly.- The maximum number of items (and therefore iterations) is 500, in both sequential and parallel mode. A loop whose
itemsresolves to more than that fails. - In sequential mode (
parallel: false), the body may use Loop Break to stop the whole loop early, or Loop Continue to skip to the next item. Neither is allowed in parallel mode, since every iteration is already spawned by the time any of them would run. - Each iteration is isolated: it sees
$item(the current item) plus everything that ran before the loop, but not the state of any other iteration. $('Loop Step Name').json.resultson themainoutput is the array of every Loop Output entry. In sequential mode it's in completion order (which matches item order); in parallel mode it's index-ordered by original item position, not completion order. An iteration that exits via Break or Continue before reaching Loop Output contributes no entry.- A loop body cannot contain a trigger step.