Accepting 2 inputs in 1 function node

Hey,
What I’m trying to do is collecting input from 2 nodes into only one node,
what’s happening is that I’m comparing results between api data and the other function node data so I want both of them present to compare them

here’s a screenshot

Hi @Mohamed_Reda,

In this case, you can use the merge node. Link the two nodes into the merge node and then link the merge node with the last function node to do the comparison. I would suggest to use Merge By Index Mode when configuring the merge node.

3 Likes

Thanks alot for the help, you saved me alot as I didn’t know about the merge node thing

2 Likes

Does the Merge node cause the execution of its two source nodes?
For example, I have an IF node that will cause the execution of node A or node B, and then I want to send the output of any of those two nodes to a Kafka node, but only one of them should be executed after the IF. This is true if I link A and B to the Kafka node, but if I link A and B to the Merge node, it seems that both of them are executed.

Hi @golimarrrr, yes it does. The behaviour is documented here:

1 Like

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