# Newbie: How to create a if condition if the Supabase did not get any rows

**URL:** <https://community.n8n.io/t/newbie-how-to-create-a-if-condition-if-the-supabase-did-not-get-any-rows/156243>\
**Category:** Questions\
**Created:** [July 25, 2025, 3:55pm UTC](https://community.n8n.io/t/newbie-how-to-create-a-if-condition-if-the-supabase-did-not-get-any-rows/156243 "2025-07-25T15:55:01Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aaron\_Libago](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/aaron_libago/32/59049_2.png) [@Aaron\_Libago](https://community.n8n.io/u/Aaron_Libago)\
**Post date:** [July 25, 2025, 3:55pm UTC](https://community.n8n.io/t/newbie-how-to-create-a-if-condition-if-the-supabase-did-not-get-any-rows/156243/1 "2025-07-25T15:55:01Z")

</div>

## Describe the problem/error/question

How to create a if condition if the Supabase did not get any rows

## What is the error message (if any)?

N/A

## Please share your workflow

{  
“nodes”: [  
{  
“parameters”: {  
“httpMethod”: “POST”,  
“path”: “Test”,  
“options”: {}  
},  
“type”: “n8n-nodes-base.webhook”,  
“typeVersion”: 2,  
“position”: [  
0,  
0  
],  
“id”: “739b8ca0-4a03-4fdb-912f-4e651b0db481”,  
“name”: “Webhook”,  
“webhookId”: “b8ec8f02-955a-4d8c-a100-bd55a98fcfe0”  
},  
{  
“parameters”: {  
“assignments”: {  
“assignments”: [  
{  
“id”: “895b7c71-94c6-4235-b67a-8d7ccd75baa1”,  
“name”: “body.From”,  
“value”: “={{ $json.body.WaId }}”,  
“type”: “string”  
},  
{  
“id”: “05867864-6914-4da5-bce9-0d04913e73cc”,  
“name”: “body.Body”,  
“value”: “={{ $json.body.Body }}”,  
“type”: “string”  
}  
]  
},  
“options”: {}  
},  
“type”: “n8n-nodes-base.set”,  
“typeVersion”: 3.4,  
“position”: [  
208,  
0  
],  
“id”: “05f6506e-dff6-4d89-9f97-9facc1b2fb48”,  
“name”: “Edit Fields”  
},  
{  
“parameters”: {  
“useCustomSchema”: true,  
“operation”: “get”,  
“tableId”: “child\_profile”,  
“filters”: {  
“conditions”: [  
{  
“keyName”: “phone\_number”,  
“keyValue”: “=+{{ $json.body.From }}”  
}  
]  
}  
},  
“type”: “n8n-nodes-base.supabase”,  
“typeVersion”: 1,  
“position”: [  
416,  
0  
],  
“id”: “c9c1654c-964d-4f7e-8af2-276d30780b0f”,  
“name”: “Get a row”,  
“alwaysOutputData”: false,  
“retryOnFail”: false,  
“executeOnce”: false,  
“credentials”: {  
“supabaseApi”: {  
“id”: “40CrMKW4l7klnN2m”,  
“name”: “Supabase account”  
}  
}  
},  
{  
“parameters”: {  
“assignments”: {  
“assignments”: [  
{  
“id”: “e65ed5b5-b9db-4500-a2ec-d1d82fb0312c”,  
“name”: “test”,  
“value”: "={{ $items("Get a row").length \> 0 ? 1 : 0 }} ",  
“type”: “string”  
}  
]  
},  
“options”: {}  
},  
“type”: “n8n-nodes-base.set”,  
“typeVersion”: 3.4,  
“position”: [  
624,  
0  
],  
“id”: “6e2bd0db-7995-4215-9d10-e06f6627a4ad”,  
“name”: “Edit Fields2”  
},  
{  
“parameters”: {  
“conditions”: {  
“options”: {  
“caseSensitive”: true,  
“leftValue”: “”,  
“typeValidation”: “strict”,  
“version”: 2  
},  
“conditions”: [  
{  
“id”: “1ca4c931-4c26-4360-a27b-df883b8833b1”,  
“leftValue”: “”,  
“rightValue”: “”,  
“operator”: {  
“type”: “string”,  
“operation”: “equals”,  
“name”: “filter.operator.equals”  
}  
}  
],  
“combinator”: “and”  
},  
“options”: {}  
},  
“type”: “n8n-nodes-base.if”,  
“typeVersion”: 2.2,  
“position”: [  
880,  
0  
],  
“id”: “b8a23ae0-3475-443f-923d-07911aef1fe8”,  
“name”: “If”  
}  
],  
“connections”: {  
“Webhook”: {  
“main”: [  
[  
{  
“node”: “Edit Fields”,  
“type”: “main”,  
“index”: 0  
}  
]  
]  
},  
“Edit Fields”: {  
“main”: [  
[  
{  
“node”: “Get a row”,  
“type”: “main”,  
“index”: 0  
}  
]  
]  
},  
“Get a row”: {  
“main”: [  
[  
{  
“node”: “Edit Fields2”,  
“type”: “main”,  
“index”: 0  
}  
]  
]  
},  
“Edit Fields2”: {  
“main”: [  
[  
{  
“node”: “If”,  
“type”: “main”,  
“index”: 0  
}  
]  
]  
}  
},  
“pinData”: {},  
“meta”: {  
“templateCredsSetupCompleted”: true,  
“instanceId”: “7b729426559d0eb29a7f94c0520dc6efcc210395c48bb178cf804b41471dad54”  
}  
}

```auto
(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:**
- **Database (default: SQLite):**
- **n8n EXECUTIONS\_PROCESS setting (default: own, main):**
- **Running n8n via (Docker, npm, n8n cloud, desktop app):**
- **Operating system:**

---

<div class="post-metadata">

**Author:** ![jabbson](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jabbson/32/87328_2.png) [@jabbson](https://community.n8n.io/u/jabbson)\
**Post date:** [July 25, 2025, 3:57pm UTC](https://community.n8n.io/t/newbie-how-to-create-a-if-condition-if-the-supabase-did-not-get-any-rows/156243/2 "2025-07-25T15:57:59Z")

</div>

Go to the supabase node’s settings and enable “Always output data”. Then follow the node with the IF node and the condition should be {{ $json }} object “is not empty” to check if there were results.

 ![image](https://europe1.discourse-cdn.com/n8n/original/3X/f/d/fd2c056d3ac57941ab5760ef729c4fc625fe2d61.png)

 ![image](https://europe1.discourse-cdn.com/n8n/original/3X/2/4/240b06105bc48d42ca31ec33e53357174624c8cc.png)

---

<div class="post-metadata">

**Author:** ![Aaron\_Libago](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/aaron_libago/32/59049_2.png) [@Aaron\_Libago](https://community.n8n.io/u/Aaron_Libago)\
**Post date:** [July 27, 2025, 5:59pm UTC](https://community.n8n.io/t/newbie-how-to-create-a-if-condition-if-the-supabase-did-not-get-any-rows/156243/3 "2025-07-27T17:59:31Z")

</div>

Thank you. i have a problem i woud like to send a message on twillio but the data is blank when i was on the False condition.

 ![image](https://europe1.discourse-cdn.com/n8n/original/3X/3/d/3dc6069933fd71b058ede8cb5ee3961d241250d9.png)

---

<div class="post-metadata">

**Author:** ![jabbson](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jabbson/32/87328_2.png) [@jabbson](https://community.n8n.io/u/jabbson)\
**Post date:** [July 28, 2025, 1:37am UTC](https://community.n8n.io/t/newbie-how-to-create-a-if-condition-if-the-supabase-did-not-get-any-rows/156243/4 "2025-07-28T01:37:31Z")

</div>

This appears to be a separate issue, please mark the answer as solved here, then create a separate topic for the new question. Thank you.

Cheers.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/system/32/195824_2.png) [@system](https://community.n8n.io/u/system)\
**Post date:** [October 26, 2025, 1:38am UTC](https://community.n8n.io/t/newbie-how-to-create-a-if-condition-if-the-supabase-did-not-get-any-rows/156243/5 "2025-10-26T01:38:27Z")

</div>

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