Workflow - Notion (search with no entry)

I’m currently building a workflow in n8n where I search for a specific entry (e.g. email or name) in a Notion database.

The logic is simple:
• If a matching entry is found → perform action A
• If no entry is found → perform action B (e.g. create a new entry)

The problem:

If the “Notion Search” node doesn’t find a result, the workflow simply stops at that point.
The following nodes (e.g. IF node or Function node for evaluation) are not executed, because the node doesn’t output any item at all.

What you are looking for is enabling Always Output Data in Notion node settings. This will result in empty structure hitting the next node which will prevent the workflow from stopping (it stops when there is no output at all).

Yeah but with the search i am looking for one special object.
With the if i am looking if the output of search is greater than zero.
I look if one customer is already in my database.
Now when i set the if to always output, the if every time says the customer is already in database. You know what i mean ?

you set Notion to always output, not if. In the if node then you check
{{ $json }} object is empty.

To elaborate, here is how it would work:

You output empty object if no customer is not present in the database:

then in the if node:

All together:

1 Like

Thank you, that works perfect :+1:t2:

1 Like

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