
Why is my n8n Loop Over Items node not working?
n8n's Loop Over Items node only moves to the next batch when items come back into its input. If any pass through the loop body returns zero items, the loop ends right there, the Done output never runs, and the execution still says Succeeded. That's the cause behind almost every "loop stops after the first item" or "Done branch never fires" report we see.
The usual triggers are an IF or Filter node that drops a whole batch, a lookup that finds nothing, a loop body that isn't wired back, and nested loops without Reset. We rebuilt each one in n8n 2.45.7 (the current stable release) and 3.0.1 (the 3.x pre-release) and recorded what the loop actually did. One fix that forum threads still recommend stops working in 3.0.
How does Loop Over Items actually work?
Loop Over Items (the node formerly called Split in Batches) has two outputs. loop sends out the next batch. done fires once, after the last batch comes back, with every item the loop body returned.
Our baseline: a Code node creates 10 items, Loop Over Items has a batch size of 3, and a Code node in the body marks each item as processed and connects back to the loop. The Loop Over Items node ran 5 times: four passes handing out 3, 3, 3 and 1 items, then one final pass that sent all 10 processed items to Done.
Two details matter for everything below:
- The loop waits for items to arrive. It doesn't count passes or check what you meant to do. No items back means no next pass.
- Done holds what came back, not what went in. If your body changes, filters or adds items, Done reflects that.
A quick health check for any loop: it should run once per batch plus once more for Done. Ten items at batch size 3 should show 5 runs. If you see 2, a batch never came back.
1. The loop body isn't connected back
This one sounds too simple, but it's common in workflows that were edited after they were built. Someone inserts a node at the end of the loop body, and the connection back to Loop Over Items ends up on the old node or gets dropped.
In our test, the same 10-item workflow with no connection back processed the first batch of 3 and stopped. The execution status was "success". There was no error, no warning and no Done output. Seven items never ran.
Fix: follow the wire from the last node of the body back to the Loop Over Items input. If the body ends in more than one node, each end needs its own connection back.
2. An IF or Filter node drops an entire batch
This is the cause behind most "loop stops early" threads, and it only bites when every item in one batch goes the way that isn't connected back.
We put an IF node in the loop body with the true branch going on to processing and back to the loop, and the false branch left unconnected. Items 4, 5 and 6 were false and everything else was true. With a batch size of 3, the second batch (4, 5, 6) was entirely false. Result:
- Loop Over Items ran 2 times instead of 5
- 6 of 10 items were handed out, 3 were processed
- Items 7 to 10 never ran and Done never fired
- Status: success
This explains the "stops after the first record" reports. With a batch size of 1, every batch is a single item, so the first false item ends the loop.
Fix: connect the false branch back to Loop Over Items too. With both branches wired back, the loop ran all 5 passes and Done received all 10 items. The catch is that Done now also contains the items you filtered out. Set a field in each branch (for example kept: true or false) and filter on it after Done. The same goes for Switch nodes with several outputs and for any node set to "Continue (using error output)": an error output that isn't wired back ends the loop the same way.
3. A lookup inside the loop returns nothing
Same mechanism, different node. A Google Sheets search, a CRM lookup or an HTTP Request that returns an empty list outputs zero items, and the loop stops.
We simulated it with a Code node in the body that returned nothing for items 4, 5 and 6. The loop stopped after 2 passes on both versions we tested.
Fix: turn on Always Output Data on that node (Settings tab). A single-output node then emits one empty item when it finds nothing, so the loop continues. On both 2.45.7 and 3.0.1 our loop ran all 5 passes. But look at what reached Done: 8 items, not 10. Items 4, 5 and 6 were gone and an empty {} item was in their place. Filter out the empty items after Done, for example with a Filter node that keeps items where your ID field exists.
4. Always Output Data no longer rescues IF and Filter nodes in n8n 3.0
Plenty of forum answers say "turn on Always Output Data on the IF node". On n8n 2.45.7 that works, but not cleanly. The IF node put an empty item on its true branch when a batch was all false. The loop finished, and Done got the same 8-item result as above, empty item included.
On n8n 3.0.1 the identical workflow stopped after 2 passes again. We got the same result with a Filter node. The reason is a deliberate breaking change in n8n pull request #37055: on nodes with more than one output, Always Output Data now adds the empty item only when every output is empty. Our IF node had 3 items on its false branch, so it added nothing, and the loop ended. We confirmed the change in the engine source of both images. 2.45.7 checks only the first output and 3.0.1 checks all of them.
What this means in practice:
- If you upgrade to 3.0, any loop that relies on Always Output Data on an IF, Switch or Filter node will start ending early without an error. The v3 Migration Report flags these nodes with a rule titled "'Always Output Data' behavior fix on nodes with multiple outputs". It doesn't mention loops, so check the flagged nodes yourself. Our n8n 3.0 upgrade checklist covers the rest of the report.
- Don't build new loops on that trick. Wiring both branches back (cause 2) works the same on both versions.
There's also an open pull request (#42365) that would let the loop carry on when a pass returns nothing, but only on n8n's new execution engine. It wasn't merged when we tested, so don't design around it yet.
5. A nested loop doesn't reset
Loop inside a loop: an outer Loop Over Items with a batch size of 1 walks through 3 records, a node splits each record into 4 sub-items, and an inner Loop Over Items (batch size 2) processes them.
Without Reset on the inner loop, the inner body ran only 2 times in total, which covered just the first record's 4 sub-items. For the second and third records, the inner loop decided it was already finished and sent its accumulated items straight to Done: 8 items for the second record and 12 for the third. None of the new sub-items went through the body. On the surface it looked fine, with Done firing three times and plenty of items in it. The work just never happened.
Fix: set Reset on the inner loop to an expression that is true only when fresh data arrives from outside the inner loop:
{{ $prevNode.name === 'Split' }}
Replace Split with the name of the node that feeds the inner loop. With that expression, the inner body ran 6 times (2 passes for each of the 3 records), and each inner Done received exactly its own record's 4 items. The n8n Loop Over Items docs also warn that Reset needs a valid termination condition, otherwise the execution gets stuck in an infinite loop. A fixed Reset of "on" combined with a loop-back gives you exactly that, which is why we use the expression.
If the nesting gets hard to follow, move the inner loop into a sub-workflow called with Execute Workflow. Each call starts fresh, so nothing needs resetting.
6. You don't need a loop at all
This isn't a bug, but it's behind a lot of confusing loops. Most n8n nodes already run once per incoming item. Send 50 items into an HTTP Request node and it makes 50 requests. Adding Loop Over Items around it adds wiring you can get wrong and doesn't change the result.
Keep the loop for the cases where you need it:
- Rate limits. Batches of 10 with a Wait node between them. We cover batching against 429s in our n8n rate limit guide.
- Nodes that only read the first item. The n8n docs list these as node exceptions. An RSS Feed Read node is the docs' example.
- Steps that must finish for one record before the next starts. Writing to a system that can't handle parallel updates to the same record is one example.
How do you catch a loop that ends early?
This is the part that hurts in production. An early-ending loop doesn't fail the execution, so your error workflow never fires. Every broken case above showed "success". If you only alert on failed executions, which is the default most teams set up, this class of bug is invisible until someone notices missing records.
What we add to client workflows that loop over anything important:
- A completion marker after Done. The last node writes a row (a Data Table, a sheet or a database insert) with the run time and item count. A separate scheduled check alerts if the marker is missing or the count is low. We describe the full alerting setup in n8n error handling and monitoring.
- A count check on Done. An IF node after Done compares
{{ $input.all().length }}with the item count from before the loop and routes a mismatch to Stop and Error. That turns a silent short loop into a real failure your error workflow will catch. It only works when Done fires, which is why it goes together with the marker. - Item tags instead of dropped items. Set a status field in each branch rather than letting items disappear. That keeps the loop alive and gives you an audit trail.
If you're running AI agents inside loops, there's a separate failure mode worth knowing: an agent can loop on its own tool calls until it hits a limit. That's a different problem, covered in n8n AI agent max iterations.
How we tested this
We ran n8nio/n8n:2.45.7 (the stable tag on November 2, 2026) and n8nio/n8n:3.0.1 in Docker with SQLite. We imported 10 workflows through the n8n CLI and ran each one with n8n execute --rawOutput, then read the per-node run counts and item counts from the execution data. Every workflow started from a Manual Trigger and a Code node that generated the test items. Loop Over Items was node version 3, IF version 2.2 and Filter version 2.2. Results were identical on both versions except for the Always Output Data behavior on multi-output nodes. We confirmed that difference in the ensureAlwaysOutputData function of each image's execution engine and matched it to n8n pull request #37055. These were synthetic workflows with no client data.
Get a Free Automation Audit
Loops that quietly stop halfway are among the most common problems we find when we review n8n instances. They're also among the most expensive, because nothing alerts on them. If your workflows loop over leads, orders or records, get a Free Automation Audit. We'll email you an initial audit report within 24 hours that flags loops, empty-branch risks and the nodes a 3.0 upgrade will change. You can also see how we build and maintain n8n workflow automation for teams that can't afford missing records.
