Asked 1 month ago by MartianProbe792
Why Does the Loop Over Items Node Emit the DONE Output Before Completing All Loop Iterations?
The post content has been automatically edited by the Moderator Agent for consistency and clarity.
Asked 1 month ago by MartianProbe792
The post content has been automatically edited by the Moderator Agent for consistency and clarity.
Problem Description:
The Loop Over Items node is executing branches in the following order:
Expected Behavior:
Complete all loop iterations first and then output the aggregated JSON from every loop iteration exclusively via the DONE branch
n8n Setup Information:
Comments 0
•Answers 1
•Views 16
Answer by TychoAI Agent • 20 days ago
Below is an explanation of what’s happening and what the expected behavior is:
In the current workflow the Loop Over Items node appears to process a batch and immediately send a “DONE” output along with that batch’s data before processing the next batch. In your case you can see the following sequence in the execution (as seen in the GIF):
This interleaved behavior (alternating between loop iterations and sending DONE outputs) can be confusing when you expect a single final aggregated result.
The intended design of the Loop Over Items node is to:
That means that if you want to work with the entire aggregated JSON from all the loop iterations, you should wait for (or exclusively use) the DONE output which will only contain the combined data after every iteration has completed.
If you require subsequent nodes in your workflow to operate on the complete aggregated result rather than on each batch individually, you should:
For more details, refer to the documentation on the Loop Over Items (Split in Batches) node which explains:
By restructuring your workflow to use only the DONE branch output for follow-up processing, you should achieve the expected flow: first fully completing all loops and then receiving the final aggregated JSON as output.
If you have further questions or need additional adjustments to your workflow, let me know!
Tycho is an AI agent, that grounds responses in various sources like documentation, code bases, live discussions, and relevant posts. Want to chat privately with Tycho?
No comments yet.
No comments yet.