使用Gallabox API和Supabase滴灌营销的自动化WhatsApp潜在客户培育
高级
这是一个Lead Nurturing领域的自动化工作流,包含 34 个节点。主要使用 If, Switch, Supabase, HttpRequest, SplitInBatches 等节点。 使用Gallabox API和Supabase滴灌营销的自动化WhatsApp潜在客户培育
前置要求
- •Supabase URL 和 API Key
- •可能需要目标 API 的认证凭证
分类
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"meta": {
"instanceId": "807c58b937f3c75f8b242bc4ac5f455a51832cabd7bcdbecd9fdc3ba6179a8c9"
},
"nodes": [
{
"id": "6ec52292-4a05-46b5-82eb-765560b1dfe7",
"name": "Get many rows1",
"type": "n8n-nodes-base.supabase",
"position": [
-1080,
960
],
"parameters": {
"tableId": "contacts_ampere",
"operation": "getAll",
"returnAll": true,
"filterType": "none"
},
"credentials": {
"supabaseApi": {
"id": "pZQPqhLMUOZIjUsR",
"name": "Supabase account"
}
},
"typeVersion": 1,
"alwaysOutputData": true
},
{
"id": "72553947-b418-4884-9eb6-1b73947892b1",
"name": "Switch2",
"type": "n8n-nodes-base.switch",
"position": [
-40,
1160
],
"parameters": {
"rules": {
"values": [
{
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "fa84be36-be05-49c9-9328-7a311b067f1a",
"operator": {
"type": "number",
"operation": "equals"
},
"leftValue": "={{ $json.Count }}",
"rightValue": 0
}
]
}
},
{
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "630a27f9-82f5-4fdc-90c5-d1f4f5554f8b",
"operator": {
"type": "number",
"operation": "equals"
},
"leftValue": "={{ $json.Count }}",
"rightValue": 1
}
]
}
},
{
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "b0bc9bf3-1215-4c79-871e-f588c5b22e82",
"operator": {
"type": "number",
"operation": "equals"
},
"leftValue": "={{ $json.Count }}",
"rightValue": 2
}
]
}
},
{
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "fa57ae02-ba8a-4479-990d-7f622263ad81",
"operator": {
"type": "number",
"operation": "equals"
},
"leftValue": "={{ $json.Count }}",
"rightValue": 3
}
]
}
}
]
},
"options": {}
},
"typeVersion": 3.2
},
{
"id": "e0543edc-b6ba-4067-8b08-59b07e34f566",
"name": "Switch3",
"type": "n8n-nodes-base.switch",
"position": [
-60,
1400
],
"parameters": {
"rules": {
"values": [
{
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "fa84be36-be05-49c9-9328-7a311b067f1a",
"operator": {
"type": "number",
"operation": "equals"
},
"leftValue": "={{ $json.Count }}",
"rightValue": 0
}
]
}
},
{
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "630a27f9-82f5-4fdc-90c5-d1f4f5554f8b",
"operator": {
"type": "number",
"operation": "equals"
},
"leftValue": "={{ $json.Count }}",
"rightValue": 1
}
]
}
},
{
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "b0bc9bf3-1215-4c79-871e-f588c5b22e82",
"operator": {
"type": "number",
"operation": "equals"
},
"leftValue": "={{ $json.Count }}",
"rightValue": 2
}
]
}
},
{
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "fa57ae02-ba8a-4479-990d-7f622263ad81",
"operator": {
"type": "number",
"operation": "equals"
},
"leftValue": "={{ $json.Count }}",
"rightValue": 3
}
]
}
}
]
},
"options": {}
},
"typeVersion": 3.2
},
{
"id": "a62b4cdd-8f2e-4b34-95b6-1889be9194bc",
"name": "Switch4",
"type": "n8n-nodes-base.switch",
"position": [
-40,
1580
],
"parameters": {
"rules": {
"values": [
{
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "fa84be36-be05-49c9-9328-7a311b067f1a",
"operator": {
"type": "number",
"operation": "equals"
},
"leftValue": "={{ $json.Count }}",
"rightValue": 0
}
]
}
},
{
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "630a27f9-82f5-4fdc-90c5-d1f4f5554f8b",
"operator": {
"type": "number",
"operation": "equals"
},
"leftValue": "={{ $json.Count }}",
"rightValue": 1
}
]
}
},
{
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "b0bc9bf3-1215-4c79-871e-f588c5b22e82",
"operator": {
"type": "number",
"operation": "equals"
},
"leftValue": "={{ $json.Count }}",
"rightValue": 2
}
]
}
},
{
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "fa57ae02-ba8a-4479-990d-7f622263ad81",
"operator": {
"type": "number",
"operation": "equals"
},
"leftValue": "={{ $json.Count }}",
"rightValue": 3
}
]
}
}
]
},
"options": {}
},
"typeVersion": 3.2
},
{
"id": "e47cf7ed-0e09-49a5-8746-14c52185e3d5",
"name": "Switch5",
"type": "n8n-nodes-base.switch",
"position": [
-60,
1720
],
"parameters": {
"rules": {
"values": [
{
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "fa84be36-be05-49c9-9328-7a311b067f1a",
"operator": {
"type": "number",
"operation": "equals"
},
"leftValue": "={{ $json.Count }}",
"rightValue": 0
}
]
}
},
{
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "630a27f9-82f5-4fdc-90c5-d1f4f5554f8b",
"operator": {
"type": "number",
"operation": "equals"
},
"leftValue": "={{ $json.Count }}",
"rightValue": 1
}
]
}
},
{
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "b0bc9bf3-1215-4c79-871e-f588c5b22e82",
"operator": {
"type": "number",
"operation": "equals"
},
"leftValue": "={{ $json.Count }}",
"rightValue": 2
}
]
}
},
{
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "fa57ae02-ba8a-4479-990d-7f622263ad81",
"operator": {
"type": "number",
"operation": "equals"
},
"leftValue": "={{ $json.Count }}",
"rightValue": 3
}
]
}
}
]
},
"options": {}
},
"typeVersion": 3.2
},
{
"id": "e692da70-6ab3-47e0-b30f-9579571ac13d",
"name": "Loop Over Items1",
"type": "n8n-nodes-base.splitInBatches",
"position": [
0,
0
],
"parameters": {
"options": {}
},
"typeVersion": 3
},
{
"id": "c1f44338-df6e-47b6-896c-00cca3ae83d0",
"name": "Schedule Trigger3",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
-1340,
960
],
"parameters": {
"rule": {
"interval": [
{
"field": "hours"
}
]
}
},
"typeVersion": 1.2
},
{
"id": "9e664dac-592e-4087-b412-0c6f5a5c247c",
"name": "Create Logs",
"type": "n8n-nodes-base.supabase",
"onError": "continueRegularOutput",
"position": [
700,
20
],
"parameters": {
"tableId": "logs_nurture_ampere",
"fieldsUi": {
"fieldValues": [
{
"fieldId": "message_id",
"fieldValue": "={{ $json.body.id }}"
},
{
"fieldId": "phone",
"fieldValue": "={{ $('Count Switch').item.json.phone }}"
},
{
"fieldId": "disposition",
"fieldValue": "={{ $('Count Switch').item.json.Disposition }}"
},
{
"fieldId": "mes_count",
"fieldValue": "={{ $('Count Switch').item.json.Count + 1}}"
},
{
"fieldId": "last_sent",
"fieldValue": "={{ $('Count Switch').item.json.last_message_sent }}"
},
{
"fieldId": "status_code",
"fieldValue": "={{ $json.statusCode }}"
},
{
"fieldId": "status_message",
"fieldValue": "={{ $json.statusMessage }}"
},
{
"fieldId": "name",
"fieldValue": "={{ $('Count Switch').item.json.name }}"
},
{
"fieldId": "status_code",
"fieldValue": "={{ $json.error.status }}"
},
{
"fieldId": "status_message",
"fieldValue": "={{ $json.error.message }}"
},
{
"fieldId": "status_code",
"fieldValue": "={{ $json.statusCode }}"
},
{
"fieldId": "status_message",
"fieldValue": "={{ $json.statusMessage }}"
}
]
}
},
"typeVersion": 1
},
{
"id": "f9bbae85-3938-4421-b7e6-a2b6c3fdfe8b",
"name": "new_lead_0",
"type": "n8n-nodes-base.httpRequest",
"onError": "continueRegularOutput",
"position": [
420,
20
],
"parameters": {
"url": "https://server.gallabox.com/devapi/messages/whatsapp",
"method": "POST",
"options": {
"response": {
"response": {
"fullResponse": true
}
}
},
"jsonBody": "=\n{\n \"channelId\": \"\",\n \"channelType\": \"whatsapp\",\n \"recipient\": {\n \"name\": \"{{ $json.name }}\",\n \"phone\": \"91{{ $json.phone }}\"\n },\n \"whatsapp\": {\n \"type\": \"template\",\n \"template\": {\n \"templateName\": \"testing_rahi_1\",\n \"bodyValues\": {\n \"Name\": \"{{ $json.name }}\",\n \"Details\": \"\"\n },\n \"buttonValues\": [\n {\n \"index\": 0,\n \"sub_type\": \"quick_reply\",\n \"parameters\": {\n \"type\": \"payload\",\n \"payload\": \"Show me Brochure\"\n }\n }\n ]\n }\n }\n}",
"sendBody": true,
"jsonHeaders": "write your api key and api secret ",
"sendHeaders": true,
"specifyBody": "json",
"authentication": "genericCredentialType",
"specifyHeaders": "json",
"genericAuthType": "httpCustomAuth"
},
"typeVersion": 4.1
},
{
"id": "09e6fe06-73d7-4781-8cb2-e295a28b7eeb",
"name": "Update a row1",
"type": "n8n-nodes-base.supabase",
"onError": "continueRegularOutput",
"position": [
1140,
20
],
"parameters": {
"filters": {
"conditions": [
{
"keyName": "phone",
"keyValue": "={{ $json.phone }}",
"condition": "eq"
}
]
},
"tableId": "contacts_ampere",
"fieldsUi": {
"fieldValues": [
{
"fieldId": "Count",
"fieldValue": "={{ $('Loop Over Items1').item.json.Count + 1}}"
},
{
"fieldId": "last_message_sent",
"fieldValue": "={{ $('new_lead_0').item.json.headers.date }}"
}
]
},
"matchType": "allFilters",
"operation": "update"
},
"typeVersion": 1
},
{
"id": "fd387290-fffb-4230-99c4-05fed3e98db2",
"name": "Loop Over Items2",
"type": "n8n-nodes-base.splitInBatches",
"position": [
0,
260
],
"parameters": {
"options": {}
},
"typeVersion": 3
},
{
"id": "ccf4ea81-c12a-4f21-996d-623278916342",
"name": "Create Logs1",
"type": "n8n-nodes-base.supabase",
"onError": "continueRegularOutput",
"position": [
640,
280
],
"parameters": {
"tableId": "logs_nurture_ampere",
"fieldsUi": {
"fieldValues": [
{
"fieldId": "message_id",
"fieldValue": "={{ $json.body.id }}"
},
{
"fieldId": "phone",
"fieldValue": "={{ $('Count Switch').item.json.phone }}"
},
{
"fieldId": "disposition",
"fieldValue": "={{ $('Count Switch').item.json.Disposition }}"
},
{
"fieldId": "mes_count",
"fieldValue": "={{ $('Count Switch').item.json.Count + 1}}"
},
{
"fieldId": "last_sent",
"fieldValue": "={{ $('Count Switch').item.json.last_message_sent }}"
},
{
"fieldId": "status_code",
"fieldValue": "={{ $json.statusCode }}"
},
{
"fieldId": "status_message",
"fieldValue": "={{ $json.statusMessage }}"
},
{
"fieldId": "name",
"fieldValue": "={{ $('Count Switch').item.json.name }}"
},
{
"fieldId": "status_code",
"fieldValue": "={{ $json.error.status }}"
},
{
"fieldId": "status_message",
"fieldValue": "={{ $json.error.message }}"
},
{
"fieldId": "status_code",
"fieldValue": "={{ $json.statusCode }}"
},
{
"fieldId": "status_message",
"fieldValue": "={{ $json.statusMessage }}"
}
]
}
},
"typeVersion": 1
},
{
"id": "c6099d73-a727-48b4-a2df-bd07afc590c2",
"name": "Update a row2",
"type": "n8n-nodes-base.supabase",
"onError": "continueRegularOutput",
"position": [
1060,
280
],
"parameters": {
"filters": {
"conditions": [
{
"keyName": "phone",
"keyValue": "={{ $json.phone }}",
"condition": "eq"
}
]
},
"tableId": "contacts_ampere",
"fieldsUi": {
"fieldValues": [
{
"fieldId": "Count",
"fieldValue": "={{ $('Loop Over Items2').item.json.Count + 1}}"
},
{
"fieldId": "last_message_sent",
"fieldValue": "={{ $('new_lead_').item.json.headers.date }}"
}
]
},
"matchType": "allFilters",
"operation": "update"
},
"typeVersion": 1
},
{
"id": "037e9f03-eb13-4334-b587-812a00c7161a",
"name": "Loop Over Items3",
"type": "n8n-nodes-base.splitInBatches",
"position": [
20,
560
],
"parameters": {
"options": {}
},
"typeVersion": 3
},
{
"id": "d75db6e9-ec69-4a2c-b088-98c168126ee4",
"name": "Create Logs2",
"type": "n8n-nodes-base.supabase",
"onError": "continueRegularOutput",
"position": [
660,
560
],
"parameters": {
"tableId": "logs_nurture_ampere",
"fieldsUi": {
"fieldValues": [
{
"fieldId": "message_id",
"fieldValue": "={{ $json.body.id }}"
},
{
"fieldId": "phone",
"fieldValue": "={{ $('Count Switch').item.json.phone }}"
},
{
"fieldId": "disposition",
"fieldValue": "={{ $('Count Switch').item.json.Disposition }}"
},
{
"fieldId": "mes_count",
"fieldValue": "={{ $('Count Switch').item.json.Count + 1}}"
},
{
"fieldId": "last_sent",
"fieldValue": "={{ $('Count Switch').item.json.last_message_sent }}"
},
{
"fieldId": "status_code",
"fieldValue": "={{ $json.statusCode }}"
},
{
"fieldId": "status_message",
"fieldValue": "={{ $json.statusMessage }}"
},
{
"fieldId": "name",
"fieldValue": "={{ $('Count Switch').item.json.name }}"
},
{
"fieldId": "status_code",
"fieldValue": "={{ $json.error.status }}"
},
{
"fieldId": "status_message",
"fieldValue": "={{ $json.error.message }}"
},
{
"fieldId": "status_code",
"fieldValue": "={{ $json.statusCode }}"
},
{
"fieldId": "status_message",
"fieldValue": "={{ $json.statusMessage }}"
}
]
}
},
"typeVersion": 1
},
{
"id": "f857408c-ad43-4e26-89a4-5ef6551465c9",
"name": "Update a row3",
"type": "n8n-nodes-base.supabase",
"onError": "continueRegularOutput",
"position": [
1080,
560
],
"parameters": {
"filters": {
"conditions": [
{
"keyName": "phone",
"keyValue": "={{ $json.phone }}",
"condition": "eq"
}
]
},
"tableId": "contacts_ampere",
"fieldsUi": {
"fieldValues": [
{
"fieldId": "Count",
"fieldValue": "={{ $('Loop Over Items3').item.json.Count + 1}}"
},
{
"fieldId": "last_message_sent",
"fieldValue": "={{ $('new_lead_3').item.json.headers.date }}"
}
]
},
"matchType": "allFilters",
"operation": "update"
},
"typeVersion": 1
},
{
"id": "947a69eb-3ce3-4000-98e7-9a44bef47098",
"name": "Loop Over Items4",
"type": "n8n-nodes-base.splitInBatches",
"position": [
20,
800
],
"parameters": {
"options": {}
},
"typeVersion": 3
},
{
"id": "de2a6bd1-9510-41cd-aff0-ba58e62759bb",
"name": "Create Logs3",
"type": "n8n-nodes-base.supabase",
"onError": "continueRegularOutput",
"position": [
660,
820
],
"parameters": {
"tableId": "logs_nurture_ampere",
"fieldsUi": {
"fieldValues": [
{
"fieldId": "message_id",
"fieldValue": "={{ $json.body.id }}"
},
{
"fieldId": "phone",
"fieldValue": "={{ $('Count Switch').item.json.phone }}"
},
{
"fieldId": "disposition",
"fieldValue": "={{ $('Count Switch').item.json.Disposition }}"
},
{
"fieldId": "mes_count",
"fieldValue": "={{ $('Count Switch').item.json.Count + 1}}"
},
{
"fieldId": "last_sent",
"fieldValue": "={{ $('Count Switch').item.json.last_message_sent }}"
},
{
"fieldId": "status_code",
"fieldValue": "={{ $json.statusCode }}"
},
{
"fieldId": "status_message",
"fieldValue": "={{ $json.statusMessage }}"
},
{
"fieldId": "name",
"fieldValue": "={{ $('Count Switch').item.json.name }}"
},
{
"fieldId": "status_code",
"fieldValue": "={{ $json.error.status }}"
},
{
"fieldId": "status_message",
"fieldValue": "={{ $json.error.message }}"
},
{
"fieldId": "status_code",
"fieldValue": "={{ $json.statusCode }}"
},
{
"fieldId": "status_message",
"fieldValue": "={{ $json.statusMessage }}"
}
]
}
},
"credentials": {
"supabaseApi": {
"id": "pZQPqhLMUOZIjUsR",
"name": "Supabase account"
}
},
"typeVersion": 1
},
{
"id": "29ee050e-d4f0-4b1a-8e57-3d9d80701114",
"name": "new_lead_2",
"type": "n8n-nodes-base.httpRequest",
"onError": "continueRegularOutput",
"position": [
480,
820
],
"parameters": {
"url": "https://server.gallabox.com/devapi/messages/whatsapp",
"method": "POST",
"options": {
"response": {
"response": {
"fullResponse": true
}
}
},
"jsonBody": "=\n{\n \"channelId\": \"\",\n \"channelType\": \"whatsapp\",\n \"recipient\": {\n \"name\": \"{{ $json.name }}\",\n \"phone\": \"91{{ $json.phone }}\"\n },\n \"whatsapp\": {\n \"type\": \"template\",\n \"template\": {\n \"templateName\": \"testing_rahi_1\",\n \"bodyValues\": {\n \"Name\": \"{{ $json.name }}\",\n \"Details\": \"\"\n },\n \"buttonValues\": [\n {\n \"index\": 0,\n \"sub_type\": \"quick_reply\",\n \"parameters\": {\n \"type\": \"payload\",\n \"payload\": \"Show me Brochure\"\n }\n }\n ]\n }\n }\n}",
"sendBody": true,
"jsonHeaders": "api key and secret key",
"sendHeaders": true,
"specifyBody": "json",
"authentication": "genericCredentialType",
"specifyHeaders": "json",
"genericAuthType": "httpCustomAuth"
},
"typeVersion": 4.1
},
{
"id": "b2468e08-6c41-45e7-808d-7268fec9383c",
"name": "Update a row4",
"type": "n8n-nodes-base.supabase",
"onError": "continueRegularOutput",
"position": [
1080,
820
],
"parameters": {
"filters": {
"conditions": [
{
"keyName": "phone",
"keyValue": "={{ $json.phone }}",
"condition": "eq"
}
]
},
"tableId": "contacts_ampere",
"fieldsUi": {
"fieldValues": [
{
"fieldId": "Count",
"fieldValue": "={{ $('Loop Over Items4').item.json.Count + 1}}"
},
{
"fieldId": "last_message_sent",
"fieldValue": "={{ $('new_lead_2').item.json.headers.date }}"
}
]
},
"matchType": "allFilters",
"operation": "update"
},
"credentials": {
"supabaseApi": {
"id": "pZQPqhLMUOZIjUsR",
"name": "Supabase account"
}
},
"typeVersion": 1
},
{
"id": "1b0112e4-79c2-439c-a1dd-4c75f74abca7",
"name": "If StatusCode 202",
"type": "n8n-nodes-base.if",
"onError": "continueRegularOutput",
"position": [
860,
280
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "27a6fdac-1795-408c-92aa-4e452760a6fb",
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.status_code }}",
"rightValue": "202"
}
]
}
},
"typeVersion": 2.2
},
{
"id": "4b710624-6f6f-4237-a17b-373eb7415a2c",
"name": "If StatusCode ",
"type": "n8n-nodes-base.if",
"onError": "continueRegularOutput",
"position": [
900,
20
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "27a6fdac-1795-408c-92aa-4e452760a6fb",
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.status_code }}",
"rightValue": "202"
}
]
}
},
"typeVersion": 2.2
},
{
"id": "e6131966-9dc3-4e51-974f-d6aa37d08f8b",
"name": "If StatusCode 203",
"type": "n8n-nodes-base.if",
"onError": "continueRegularOutput",
"position": [
880,
560
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "27a6fdac-1795-408c-92aa-4e452760a6fb",
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.status_code }}",
"rightValue": "202"
}
]
}
},
"typeVersion": 2.2
},
{
"id": "99d7bb37-eae9-4b9d-a79e-589e67e70c7b",
"name": "If StatusCode 204",
"type": "n8n-nodes-base.if",
"onError": "continueRegularOutput",
"position": [
880,
820
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "27a6fdac-1795-408c-92aa-4e452760a6fb",
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.status_code }}",
"rightValue": "202"
}
]
}
},
"typeVersion": 2.2
},
{
"id": "1e108abd-0ebd-4f52-bca4-15ad2a4774cb",
"name": "If Interval",
"type": "n8n-nodes-base.if",
"onError": "continueRegularOutput",
"position": [
240,
280
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "95ba014b-f5e5-4099-b3a2-e11e032a211d",
"operator": {
"type": "number",
"operation": "gte"
},
"leftValue": "={{ $json.interval }}",
"rightValue": 0
}
]
}
},
"typeVersion": 2.2
},
{
"id": "be030bf2-f353-4e55-9107-c9c5dee53a73",
"name": "If Interval1",
"type": "n8n-nodes-base.if",
"onError": "continueRegularOutput",
"position": [
240,
580
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "afddef19-139e-4b73-93d9-1f5b2f6b5fce",
"operator": {
"type": "number",
"operation": "equals"
},
"leftValue": "={{ $json.interval }}",
"rightValue": 24
}
]
}
},
"typeVersion": 2.2
},
{
"id": "e369d33b-f9fd-496a-948d-c1a1b5b22145",
"name": "If2",
"type": "n8n-nodes-base.if",
"position": [
240,
840
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "b24fa0b1-90e4-40a0-bf96-665231f0b653",
"operator": {
"type": "number",
"operation": "gte"
},
"leftValue": "={{ $json.interval }}",
"rightValue": 24
}
]
}
},
"typeVersion": 2.2
},
{
"id": "db8e9ab0-d329-4255-82d2-18ec5b1319e2",
"name": "Disposition Switch",
"type": "n8n-nodes-base.switch",
"position": [
-820,
900
],
"parameters": {
"rules": {
"values": [
{
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "8aa7a00f-b0d2-40f5-a634-bd622a69773b",
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.Disposition }}",
"rightValue": "=new_lead"
}
]
}
},
{
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "79fda541-c45c-4cc4-b7e0-1a4defac93bf",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.Disposition }}",
"rightValue": "test_ride"
}
]
}
},
{
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "e552fd1c-27e5-460a-a8e2-805cbad62ddf",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.Disposition }}",
"rightValue": "Booking"
}
]
}
},
{
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "fdbafaa7-10bf-477f-a9a0-c35437d24095",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.Disposition }}",
"rightValue": "walk_in"
}
]
}
},
{
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "259f1095-d92f-4b69-a8c1-32db69cfcfe2",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.Disposition }}",
"rightValue": "Sale"
}
]
}
}
]
},
"options": {}
},
"typeVersion": 3.2
},
{
"id": "db51db6d-6e18-4939-88a6-52647efb20a7",
"name": "Count Switch",
"type": "n8n-nodes-base.switch",
"position": [
-300,
500
],
"parameters": {
"rules": {
"values": [
{
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "fa84be36-be05-49c9-9328-7a311b067f1a",
"operator": {
"type": "number",
"operation": "equals"
},
"leftValue": "={{ $json.Count }}",
"rightValue": 0
}
]
}
},
{
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "630a27f9-82f5-4fdc-90c5-d1f4f5554f8b",
"operator": {
"type": "number",
"operation": "equals"
},
"leftValue": "={{ $json.Count }}",
"rightValue": 1
}
]
}
},
{
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "b0bc9bf3-1215-4c79-871e-f588c5b22e82",
"operator": {
"type": "number",
"operation": "equals"
},
"leftValue": "={{ $json.Count }}",
"rightValue": 2
}
]
}
},
{
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "fa57ae02-ba8a-4479-990d-7f622263ad81",
"operator": {
"type": "number",
"operation": "equals"
},
"leftValue": "={{ $json.Count }}",
"rightValue": 3
}
]
}
}
]
},
"options": {}
},
"typeVersion": 3.2
},
{
"id": "25c332c8-5be5-4475-9301-bd748c6326e5",
"name": "new_lead_",
"type": "n8n-nodes-base.httpRequest",
"onError": "continueRegularOutput",
"position": [
480,
280
],
"parameters": {
"url": "https://server.gallabox.com/devapi/messages/whatsapp",
"method": "POST",
"options": {
"response": {
"response": {
"fullResponse": true
}
}
},
"jsonBody": "=\n{\n \"channelId\": \"\",\n \"channelType\": \"whatsapp\",\n \"recipient\": {\n \"name\": \"{{ $json.name }}\",\n \"phone\": \"91{{ $json.phone }}\"\n },\n \"whatsapp\": {\n \"type\": \"template\",\n \"template\": {\n \"templateName\": \"testing_rahi_1\",\n \"bodyValues\": {\n \"Name\": \"{{ $json.name }}\",\n \"Details\": \"\"\n },\n \"buttonValues\": [\n {\n \"index\": 0,\n \"sub_type\": \"quick_reply\",\n \"parameters\": {\n \"type\": \"payload\",\n \"payload\": \"Show me Brochure\"\n }\n }\n ]\n }\n }\n}",
"sendBody": true,
"sendHeaders": true,
"specifyBody": "json",
"authentication": "genericCredentialType",
"specifyHeaders": "json",
"genericAuthType": "httpCustomAuth"
},
"typeVersion": 4.1
},
{
"id": "a7bb131a-62cd-434c-9f2f-85ccecfd311c",
"name": "new_lead_3",
"type": "n8n-nodes-base.httpRequest",
"onError": "continueRegularOutput",
"position": [
460,
560
],
"parameters": {
"url": "https://server.gallabox.com/devapi/messages/whatsapp",
"method": "POST",
"options": {
"response": {
"response": {
"fullResponse": true
}
}
},
"jsonBody": "=\n{\n \"channelId\": \"\",\n \"channelType\": \"whatsapp\",\n \"recipient\": {\n \"name\": \"{{ $json.name }}\",\n \"phone\": \"91{{ $json.phone }}\"\n },\n \"whatsapp\": {\n \"type\": \"template\",\n \"template\": {\n \"templateName\": \"testing_rahi_1\",\n \"bodyValues\": {\n \"Name\": \"{{ $json.name }}\",\n \"Details\": \"\"\n },\n \"buttonValues\": [\n {\n \"index\": 0,\n \"sub_type\": \"quick_reply\",\n \"parameters\": {\n \"type\": \"payload\",\n \"payload\": \"Show me Brochure\"\n }\n }\n ]\n }\n }\n}",
"sendBody": true,
"jsonHeaders": "api key and api secret key",
"sendHeaders": true,
"specifyBody": "json",
"authentication": "genericCredentialType",
"specifyHeaders": "json",
"genericAuthType": "httpCustomAuth"
},
"typeVersion": 4.1
},
{
"id": "4277f565-b4fa-4c4b-8d8a-9cb43565defc",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
400,
-200
],
"parameters": {
"width": 150,
"content": "Http request if of gallabox api, that will help you to send whatsapp messages"
},
"typeVersion": 1
},
{
"id": "257a9216-8163-4c33-bd28-78b0625e319a",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-340,
280
],
"parameters": {
"width": 150,
"content": "This switch decides which drip to send means which message drip in sequence"
},
"typeVersion": 1
},
{
"id": "bc5fd705-a878-42b9-875a-1a104d01570a",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-860,
720
],
"parameters": {
"width": 150,
"content": "This Tells you about th e disposition/stage that you want to target"
},
"typeVersion": 1
}
],
"pinData": {},
"connections": {
"If2": {
"main": [
[
{
"node": "new_lead_2",
"type": "main",
"index": 0
}
]
]
},
"new_lead_": {
"main": [
[
{
"node": "Create Logs1",
"type": "main",
"index": 0
}
]
]
},
"new_lead_0": {
"main": [
[
{
"node": "Create Logs",
"type": "main",
"index": 0
}
]
]
},
"new_lead_2": {
"main": [
[
{
"node": "Create Logs3",
"type": "main",
"index": 0
}
]
]
},
"new_lead_3": {
"main": [
[
{
"node": "Create Logs2",
"type": "main",
"index": 0
}
]
]
},
"Create Logs": {
"main": [
[
{
"node": "If StatusCode ",
"type": "main",
"index": 0
}
]
]
},
"If Interval": {
"main": [
[
{
"node": "new_lead_",
"type": "main",
"index": 0
}
]
]
},
"Count Switch": {
"main": [
[
{
"node": "Loop Over Items1",
"type": "main",
"index": 0
}
],
[
{
"node": "Loop Over Items2",
"type": "main",
"index": 0
}
],
[
{
"node": "Loop Over Items3",
"type": "main",
"index": 0
}
],
[
{
"node": "Loop Over Items4",
"type": "main",
"index": 0
}
]
]
},
"Create Logs1": {
"main": [
[
{
"node": "If StatusCode 202",
"type": "main",
"index": 0
}
]
]
},
"Create Logs2": {
"main": [
[
{
"node": "If StatusCode 203",
"type": "main",
"index": 0
}
]
]
},
"Create Logs3": {
"main": [
[
{
"node": "If StatusCode 204",
"type": "main",
"index": 0
}
]
]
},
"If Interval1": {
"main": [
[
{
"node": "new_lead_3",
"type": "main",
"index": 0
}
]
]
},
"Update a row1": {
"main": [
[
{
"node": "Loop Over Items1",
"type": "main",
"index": 0
}
]
]
},
"Update a row2": {
"main": [
[
{
"node": "Loop Over Items2",
"type": "main",
"index": 0
}
]
]
},
"Update a row3": {
"main": [
[
{
"node": "Loop Over Items3",
"type": "main",
"index": 0
}
]
]
},
"Update a row4": {
"main": [
[
{
"node": "Loop Over Items4",
"type": "main",
"index": 0
}
]
]
},
"Get many rows1": {
"main": [
[
{
"node": "Disposition Switch",
"type": "main",
"index": 0
}
]
]
},
"If StatusCode ": {
"main": [
[
{
"node": "Update a row1",
"type": "main",
"index": 0
}
]
]
},
"Loop Over Items1": {
"main": [
[],
[
{
"node": "new_lead_0",
"type": "main",
"index": 0
}
]
]
},
"Loop Over Items2": {
"main": [
[],
[
{
"node": "If Interval",
"type": "main",
"index": 0
}
]
]
},
"Loop Over Items3": {
"main": [
[],
[
{
"node": "If Interval1",
"type": "main",
"index": 0
}
]
]
},
"Loop Over Items4": {
"main": [
[],
[
{
"node": "If2",
"type": "main",
"index": 0
}
]
]
},
"If StatusCode 202": {
"main": [
[
{
"node": "Update a row2",
"type": "main",
"index": 0
}
]
]
},
"If StatusCode 203": {
"main": [
[
{
"node": "Update a row3",
"type": "main",
"index": 0
}
]
]
},
"If StatusCode 204": {
"main": [
[
{
"node": "Update a row4",
"type": "main",
"index": 0
}
]
]
},
"Schedule Trigger3": {
"main": [
[
{
"node": "Get many rows1",
"type": "main",
"index": 0
}
]
]
},
"Disposition Switch": {
"main": [
[
{
"node": "Count Switch",
"type": "main",
"index": 0
}
],
[
{
"node": "Switch2",
"type": "main",
"index": 0
}
],
[
{
"node": "Switch3",
"type": "main",
"index": 0
}
],
[
{
"node": "Switch4",
"type": "main",
"index": 0
}
],
[
{
"node": "Switch5",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
高级 - 客户培育
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
基于 Supabase、Smartlead 和 Google Gemini AI 的个性化冷邮件生成器
基于 Supabase、Smartlead 和 Google Gemini AI 的个性化冷邮件生成器
If
Code
Supabase
+8
26 节点Rahi
客户培育
使用Postgres和Gallabox个性化消息的自动化WhatsApp潜在客户培育
使用Postgres和Gallabox个性化消息的自动化WhatsApp潜在客户培育
Code
Postgres
Http Request
+3
11 节点Rahi
客户培育
GPT-4驱动的冷邮件工作流,包含完全定制的3封邮件跟进
使用GPT-4、Mailgun和Supabase自动化个性化冷邮件序列
If
Set
Code
+22
100 节点Paul
客户培育
使用Apollo.io和Google表格的自动化LinkedIn潜在客户丰富管道
使用Apollo.io和Google表格的自动化LinkedIn潜在客户丰富管道
If
Code
Wait
+10
33 节点Rahi Uppal
潜在客户开发
使用Airtable、OpenAI和Unipile的自动化LinkedIn潜在客户生成与私信触达
使用Airtable、OpenAI和Unipile的自动化LinkedIn潜在客户生成与私信触达
If
Set
Code
+15
143 节点Ruben AI
客户培育
AI驱动的多渠道潜在客户触达系统 - JotForm、Gemini AI和HeyReach
基于JotForm、Gemini AI和HeyReach的AI驱动多渠道潜在客户触达系统
If
Wait
Gmail
+8
19 节点Rahi Uppal
客户培育