Calling an app with hundreds of items at once can hit limits; batching keeps workflows reliable.
A loop means doing the same steps again for each thing in a list. In n8n you usually don't need to build one: most nodes already run once per item, as you learned.
You do need an explicit loop when:
- An app limits how many requests you may send per minute (a rate limit), so you must slow down.
- You want to handle items in groups (batches) with the same steps, one group at a time.
- A node only processes the first item, or only runs once. Some database operations, and Code or sub-workflow nodes in "run once for all items" mode, work this way.
The Loop Over Items node (formerly called Split in Batches) does this. Set a Batch Size: with 1, items are handled one at a time; with 50, fifty at a time. Connect the steps you want to repeat to its loop output, and connect the last of those steps back into the Loop Over Items node. When all items are processed, the done output continues the workflow. It stops by itself, so you don't need an If node to end it.
To respect rate limits, add a Wait node inside the loop, for example 2 seconds per batch.
For "keep going until a condition is true" loops (such as fetching pages from an API until there are no more), connect a later node back to an earlier one and use an If node to decide when to stop. The HTTP Request node also has built-in pagination for the common case.
Remember
- Most nodes already run per item; explicit loops are for batching and special cases
- Loop Over Items: steps on the loop output, connect back, continue from done
- Add a Wait node inside the loop to respect rate limits
Watch out for
- Forgetting to connect the last node in the loop back to Loop Over Items, so only the first batch runs.