Split In Batches Not Looping Through All Items

Hi everyone, I’m having an issue with the Split In Batches node. It processes the first batch correctly, but then it doesn’t continue to the next batch.
My workflow is
HTTP Request → Split In Batches → Function → Database
Batch size is set to 10, and I have around 100 items, but only the first 10 get processed.
I connected it like this:
• Main output → Function → Database
• But I’m not sure if I connected the loop correctly
return $input.all().map(item => ({
json: {
id: item.json.id,
name: item.json.name
}
}));

Describe the problem/error/question

After the first batch runs, the workflow just stops instead of continuing with the remaining items.
Do I need to connect the “Continue” output back into the Split In Batches node?

What is the error message (if any)?

Please share your workflow

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

Share the output returned by the last node

Information on your n8n setup

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Hi @Roseline

Yes the issue is your loop is not set up correctly.

You need to create a loop connection.

After your last node (e.g. Database), connect it back to Split In Batches → Continue.

HTTP Request → Split In Batches → Function → Database

(back to Split In Batches - Continue)

Without that loop, n8n will only run the first batch, which is exactly what you’re seeing.

3 Likes

Hi @Roseline
Since Niffzy nailed the loop, check if your Function node is swallowing items. Replace return $input.all() with return $input.items to pass each batch through properly. Also reset Split In Batches between tests!

1 Like

Thanks @Niffzy @tamy.santos

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.