n8n batching: the loop and done outputs of Loop Over Items
Decide whether an explicit loop is needed, set Batch Size, and check batches, completion output and termination.
Check whether the node already processes multiple items · Check Batch Size with a small fixture · Avoid unintended resets of loop input
At a glance
The goal is to pass AI input records through a sub-workflow in batches and separate batch processing from overall completion. Steps follow the official Loop Over Items page. Synthetic ids were used to inspect batch partitioning locally; no workflow or external API was run, and no rate-limit effect is certified.
Input, configuration and output checks
Prepare input
Define identifiers, fields and the intended output before configuration.
Inspect settings
Inspect the documented operation and its relevant options.
Verify and stop
Inspect identifiers and results before downstream processing; stop when the contract is unclear.
Check whether the node already processes multiple items
The docs note that n8n nodes normally process an input item list, with some exceptions. An array alone does not justify a loop; first check whether the downstream node already processes each item. Loop Over Items saves the original input, returns a predefined amount through loop each iteration, then combines processed data through done on completion. These are separate stages; avoid wiring both into the same downstream write path.
Check Batch Size with a small fixture
The exercise uses a, b, c, d, e with Batch Size 2. Local partitioning yields [a,b], [c,d], [e]; this is the expected input partition, not n8n execution output. Inspect Batch Size in the editor, then compare received ids per iteration and the final id set. Batch size alone does not establish delays between requests or confirm the concurrency and throughput allowed by a model service.
Avoid unintended resets of loop input
With Reset enabled, the current input is initialized as a new dataset each iteration rather than continuing the previous items. The docs use it with If for pagination when the page count is unknown and require a valid termination condition to avoid an infinite loop. The exercise has a known finite input and keeps Reset off. For pagination, use the actual API termination signal and inspect page changes; the batch fixture is not a pagination implementation.
Verify iteration and completion results
Check for missing or repeated ids per iteration and confirm that done data fits the downstream contract. If processing transforms data, retain an identifier that maps it to input. Only array partitioning was executed locally; n8n wiring, the loop back edge, error recovery and parallel output order were not checked. Stop the workflow if inputs keep reappearing, done never fires or batches repeat, then inspect Reset, the back edge and termination before rechecking a small sample.
Article sources
Original editorial content; official descriptions and checking suggestions are distinguished.