Final End Node

I have a very complex ETL workflow that runs many nodes, resulting in about 10 nodes, ending the overall workflow, but at different times. I want to add a “final” node, that will execute once these 10 are ALL done. The only way I can thing of right now, is to use the Merge node type.

  • Is this the best approach?
  • Would I have to include multiple Merge nodes, or can I use only 1, and have all 10 nodes input to that?

I have tested the following:

  • Single Merge node, with all 10 processing nodes as inputs - does not work

  • Multiple merge nodes (i.e. 10 into 5 merges, that 5 into 3 merges, etc, ect) - this works correctly

But, I’m hoping there is a “cleaner” way of doing this?

There is sadly currently no other solution than the multiple merge node as you described.

Thanks, @jan! It’s messy, but it gets the job done!

Hi @jan, i came across the same use-case and would like to know if the solution is still the same or there are other possibilities now?

As you can see here, i thought that i could ‘catch’ all of the outputs from the individual Translate nodes into one function, but realised that the function just gets executed 3 times here.

I plan on adding many more Translate nodes and would like to merge the results (after waiting for each of them to finish) from all of them into a single array and return it.

How to go about it?


Hi @shrey-42,

Probably, what you can do is create a single line workflow with all Google translate nodes in consecutive steps.

Finally, adding a Set node with different languages properties and assigning the result of previous nodes will do the job.

Hope this is helpful.

1 Like

Thanks a lot, that did help.

Although i was hoping for some sort of a ‘Promise.All’ + ‘Merge All’ solution. Would help to reduce the response time of the webhook.

Currently, nodes are executed sequentially.

HTTP request node allows parallel processing and a full list of queries (text plus destination language) must be generated (like an array with all options) previously. But you need to work with Google Translate API inside HTTP Request node to achieve it. Be careful with API rates when querying Google Translate API :wink:

By the way, I think this is a related question with n8n execution process that @jan probably could clarify and take in consideration :slight_smile:

1 Like

In this case it is actually best and fastest to create multiple items, one for each language. Then you have literally just one Google Translate Node which requests the translation for all the languages.

As @Miquel_Colomer correctly pointed out do this requests sadly not happen in parallel. It would, however, not be to complicated to change the node to do that.