Unexpected data duplication in Loop Over Items node

Describe the problem

I’m facing unexpected data duplication in the Loop Over Items node (previously known as Split in Batches).

Observed behavior:

  • During workflow execution, the node seems to correctly process items in batches through the loop branch.

  • However, at the end of the processing (when the loop finishes and data should go to the Done output), the output data appears to get doubled / duplicated.

  • In my case, what should be a single set of processed items ends up duplicated (and sometimes split), resulting in 2×, 4× (or more) items than expected.

  • Downstream nodes (e.g. Aggregate, Code, or any processing node) receive this multiplied data.

  • As a result, nodes after the loop get triggered multiple times (in my example: 4 times instead of once), depending on the data size and how the duplication occurs.

Expected behavior:
The Done output should contain exactly the processed items once (no automatic doubling/duplication), so downstream nodes execute only once per logical “group” of data.
Concrete impact example:

  • After the loop, I have a notification node (e.g. Send Email, Discord, Slack, etc.).

  • Instead of sending 1 notification, it sends the notification 4 times (because it receives 4× the items).

Additional details:

  • The duplicated/split data never gets merged back into a single object properly.

  • Using nodes like Aggregate, Item Lists, or even a Code node with custom logic does not combine them back into one expected item/object — the duplication persists.

  • This causes the entire downstream workflow to behave unexpectedly (multiple executions, duplicate API calls, duplicate messages/notifications, etc.).

(Below is an example of how nodes after the loop receive and handle the split/duplicated items):

Environment:

  • n8n version: 2.4.8 (self-hosted)

hello @Erhan_Ozturk

Please, share the workflow. Most likely you are having a pairing issue when the Loop node receive more than 1 item from within the loop run.

You can select all nodes with Ctrl+A and copy them with Ctrl+C. Then, past the content after pressing the button </> with Ctrl+V.

1 Like

This happens to me sometimes, i just set the output on most nodes to only once for every item.

1 Like

Hello @barn4k

Unfortunately it’s not allowing me to add the workflow or attach a file to either my original post or to this reply, I’ll try again tomorrow. I’ve also tried to switch back to the standard markdown editor but without success. I’ve added a screenshot of the workflow just to give you an overview of it.

I forgot to mention this in my original post, but the workflow worked without any issues in a previous version of n8n. After updating our instance to version 2.4.8 is when we first started to encounter this faulty behavior. This is the first workflow in which we’ve noticed this change in behavior but we’ve got other workflows in which we need to do some steps after the done branch where the same faulty behavior occurs.

Hi @Erhan_Ozturk, welcome back!
try collapse the output to a single item right after Done, add a Code node and return only one item:
return [
{
json: {
result: $input.all().map(i => i.json)
}
}
];

Better to offload the loop part into the sub workflow. Currently, the setup is very heavy, difficult to predict, and very unreliable (if any node within the loop raises an error, the whole loop will break).