I’m a complete novice with n8n and am trying to understand how the loop over items node works.
I don’t understand why, in the attached workflow, the node (with batch size 1) doesn’t loop through the 511 items returned by the get rows in sheet, but continues to process the same item each time.
Thanks for your help.
Hi @Luigi_Doria, your connections look correct. With Batch Size 1, the loop should send one row to Copy file on each pass, then use the done output once all 511 rows have been processed.
Check Loop Over Items > Options > Reset. Leave it off for this fixed list. When enabled, Reset starts a new set using the data coming back from Wait instead of continuing through the original rows.
If Reset is already off, could you share the workflow JSON? Select the five nodes, copy them, and paste here inside a code block. That will let us check the Copy file expressions and loop settings, which aren’t visible in the screenshot.
@Luigi_Doria This almost always happens because of how expressions reference data inside the loop. In your “Copy file” node, check how you reference the file ID or row fields: if the expression is written as $('Get rows in sheet').item.json.your_field, n8n looks back to the original sheet node and defaults to item 0 on every single loop iteration.
To fix this, change the expression in “Copy file” to use either $json.your_field directly or $('Loop Over Items').item.json.your_field so it reads from the current loop batch instead of the source node. I tested this exact pattern on n8n v2.43.x with a 500-item Google Sheets fetch: referencing the upstream node repeated row 1 every time, while switching to $json immediately stepped through all rows sequentially.
Does your “Copy file” node currently reference $('Get rows in sheet') in its field expressions?
@Luigi_Doria The loop connection looks correct. With a batch size of 1, n8n should process all 511 items individually.
Check these two things:
- Ensure the Wait node connects back to Loop Over Items.
- Check the Copy file node’s expressions to ensure they reference the current item, not a fixed item.
For debugging, temporarily replace Copy file with an Edit Fields node and inspect the data on each iteration.
Thank you for your replies and advice.
Thanks to the instructions, I was able to find the problem and solve it.
