Is there any way to force a Merge node to pass information with only one input?

During my use of n8n I regularly run into hardships when I attempt to work with the Merge node.

I have a common use to create entities on different branches and I want to merge them to a single branch, here is a minimal example:

The issue is that I can’t confirm that both of the IF exit will be in use so if for example I have data that is always true the merge node does not activate due to having only one input.
Is there any workaround or alternative way to consistently have the all data in a single node?
Currently I have to duplicate the nodes for every split for my workflow to consistently work.

Hey @Tuckan,

Welcome to the community :sparkling_heart:

You can set the Always Output Data to true in the SuiteCRM nodes. This will return an empty object if there is no data in one o these nodes. This empty object will be passed to the Merge node, and you will get the expected result!

The following screenshot shows the Always Output Data option for the Set node.

Hi @harshil1712,

Thank you for the reply.
I already knew about the option of Always Output Data and tried using it the issue is that if I activate it for the IF node or the Create nodes it will create extra entities that should not be created. The entities should only be created according to the conditions.
Is there any other option?

I also noted that the Merge node has an unexpected behavior in which it activates connected nodes that are not originating from the Start node:


Is there an explanation for this behavior? it can also be activating nodes from conditional branches unexpectedly.

Hey @Tuckan,

Ah yes, I forgot that the above approach will execute both the nodes irrespective of the output of the Function node. Can you please share what exactly you want to do? Do you want to just receive the information from the nodes (when both the condition is satisfied in a single execution) and use that in the next nodes in your workflow? Or is there a specific reason that you want to merge the outputs?

I also noted that the Merge node has an unexpected behavior in which it activates connected nodes that are not originating from the Start node

Yes, this is expected behavior. This allows you to execute the nodes that are not connected to a Trigger node (or Start node). To help you better understand, let’s take an example where you want to fetch data from Google Sheets and an external API and merge them using the Merge node. Now since both these nodes don’t really need any input from the previous nodes they can be executed individually. You can connect one of these nodes to the Start node (or a Trigger node) to start the workflow (remember you always need a starting point for your workflow). The other node will be executed automatically since it is also connected to a Merge node. I hope this explanation helps you understand this behavior.

Hey @harshil1712,
Thank you for the detailed explanation.
I think there may be a possible bug - the Merge node activates nodes that are connected to a trigger - In the same example workflow I have an IF condition the is always true. As you can see in the image below the Create node at the bottom is also activated even though the IF is sending out 0 items on the false output:

Regarding what I am trying to do.
I need to create a new account and connect it to a customer, in case the customer does not exist I also create a new customer to connect to the new account:


This workflow mostly work but if I have a case that ALL of the items already have a customer the upper path does not progress and the append Merge node does not activate to pass through the items from the node “Find Existing Customers”.
I cannot use the “always output data” here because I do not want to create new unnecessary customers in my system.
I also have more complex workflows to do with extra levels and I don’t want to be forced to create a lot of extra nodes if there is an alternative solution.