Merge multiple Inputs

How to merge more than 2 multiple Inputs to one output? The Merge node has only 2 inputs.

Thanks.

Anderson

1 Like

For that, you have to use multiple Merge nodes, one after another.

A Merge node is not allowed to have more than one node connected to each input else it will behave not as expected.

Is that able to use code to merge the inputs and how to do it?
It is not convenient if there are 10 inputs, then need to use 9 merge nodes.

Hey @anderson.wong,

What are you actually trying to do in your workflow? Looking at it you are sending the output to 2 switch nodes to set some variables, I suspect at that point it is probably worth using the code node to replace the 9 nodes (2 Switch, 6 Set and 1 Merge).

You can find information on how to use a switch in Javascript here: JavaScript Switch Statement this is likely to be the best way to handle this.

Hi Jon,

That’s what I want to do and using Javascript Switch can solve my problem. For that, the workflow looks simplier when using less nodes.

Thank you very much.

1 Like

If you want to see a merge node that takes multiple inputs, you can register your interest by voting on this feature request:

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.