Loop Node
Iterate over an array variable, optionally transforming each item with a Jexl expression.
Loop Node
The loop node iterates over an array from the workflow state, applies an optional Jexl transform to each item, and emits the collected results.
Configuration Fields
| Field | Type | Default | Description |
|---|---|---|---|
arrayPath | string | — | Dot-path (or {{}} expression) pointing to the array in variables |
itemTransform | string | — | Optional Jexl expression evaluated per item. item is bound to the current element. |
maxIterations | number | 100 | Maximum items to process (extra items are silently dropped) |
How arrayPath Resolves
The path is resolved against state.variables:
"lastOutput"→variables.lastOutput"myList"→variables.myList"lastOutput.items"→variables.lastOutput.items"{{lastOutput.results}}"→ same as above, with{{}}stripped
If the resolved value is not an array, it is wrapped as a single-item array [value].
Output
The results array is also stored as loopResults in the workflow state and emitted as lastOutput.
Item Transform
itemTransform is a Jexl expression evaluated for each element with item in scope:
The transform runs in a vm sandbox with a 1-second timeout per item. If the expression throws, the original item is returned unchanged.
Example Config — Extract names from an array
Input: { "users": [{ "name": "Alice", "age": 30 }, { "name": "Bob", "age": 25 }] }
Output: { "results": ["Alice", "Bob"], "total": 2, "items": [...] }