Steps
Check that you need a loop at all
Most n8n nodes already run once per item. In our test a plain Set node fed 5 items processed all 5 in one go, no loop needed. Use Loop Over Items only when you really need one item (or one small batch) at a time: to slow down calls for a rate limit, to send things one by one, or for a node that only reads the first item.
Wire the two outputs the right way round
Loop Over Items has two outputs: loop goes into the steps you want to repeat, and done goes to whatever comes after. The last node of the repeated steps must connect back into the Loop Over Items input. When we left that link out, the steps ran once, on item 1 only, and done never fired, with no error. When we plugged the steps into done by mistake, nothing ran at all: done is empty until the loop has finished. (In the workflow JSON, output 0 is done and output 1 is loop.)
Stop the loop from ending silently
If any node inside the loop outputs zero items, the loop simply ends there. In our test a node that filtered out item 3 stopped the run after round 3 of 5: no error, and the node after done never ran. Turn on Settings > Always Output Data on that node: then all 5 rounds ran, and an empty item
{}took the place of item 3 (filter it out after done). An error has the same effect but louder: a node that threw on item 3 stopped the whole workflow; with On Error: Continue all 5 rounds ran and item 3 came out as{"error": "boom on 3"}.Know what the done output contains
Done returns whatever the last step fed back into the loop, from every round together, not your original items. With a Set node inside the loop, done had all 5 items with the new field. With batch size 2 and a Code node that returned one summary per batch, done had 3 items (1,2 / 3,4 / 5), not 5. Inside the loop,
$runIndexcounts the rounds from 0, and$('Loop Over Items').context['noItemsLeft']istrueonly on the last round.Use Reset for a loop inside a loop
This is the nested-loop bug. Our outer loop ran over A and B, and for each one an inner loop went over 3 sub-items. Without Reset, the inner loop handled A's 3 items, then for B it jumped straight to done: B's items were never processed, A's came out twice, and the workflow finished with 9 items and no error. Setting Reset to plain on made the inner loop restart every round, and the run never finished (we stopped it after 10 minutes). What worked: Reset as an expression that is true only when new items arrive,
{{ $prevNode.name === 'Inner Make' }}(use the name of the node before your inner loop). Then all 6 sub-items ran once: A1, A2, A3, B1, B2, B3.
What we tested, and what happened
On 19 October 2026 we ran 15 small workflows on self-hosted n8n 2.43.7 with n8n execute, using Loop Over Items (Split in Batches) version 3, Set version 3.4 and Code version 2. The test data was 5 items, n = 1 to 5, with batch size 1 unless noted.
| Setup | What happened |
|---|---|
| Set node, no loop | All 5 items processed in one run. |
| Loop, Set inside, connected back | 5 rounds, done had 5 items with the new field. |
| Batch size 2, Code returns 1 summary per batch | 3 rounds (1,2 / 3,4 / 5), done had 3 items. |
| Last step not connected back to the loop | 1 round (item 1), done never ran, no error. |
| Steps wired to done instead of loop | Nothing ran, no error. |
| Step outputs 0 items on item 3 | Stopped after round 3, done never ran, no error. |
| Same with Always Output Data | 5 rounds, done had 5 items, {} for item 3. |
| Step throws an error on item 3 | Whole workflow stopped: boom on 3 [line 1]. |
| Same with On Error: Continue | 5 rounds, item 3 became {"error": "boom on 3 [line 1]"}. |
| Wait node, 1 second, inside the loop | 5 items took 5.0 seconds. |
noItemsLeft and currentRunIndex context, batch size 2 | false, false, true and 0, 1, 2. |
| Nested loops, no Reset | B never processed, A output twice, 9 items, no error. |
| Nested loops, Reset on | Never finished (stopped after 10 minutes). |
Nested loops, Reset = $prevNode.name === 'Inner Make' | Correct: A1 to B3, 6 items. |
Old Split In Batches v1 with an IF on noItemsLeft | Worked in 3 rounds, but the node at the end only got the last batch. |
Quick checklist
- Runs once? Connect the last step back into the Loop Over Items input.
- Nothing runs? Your steps hang off done; move them to loop.
- Stops halfway with no error? A step returned no items; turn on Always Output Data.
- Done output looks wrong? It holds what the last step fed back, not the original items.
- Loop inside a loop skips items or never ends? Set Reset to an expression, not to plain on.
- Only need a delay between calls? A Wait node inside the loop gives an even pace.
Good to know
- Running out of memory on big runs? Batching is the real fix: see n8n out of memory errors.
- Sending many items through an AI Agent with Simple Memory? In our test all items of one execution shared the first item’s session, see n8n AI Agent node not working.
- Rate limits: for APIs that answer 429, batching plus a Wait is often enough; the n8n 429 guide has tested numbers for Retry On Fail and a Retry-After loop.
- Empty branches behave the same way outside loops: see Merge and IF pitfalls, and Code node errors for a Code node that returns nothing.
- Referencing items inside a loop: if
$('Node').itemfails there, see n8n expression errors for the paired item fix.
What we didn't test
- The editor's canvas (we built the workflows as JSON and ran them from the command line), very large item counts, Wait times over a minute, and calling a sub-workflow per item instead of a loop.
Start from a working agent
FAQ
Why does n8n Loop Over Items only run once?
Usually the last node inside the loop is not connected back into the Loop Over Items input, so n8n never asks for the next batch. In our n8n 2.43.7 test that ran item 1 only and the done output never fired, with no error. The other cause is a node inside the loop that returned no items.
Why does my n8n loop stop without an error?
A node inside the loop output zero items, for example a filter or a Code node that dropped the item. The loop just ends there. Turn on Always Output Data on that node, then remove the empty items after the done output.
Why does the done output of Loop Over Items have different items?
Done returns what the last node inside the loop fed back, from all rounds together, not the items you started with. If that node returns one summary per batch, done has one item per batch.
How do I fix nested loops in n8n?
Set the inner Loop Over Items' Reset option to an expression that is true only when new items arrive, such as {{ $prevNode.name === 'Inner Make' }}. Without Reset the inner loop skipped the second outer item in our test; with Reset always on, it never finished.
Do I need Loop Over Items in n8n?
Usually not: most nodes already run once for every item. Use it when you must process items one at a time or in small batches, for example to add a Wait between API calls.
Related guides
- n8n HTTP Request pagination not working: endless loops, duplicates and fixes, 27 runs
- n8n Information Extractor not working? 27 tests, every error decoded
- n8n next node not running? Empty output and Always Output Data, 18 tests
- n8n Switch node not working: missing items, wrong output and type errors, 30 runs
- n8n Compression node not working: zip, unzip, file_0 and invalid zip data, 42 runs
New guides
- GitHub release notifications in Slack (any public repo, stable releases only)
- Send RSS feeds to Slack with a keyword filter (free, incoming webhook)
- Forward emails to a Slack channel (Gmail, Outlook, any IMAP), free with an incoming webhook
- n8n Google Sheets Trigger not working: not firing, activation errors and fixes