Boucle
Iterates over an array (forEach, map, reduce) or repeats a number of times (times, while, doWhile). Each iteration can accumulate results. Six modes available: forEach, map, reduce, while, doWhile, times.
Common parameters
| Parameter | Type | Required | Variable | Description |
|---|---|---|---|---|
loopType | choice (forEach, times) | Yes | No | Loop type: iterate over an array or repeat N times. |
indexVariable | text | No | No | Variable name for the current iteration index (0, 1, 2...). (Default: "index") |
parallelExecution | boolean | No | No | Run multiple iterations in parallel (faster for independent API calls). (Default: false) |
concurrency | number | No | No | Maximum number of iterations running concurrently (if parallel execution is enabled). (Default: 5, min 2, max 10) |
errorPolicy | choice (stop, continue) | No | No | Error behavior: stop immediately or continue and collect errors. (Default: "stop") |
outputVariable | text | No | No | Output variable name to store results from all iterations. |
Parameters by loop type
forEach — For Each
Iterate over each element of an array. Blocks connected to the "body" output execute for each element.
| Parameter | Type | Required | Variable | Description |
|---|---|---|---|---|
arraySource | dynamic value | Yes | Yes | Source array to iterate over (variable from a previous block or expression). |
itemVariable | text | No | No | Variable name for the current iteration element. (Default: "item") |
Parameters marked Variable = Yes accept the
{{blockName.field}}syntax.
times — Repeat N Times
Repeat connected blocks a fixed number of times.
| Parameter | Type | Required | Variable | Description |
|---|---|---|---|---|
iterations | dynamic value | Yes | Yes | Number of iterations to perform. |
Parameters marked Variable = Yes accept the
{{blockName.field}}syntax.
Output
Output variable : loopResults
{
"results": [],
"iterations": 0,
"exitReason": "..."
}
Example
Iterate over a list of items with forEach.
Input :
{"items": ["alpha", "beta", "gamma"]}
Output :
{"results": ["alpha", "beta", "gamma"], "iterations": 3, "exitReason": "complete"}
exitReason indicates how the loop ended: "complete" (all items processed), "break" (early stop), "maxIterations" (limit reached), or "error". In reduce mode, an additional accumulator field contains the result.