I cannot deal with if node


I am trying to accomplish to go throw nodes if notion return 0 items. But n8n cannot answer 0==0 it no say True and not say False.

In my understanding it should go to discord node, shouldn’t it?

Thanks in advance!

The problem is that by default, when and the node does not return data, the execution stops. To override this behavior, go to the node settings and set Always Output Data to true.


So it’s not working for me ;/

I removed no op node but with this block it did not work as well ;/

You have to do that in the Notion node (Check if already got), not in the IF node.

Ok, but how 3==0?

Is there only one output on the if node or is there multiple?

It’s not. What you see there is the expression referencing the first item of the Get Data node - For testing purposes. But I assume that you have more than one item. If you open the IF node at the top, you can see how many items went to the true path and how many went to the false path. See the image below.

1 Like

Hey @Shirobachi! I’ve faced same isue today and solved it with following boolean expression in IF node:

{{Object.keys($items("PutHereTheNameOfYourPossiblyResultlessNode")[0]["json"]).length > 0}}

So you were right, I changed flag run once to true

Now like that node called check if already got has flagged always output == true so even when it has 0 items length is 1 or more

What I am trying to accomplish is to go throw if node only if notion check if already got has no items

Basically I check official API about covid cases and push them to discord and to notion logs, next time check logs if I can find any log from Today if not then push otherwise stop.

Maybe is an easier way to do it, so I explained what I am doing, here is the newest nodes in JSON:

@RawmanGrey Thanks, I might use it <3

You should not have changed this to true.

Add an IF node after the Notion Node (Check if already got). In the Notion Node (Check if already got), set the parameter Always output data to true. In the IF node, use a boolean condition with an expression using the length of the input. That way, when Check if already got does not return items, the flow will go through the true path in the IF node.

Check the example workflow below. Notice that I’m using a function node to simulate the Notion node (Check if already got) in your example.