If Node continues to both branches even though it is false and data is on the false side


Describe the issue/error/question

I am having error on if condition even if the condition is false, it continues and gives me an error.

Data is on the false side (true and this is how it should be like);

But If condition continue to flow and gives error on this node because it is empty;

Even it gives error, it does its job on the other http request but I’m stuck when it gives error as a sub-workflow;

My split in batches node stops working and doesnt loop through multiple mails.

It looks like when I remove merge node, it doesn’t continue. But I need merge node :slight_smile:

Please suggest me a solution about IF Node, I don’t want IF Node to continue to flow even it is not true.

Like can I just make my “split in batches node” on the mother workflow keep continue without caring about the error on sub-workflow?

Information on your n8n setup

  • n8n version:Last version of Cloud

That is, sadly, currently expected behavior. The Merge-Node does always expect data from both inputs, and if there is no incoming data it goes upstream to find data by itself.

There is already an open PR to change that in the future, will probably be released with the upcoming v1.

The solution in your case is probably not to have a Merge-Node at all (as there is actually nothing to merge) and rather connect directly to the Post File to Ninox Node.

What about the times when there is something (attachments) to merge with the return id from http request?

@jan this is 4 days of work with workflow generators and all and it stucked in a IF condition. How can we proceed?

If the Merge-Node is actually doing something, then make sure it always gets some data like that:

And just to make it clear again. The issue is not the IF-Node, it is the Merge-Node and that it always expects data from both inputs. You should also make sure to never have more than one incoming connection into any Merge-Node, for that reason did I add the NoOp node.

Hey @jan,

Thank you for your support, above solution just worked.

n8n platform needs some spesific twists to make an algorithm work and there is not enough example on the documentation or internet to find them out.

But you guys are fast on answering, thank you.

1 Like

Glad to hear that I could be helpful!

Agree, esp. this behavior is confusing and makes some things in n8n unnecessarily complicated. So really looking forward to having the above-mentioned PR merged soon so that it is a thing of the past.

1 Like

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

New version [email protected] got released which includes the GitHub PR 4238.

1 Like