Describe the problem/error/question
Loop over Items executes the items in this order:
DONE branch with the ‘split out’ data
Loop branch #1
DONE branch with #1 data
LOOP branch #2
DONE branch with #2 data
and so on
What is the expected flow?
Finish the loops, then execute the DONE branch with the aggregated JSON from all the loops results
Please share your workflow
I’m getting the same “error”.
Well, it’s not an error, but it’s not running as expected.
So these 4 first items ran as expected.
When it came back to loop again, the fifth run went straight to “done”.
Have you figure it out?
Not yet… I am trying to add an “IF” node as first element of the DONE branch, and set a boolean expression of ‘does the loop have 0 items remaining’ and only then progress. Still working on it to see if it helps…
I think I found the solution here:
Hey @Gustavo_Borges ,
I have just picked this one up, The loop node can be tricky at times. So in this case the reset option needs to be used to tell the Loop node that it is a new set of data but as you probably noticed while testing if you just enable reset it will run forever as it will reset for every item that comes in from the loop branch.
This brings the new question… How do I reset it for the second run of items? The example workflow that @ihortom gave us is below, In this workflow we w…
pay attention to the “reset” and the “$prevNode.name === “if”” part.
Worked for me!
Hope that helps you
1 Like