IF node returns an empty object

Hi there :wave:, I just installed n8n and it is amazing! I am so excited to finish my first automatization. But I am getting an annoying issue with my workflow and I hope someone will be able to help me please.

So I am trying to create a simple workflow: I fetch list of users from airtable, select users with specific status and send an email to selected users

In the IF node I filter users by following condition:

It works fine when there are users with the given status. But if there are no users with such status then IF node for some reason adds an empty object to the true branch (see on screenshot above) and then Send Email node fails with exception.

I did check a few times and there is no any empty objects in the airtable list results. My data from airtable looks like this:

    [
      {
        "id":"rec7oRmd7OSLSZA6T",
        "fields":{
          "Email":"[email protected]",
          "Status":"🤔Sorting",
          "First Name":"John"
        },
        "createdTime":"2020-11-07T11:18:03.000Z"
      },
      {
        "id":"recA1Dun3DZ3aeVet",
        "fields":{
          "Email":"[email protected]",
          "Status":"📧 Reach out",
          "First Name":"July"
        },
        "createdTime":"2020-11-07T11:31:19.000Z"
      }
    ]

What did I do wrong?

Thank you!

Welcome to the community @Slava.K!

Great to hear that you enjoy n8n.

It sounds like you have activated the setting ''Always Output Data" underneath “Settings” on the IF-Node.

2 Likes

Ah, thank you. That’s it. I understand now what this option is for

You are welcome. Perfect, have fun!

1 Like