Merge & IF problem

I have a problem with Merge node (Set to “Pass through”).

In this first example Merge executes (incorrectly) even though Input2 is never reached (since result of IF node is FALSE).

If I add NoOp node (even if disabled), Merge node behaves correctly, and does not execute (which is correct behavior).

Information on your n8n setup

  • **n8n version:0.182.0
  • Running n8n with the execution process [own(default)]:
  • Running n8n via [desktop app]:

Hey @Tedyous,

In the first workflow, the behavior looks fine to me. The Pass-Through Mode passes the selected input, in this case, Input 1 and ignores Input 2. If Input 2 is selected, the Merge node will not execute since the True Branch is connected to the Merge node, and the results of the IF node is False.

For the Merge node to pass through the output from the False Branch in the IF node, you would have to link the False Branch to the Merge node and select Input 2 in the Merge node.

However, that is some odd behavior in the second workflow, and I will let the internal team know.

Hope this helps and thank you for your insight.

1 Like

Thanks for quick response. I read the docs on IF again and I think this problem is related to “odd” behavior of the Merge node in n8n which forces execution of input branches (Merge inputs).
If you execute the first example, you can see that the branch from “true to Input2” does not get colored green, while Merge node behaves like it does.

I see your point but the Merge node still does not output the data received from Input 1. So, functionality-wise, it is still working correctly. The reason could also be because there is data received from the first NoOp (even though we have chosen input 2). This can happen because there are Modes in the Merge node that require two inputs.

If you are building a workflow where the Merge node is causing issues, I would be happy to share my thoughts on a fix.

I have already reported this internally, so I will let you know whenever action is taken.