# IF node returns an empty object

**URL:** <https://community.n8n.io/t/if-node-returns-an-empty-object/2962>\
**Category:** Questions\
**Created:** [November 8, 2020, 8:44am UTC](https://community.n8n.io/t/if-node-returns-an-empty-object/2962 "2020-11-08T08:44:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Slava.K](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/slava.k/32/2361_2.png) [@Slava.K](https://community.n8n.io/u/Slava.K)\
**Post date:** [November 8, 2020, 8:44am UTC](https://community.n8n.io/t/if-node-returns-an-empty-object/2962/1 "2020-11-08T08:44:27Z")

</div>

Hi there 👋, 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:

 ![n8n+-+️+Hiring+PM+2020-11-08+10-25-53](https://europe1.discourse-cdn.com/n8n/original/2X/b/ba0d933f4ed0f040f5faccb3e626066a7783b58a.png)

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:

```auto
    [
      {
        "id":"rec7oRmd7OSLSZA6T",
        "fields":{
          "Email":"john.doe@example.com",
          "Status":"🤔Sorting",
          "First Name":"John"
        },
        "createdTime":"2020-11-07T11:18:03.000Z"
      },
      {
        "id":"recA1Dun3DZ3aeVet",
        "fields":{
          "Email":"july.duly@example.com",
          "Status":"📧 Reach out",
          "First Name":"July"
        },
        "createdTime":"2020-11-07T11:31:19.000Z"
      }
    ]

```

What did I do wrong?

Thank you!

---

<div class="post-metadata">

**Author:** ![jan](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jan/32/9_2.png) [@jan](https://community.n8n.io/u/jan)\
**Post date:** [November 8, 2020, 10:11am UTC](https://community.n8n.io/t/if-node-returns-an-empty-object/2962/2 "2020-11-08T10:11:50Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Slava.K](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/slava.k/32/2361_2.png) [@Slava.K](https://community.n8n.io/u/Slava.K)\
**Post date:** [November 8, 2020, 10:25am UTC](https://community.n8n.io/t/if-node-returns-an-empty-object/2962/3 "2020-11-08T10:25:27Z")

</div>

> [@jan](#):
>
> It sounds like you have activated the setting ''Always Output Data" underneath “Settings” on the IF-Node.

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

---

<div class="post-metadata">

**Author:** ![jan](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jan/32/9_2.png) [@jan](https://community.n8n.io/u/jan)\
**Post date:** [November 8, 2020, 10:32am UTC](https://community.n8n.io/t/if-node-returns-an-empty-object/2962/4 "2020-11-08T10:32:59Z")

</div>

You are welcome. Perfect, have fun!
