Invalid Data passing the entry check

Describe the problem/error/question

I am getting data via a webhook and want to check the field values (if-node). It looks like I am not able to check a {{ null }} value. The record is passing my entry check nevertheless

What is the error message (if any)?

Please share your workflow

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

Share the output returned by the last node

Information on your n8n setup

  • n8n version: 2.23.2 Community Edition
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system: Ubuntu

Hey @Nadir, while you wait for a response, here are some things that might help:

Suggested resources

Automatically matched to your question.

Docs:

Forum:

@moosa, @solomon, @jabbson - you’ve helped with similar issues before, can you take a look?

Automatically suggested by n8n’s community bot. It’s a pilot - please share feedback here.

Hi there,

Have you done the courses?

You check values by adding the actual values not field names.
So for example {{ $json.accountNumber }}
You can simply drag in the fields to set them.

Also they are inside the body so it would be $json.body.accountNumber

Oh my god … sometimes you don’t see the forest because of all the trees :laughing:

Thank you !

accountNumber in your payload is a JSON null, which isn’t always handled by the Is not empty operator the way you’d expect. Instead of comparing against {{ null }}, use an expression such as:


{{ $json.accountNumber !== null }}

or, if you also want to catch undefined:


{{ $json.accountNumber != null }}

If your goal is simply to verify that the field contains a real value, you can also use:


{{ !!$json.accountNumber }}

That will evaluate to false for null, undefined, and empty strings.

Thank you !