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”
}
}
(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:


