Aggregate multiple Runs to a single Run

Hi fellow n8n lovers, I am stuck on combining different runs, in a workflow.
I have many HTTPS Requests which call in several runs and also some Function nodes which again are splitting these runs depending on variables.

I noticed that especially the “Split in Batches” nodes (with loop), seems to have a problem with multiple runs and sometimes only works with the first one and forgets the others.

My question is: How to I combine multiple runs into one single run? I tried the List node with aggregation and also different merge node combinations, but only items in a single run are getting aggregated, not the items of multiple runs.

It looks like this:

image This should result in Run 1 of 1 (30 items)

Maybe someone has a idea?

Hey @prononext,

Check out this workflow, It should do what you are after. The magic happens in the function node.

1 Like

Thanks, with a little edit that worked nicely.

1 Like

This workflow is deleted. Does someone have an alternative?

Hi @timautomation, you’re probably looking for this link. We’ve updated our website recently, unfortunately without forwarding all links :frowning_face:. Sorry for the trouble.

Hi everyone, I’m new here. Sadly, this solution does not work for me. I’m also trying to combine multiple runs in a single run, without the SplitInBatches node. Consider this simple workflow:

The Merge node gets the work done of waiting for both inputs to be available, but it’s mainly useful when both inputs are “pushed” from the conditional IF node. The problem here is that, at runtime, all items may go through one branch or the other, but Merge node tries to “pull” branch information for the input it hasn’t received data for, causing undesired execution of nodes that weren’t supposed to be executed. Here, the Error logic node gets still executed, even if there are no unsuccessful items:

In other words, I need to aggregate different runs of branches which execution is optional. I think it may not be possible at the moment but I may be missing something.

BTW, thank you for all your good job, n8n is awesome, keep it up.

Hey @adrian.martinez,

It might be worth opening a new thread for this one, As you have noticed the Merge node does require both outputs to have data so what you would need is a code node to merge the items.