# Split In Batches Not Looping Through All Items

**URL:** <https://community.n8n.io/t/split-in-batches-not-looping-through-all-items/281743>\
**Category:** Questions\
**Created:** [March 26, 2026, 5:41pm UTC](https://community.n8n.io/t/split-in-batches-not-looping-through-all-items/281743 "2026-03-26T17:41:15Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Roseline](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/roseline/32/58796_2.png) [@Roseline](https://community.n8n.io/u/Roseline)\
**Post date:** [March 26, 2026, 5:41pm UTC](https://community.n8n.io/t/split-in-batches-not-looping-through-all-items/281743/1 "2026-03-26T17:41:15Z")

</div>

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

```auto
(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:**

---

<div class="post-metadata">

**Author:** ![Niffzy](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/niffzy/32/158156_2.png) [@Niffzy](https://community.n8n.io/u/Niffzy)\
**Post date:** [March 26, 2026, 5:45pm UTC](https://community.n8n.io/t/split-in-batches-not-looping-through-all-items/281743/2 "2026-03-26T17:45:12Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![tamy.santos](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/tamy.santos/32/153776_2.png) [@tamy.santos](https://community.n8n.io/u/tamy.santos)\
**Post date:** [March 26, 2026, 8:46pm UTC](https://community.n8n.io/t/split-in-batches-not-looping-through-all-items/281743/3 "2026-03-26T20:46:49Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![Roseline](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/roseline/32/58796_2.png) [@Roseline](https://community.n8n.io/u/Roseline)\
**Post date:** [March 27, 2026, 4:03pm UTC](https://community.n8n.io/t/split-in-batches-not-looping-through-all-items/281743/4 "2026-03-27T16:03:38Z")

</div>

Thanks @Niffzy @tamy.santos

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/system/32/195824_2.png) [@system](https://community.n8n.io/u/system)\
**Post date:** [April 3, 2026, 4:04pm UTC](https://community.n8n.io/t/split-in-batches-not-looping-through-all-items/281743/5 "2026-04-03T16:04:17Z")

</div>

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