🔁 Loop
Process a list in batches — one after another, or several at once with Run in parallel.
Overview
The Loop node takes a list from the node before it and runs the nodes on its loop output once per batch. When every batch is done, the workflow continues from the done output.
The list is the incoming data itself, or the list inside it: items, data, results or rows (or the only list in the object, such as a file search's files).
Configuration
- Batch Size — items per batch. With 1, each batch is a single item.
- Run in parallel — process batches at the same time instead of one after another (see below).
- Reset on Completion — clear the loop's state after the last batch.
Inside the loop
{{$item}}— the current item (or batch). It stays the same through the whole loop body, unlike{{$json}}, which each node replaces with its own output.{{$itemIndex}},{{$batchIndex}},{{$totalBatches}},{{$batchSize}}- Connect the last node of the body back to the Loop to move on to the next batch.
Run in parallel
Turn on Run batches in parallel and set how many run at once (1–20, default 5). Use it when each batch waits on something slow — an AI model, an API — and the batches don't depend on each other. Enriching 200 leads with an AI call each typically finishes several times faster.
- Each batch gets its own copy of the workflow data, so batches can't see each other's results while they run.
- done runs once, with
{{$json.results}}— each batch's last output, in the same order as the input — plustotalItems,totalBatchesandcompleted. - If a batch fails, no new batches start; the ones already running finish, then the workflow fails with the first failing batch's error.
- Human Approval, Slack "send and wait", Respond to Webhook, and another Loop-in-parallel or Parallel node can't be used inside a parallel loop. The run is refused before any batch starts, and the workflow checker flags it.
- Test Node can't run a parallel loop on its own — use Test Workflow.
- Without the toggle, the Loop works exactly as before: one batch at a time, and later batches can read values set by earlier ones.