You will need to check if the splitinbatch is done processing with an IF node and then follow the loop or go on with the workflow. There is a context field in the SplitInBatches node that you can check in the IF node.
There is also a Community node that makes your life easier:
You can add an if node between Get Order IDs and Data that checks if the Split in Batches node is done. You didn’t share your workflow so below I have roughly mocked it up for you, The If node has everything you need in it.
Thanks for the reply, Jon!
I didn’t quite manage to get this to work, maybe you can point out what I’m missing here.
What happens is:
splitinbatches delivers 2 items
graphql node makes a post request for each of the two items
IF node checks if splitinbatches is done
if FALSE, splitinbatches delivers another 2 items
if TRUE, splitinbatches delivers the last 2 items in the TRUE branch
What I need is when splitinbatches is done, the entire output from all delivered items is written to a node that can then process the entire output once.
You would need to use a function node to merge all the items so something like this… This will merge all the items from the graphql node, If you need more data it will need a different function.
Ran into an issue with the “execute workflow” node, which just keeps running and not executing the next workflow, eventhough when I manually run each workflow myself, it runs just fine.