This workflow corresponds to n8n.io template #14816 — we link there as the canonical source.
This workflow follows the Googlegemini → Google Sheets recipe pattern — see all workflows that pair these two integrations.
The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"id": "zalo-customer-care-001",
"meta": {
"templateCredsSetupCompleted": true
},
"name": "AI customer care chatbot for Vietnamese SMEs with Zalo Bot, Gemini and Google Sheets CRM",
"tags": [],
"nodes": [
{
"id": "sticky-main",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1328,
-256
],
"parameters": {
"width": 520,
"height": 920,
"content": "## AI customer care chatbot for Vietnamese SMEs with Zalo Bot, Gemini and Google Sheets CRM\n\n### How it works\n1. The Zalo Bot Trigger receives every text message sent to your bot.\n2. The customer is looked up in Google Sheets CRM; new customers get a welcome sticker and greeting.\n3. A Switch node detects intent by keyword: menu, products, pricing, or human escalation.\n4. Known intents trigger specific handlers (text menu, product photo, pricing list, or escalation log).\n5. Unrecognized messages go to Google Gemini for a context-aware Vietnamese AI reply.\n6. Every conversation is logged to Google Sheets for review and training.\n\n### Setup steps\n- [ ] Self-hosted n8n required (community nodes cannot be installed on n8n Cloud)\n- [ ] Install community node `n8n-nodes-zalo-platform` via **Settings > Community Nodes**\n- [ ] Create a Zalo Bot via **Zalo Bot Manager** in the Zalo app to get the Bot Token\n- [ ] Create a Google Gemini credential (free tier from [Google AI Studio](https://aistudio.google.com))\n- [ ] Copy the [Google Sheets CRM template](https://docs.google.com/spreadsheets/d/1e9155FKWikWTADXWssAdYvOq7g8l3N4NvhnxQXo9EFc/edit?usp=sharing) via **File > Make a copy**\n- [ ] Create a Google Sheets credential and assign it to all Sheets nodes\n- [ ] Paste your Sheet ID into the **Set Configuration** node `googleSheetId` field\n- [ ] Update **Set Configuration** with your business name, product photo URL, pricing, and hotline\n- [ ] Activate the workflow\n\n### Customization\n- Add more intents to the Switch node (booking, refund, shipping)\n- Replace Google Sheets with Airtable, Notion, or Postgres\n- Send promotional stickers on seasonal events\n- Add business-hours check for different out-of-office replies\n- Switch Gemini for OpenAI, Claude, or a self-hosted model\n\n### Need help?\n- [Zalo Bot node setup guide](https://thenexova.com/n8n-zalo-bot-node-complete-setup-and-operations-guide/)"
},
"typeVersion": 1
},
{
"id": "sticky-step1",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-768,
-256
],
"parameters": {
"color": 7,
"width": 360,
"height": 240,
"content": "## Receive and configure\n\nThe Zalo Bot Trigger listens for incoming text messages. The Set Configuration node holds your business name, product photo, pricing, hotline, and Google Sheet ID."
},
"typeVersion": 1
},
{
"id": "sticky-step2",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-384,
-256
],
"parameters": {
"color": 7,
"width": 360,
"height": 240,
"content": "## Identify customer\n\nExtracts sender ID, name, and message text from the Zalo payload, then looks up the customer in the Google Sheets CRM by sender ID."
},
"typeVersion": 1
},
{
"id": "sticky-step3",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
0,
-256
],
"parameters": {
"color": 7,
"width": 360,
"height": 240,
"content": "## Welcome new customers\n\nIf the sender is not in the CRM yet: append a new row, send a welcome sticker, then greet with the menu options. Returning customers skip directly to intent detection."
},
"typeVersion": 1
},
{
"id": "sticky-step4",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
384,
-256
],
"parameters": {
"color": 7,
"width": 360,
"height": 240,
"content": "## Detect intent by keyword\n\nThe Switch node routes messages by Vietnamese keywords: `menu`, `san pham`, `gia`, `nguoi that`. Anything else falls through to the AI reply."
},
"typeVersion": 1
},
{
"id": "sticky-step5",
"name": "Sticky Note5",
"type": "n8n-nodes-base.stickyNote",
"position": [
768,
-256
],
"parameters": {
"color": 7,
"width": 380,
"height": 240,
"content": "## Handle known intents\n\nEach intent demonstrates a different Zalo Bot operation: `sendMessage` for menu and pricing, `sendPhoto` for product showcase, and escalation logging with acknowledgment."
},
"typeVersion": 1
},
{
"id": "sticky-step6",
"name": "Sticky Note6",
"type": "n8n-nodes-base.stickyNote",
"position": [
1168,
-256
],
"parameters": {
"color": 7,
"width": 380,
"height": 240,
"content": "## AI fallback with Gemini\n\nFor unrecognized messages, Google Gemini 2.0 Flash generates a friendly Vietnamese reply using your business context. Gemini has excellent Vietnamese support and a generous free tier."
},
"typeVersion": 1
},
{
"id": "sticky-step7",
"name": "Sticky Note7",
"type": "n8n-nodes-base.stickyNote",
"position": [
1568,
-256
],
"parameters": {
"color": 7,
"width": 380,
"height": 240,
"content": "## Reply and log conversation\n\nThe AI reply is sent back via Zalo Bot, then the full exchange is appended to the Conversations tab in Google Sheets with timestamp, intent, and reply text for later review."
},
"typeVersion": 1
},
{
"id": "sticky-sheet-template",
"name": "Sticky Note9",
"type": "n8n-nodes-base.stickyNote",
"position": [
-256,
912
],
"parameters": {
"color": 4,
"width": 760,
"height": 320,
"content": "## Google Sheets CRM template\n\n**Template URL:** https://docs.google.com/spreadsheets/d/1e9155FKWikWTADXWssAdYvOq7g8l3N4NvhnxQXo9EFc/edit?usp=sharing\n\n### Setup\n- [ ] Open the link above and **File > Make a copy**\n- [ ] Copy the Sheet ID from the URL (between `/d/` and `/edit`)\n- [ ] Paste it into the **Set Configuration** node `googleSheetId` field\n- [ ] Create a Google Sheets credential and assign it to all 4 Sheets nodes\n\n### Tabs and columns (already in the template)\n\n**Customers** tab: `senderId | name | firstSeen | lastSeen | messageCount`\n\n**Conversations** tab: `timestamp | senderId | name | messageId | message | intent | reply`\n\nThe `intent` column will be either `ai_reply` or `human_escalation` for easy filtering."
},
"typeVersion": 1
},
{
"id": "sticky-disclaimer",
"name": "Sticky Note8",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1328,
1104
],
"parameters": {
"color": 5,
"width": 520,
"content": "### Community Node - Self-hosted only\nThis template uses the `n8n-nodes-zalo-platform` community node which requires self-hosted n8n. It cannot be installed on n8n Cloud. The Zalo Bot is created via **Zalo Bot Manager** inside the Zalo app."
},
"typeVersion": 1
},
{
"id": "trigger-zalo",
"name": "Receive Zalo Message",
"type": "n8n-nodes-zalo-platform.zaloBotTrigger",
"position": [
-720,
208
],
"parameters": {
"event": "message.text.received"
},
"credentials": {
"zaloBotApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "set-config",
"name": "Set Configuration",
"type": "n8n-nodes-base.set",
"position": [
-480,
208
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "business-name",
"name": "businessName",
"type": "string",
"value": "THE NEXOVA"
},
{
"id": "hotline",
"name": "hotline",
"type": "string",
"value": "https://thenexova.com/contact"
},
{
"id": "product-photo",
"name": "productPhotoUrl",
"type": "string",
"value": "https://placehold.co/1200x630/2563eb/ffffff/png?text=THE+NEXOVA%0AAI+Chatbot+Zalo"
},
{
"id": "pricing-text",
"name": "pricingText",
"type": "string",
"value": "BAO GIA THAM KHAO THE NEXOVA\n\nGoi Khoi Dau\nTu van n8n va setup co ban, phu hop shop nho va freelancer.\n\nGoi Tang Truong\nAI Chatbot tieng Viet, CRM tu dong, workflow da kenh, phu hop SME 10 den 50 nhan vien.\n\nGoi Doanh Nghiep\nTich hop ERP/CRM, custom n8n node, SLA va ho tro uu tien, phu hop doanh nghiep lon.\n\nBao gia chi tiet tuy quy mo va nghiep vu. Vui long:\nhttps://thenexova.com/contact\nuser@example.com\nHoac go 'nguoi that' de duoc tu van ngay"
},
{
"id": "welcome-sticker",
"name": "welcomeStickerId",
"type": "string",
"value": "e0279194add1448f1dc0"
},
{
"id": "sheet-id",
"name": "googleSheetId",
"type": "string",
"value": "1e9155FKWikWTADXWssAdYvOq7g8l3N4NvhnxQXo9EFc"
},
{
"id": "admin-zalo-id",
"name": "adminZaloId",
"type": "string",
"value": "YOUR_ADMIN_ZALO_ID"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "extract-info",
"name": "Extract Customer Info",
"type": "n8n-nodes-base.set",
"position": [
-272,
208
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "sender-id",
"name": "senderId",
"type": "string",
"value": "={{ $('Receive Zalo Message').item.json.message.from.id }}"
},
{
"id": "chat-id",
"name": "chatId",
"type": "string",
"value": "={{ $('Receive Zalo Message').item.json.message.chat.id }}"
},
{
"id": "sender-name",
"name": "senderName",
"type": "string",
"value": "={{ $('Receive Zalo Message').item.json.message.from.display_name || 'Khach hang' }}"
},
{
"id": "message-text",
"name": "messageText",
"type": "string",
"value": "={{ ($('Receive Zalo Message').item.json.message.text || '').toLowerCase().trim() }}"
},
{
"id": "message-original",
"name": "messageOriginal",
"type": "string",
"value": "={{ $('Receive Zalo Message').item.json.message.text }}"
},
{
"id": "message-id",
"name": "messageId",
"type": "string",
"value": "={{ $('Receive Zalo Message').item.json.message.message_id }}"
},
{
"id": "ts",
"name": "timestamp",
"type": "string",
"value": "={{ $now.toISO() }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "lookup-customer",
"name": "Lookup Customer in CRM",
"type": "n8n-nodes-base.googleSheets",
"position": [
48,
208
],
"parameters": {
"options": {
"returnFirstMatch": true
},
"filtersUI": {
"values": [
{
"lookupValue": "={{ $json.senderId }}",
"lookupColumn": "senderId"
}
]
},
"sheetName": {
"__rl": true,
"mode": "name",
"value": "Customers"
},
"documentId": {
"__rl": true,
"mode": "id",
"value": "={{ $('Set Configuration').item.json.googleSheetId }}"
},
"authentication": "serviceAccount"
},
"credentials": {
"googleApi": {
"name": "<your credential>"
}
},
"typeVersion": 4.5,
"alwaysOutputData": true
},
{
"id": "if-new-customer",
"name": "Is New Customer?",
"type": "n8n-nodes-base.if",
"position": [
432,
208
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "loose"
},
"combinator": "and",
"conditions": [
{
"id": "is-new",
"operator": {
"type": "string",
"operation": "empty",
"singleValue": true
},
"leftValue": "={{ $json.senderId }}",
"rightValue": ""
}
]
}
},
"typeVersion": 2.2
},
{
"id": "append-customer",
"name": "Append New Customer",
"type": "n8n-nodes-base.googleSheets",
"position": [
800,
64
],
"parameters": {
"columns": {
"value": {
"name": "={{ $('Extract Customer Info').item.json.senderName }}",
"lastSeen": "={{ $('Extract Customer Info').item.json.timestamp }}",
"senderId": "={{ $('Extract Customer Info').item.json.senderId }}",
"firstSeen": "={{ $('Extract Customer Info').item.json.timestamp }}",
"messageCount": 1
},
"schema": [
{
"id": "senderId",
"type": "string",
"displayName": "senderId"
},
{
"id": "name",
"type": "string",
"displayName": "name"
},
{
"id": "firstSeen",
"type": "string",
"displayName": "firstSeen"
},
{
"id": "lastSeen",
"type": "string",
"displayName": "lastSeen"
},
{
"id": "messageCount",
"type": "number",
"displayName": "messageCount"
}
],
"mappingMode": "defineBelow",
"matchingColumns": []
},
"options": {},
"operation": "append",
"sheetName": {
"__rl": true,
"mode": "name",
"value": "Customers"
},
"documentId": {
"__rl": true,
"mode": "id",
"value": "={{ $('Set Configuration').item.json.googleSheetId }}"
},
"authentication": "serviceAccount"
},
"credentials": {
"googleApi": {
"name": "<your credential>"
}
},
"typeVersion": 4.5
},
{
"id": "send-welcome-sticker",
"name": "Send Welcome Sticker",
"type": "n8n-nodes-zalo-platform.zaloBot",
"position": [
1104,
64
],
"parameters": {
"chatId": "={{ $('Extract Customer Info').item.json.chatId }}",
"operation": "sendSticker",
"stickerId": "={{ $('Set Configuration').item.json.welcomeStickerId }}"
},
"credentials": {
"zaloBotApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "send-welcome-message",
"name": "Send Welcome Message",
"type": "n8n-nodes-zalo-platform.zaloBot",
"position": [
1520,
32
],
"parameters": {
"text": "=Xin chao {{ $('Extract Customer Info').item.json.senderName }}!\n\nCam on ban da lien he THE NEXOVA, doi tac tu dong hoa va AI cho doanh nghiep Viet.\n\nBan co the chon:\n- Go 'menu' de xem dich vu chinh\n- Go 'san pham' de xem giai phap tieu bieu\n- Go 'gia' de xem bao gia tham khao\n- Go 'nguoi that' de gap tu van vien\n\nHoac cu hoi tu nhien, tro ly AI cua THE NEXOVA se tra loi ngay bang tieng Viet!\n\nhttps://thenexova.com",
"chatId": "={{ $('Extract Customer Info').item.json.chatId }}"
},
"credentials": {
"zaloBotApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "switch-intent",
"name": "Detect Intent",
"type": "n8n-nodes-base.switch",
"position": [
800,
624
],
"parameters": {
"rules": {
"values": [
{
"outputKey": "menu",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": false,
"typeValidation": "strict"
},
"combinator": "or",
"conditions": [
{
"id": "menu-0",
"operator": {
"type": "string",
"operation": "contains"
},
"leftValue": "={{ $json.messageText }}",
"rightValue": "menu"
},
{
"id": "menu-1",
"operator": {
"type": "string",
"operation": "contains"
},
"leftValue": "={{ $json.messageText }}",
"rightValue": "menu chinh"
},
{
"id": "menu-2",
"operator": {
"type": "string",
"operation": "contains"
},
"leftValue": "={{ $json.messageText }}",
"rightValue": "dich vu"
},
{
"id": "menu-3",
"operator": {
"type": "string",
"operation": "contains"
},
"leftValue": "={{ $json.messageText }}",
"rightValue": "dich vu"
}
]
},
"renameOutput": true
},
{
"outputKey": "products",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": false,
"typeValidation": "strict"
},
"combinator": "or",
"conditions": [
{
"id": "products-0",
"operator": {
"type": "string",
"operation": "contains"
},
"leftValue": "={{ $json.messageText }}",
"rightValue": "san pham"
},
{
"id": "products-1",
"operator": {
"type": "string",
"operation": "contains"
},
"leftValue": "={{ $json.messageText }}",
"rightValue": "product"
},
{
"id": "products-2",
"operator": {
"type": "string",
"operation": "contains"
},
"leftValue": "={{ $json.messageText }}",
"rightValue": "san pham"
},
{
"id": "products-3",
"operator": {
"type": "string",
"operation": "contains"
},
"leftValue": "={{ $json.messageText }}",
"rightValue": "demo"
},
{
"id": "products-4",
"operator": {
"type": "string",
"operation": "contains"
},
"leftValue": "={{ $json.messageText }}",
"rightValue": "giai phap"
}
]
},
"renameOutput": true
},
{
"outputKey": "pricing",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": false,
"typeValidation": "strict"
},
"combinator": "or",
"conditions": [
{
"id": "pricing-0",
"operator": {
"type": "string",
"operation": "contains"
},
"leftValue": "={{ $json.messageText }}",
"rightValue": "gia"
},
{
"id": "pricing-1",
"operator": {
"type": "string",
"operation": "contains"
},
"leftValue": "={{ $json.messageText }}",
"rightValue": "price"
},
{
"id": "pricing-2",
"operator": {
"type": "string",
"operation": "contains"
},
"leftValue": "={{ $json.messageText }}",
"rightValue": "gia"
},
{
"id": "pricing-3",
"operator": {
"type": "string",
"operation": "contains"
},
"leftValue": "={{ $json.messageText }}",
"rightValue": "bao gia"
},
{
"id": "pricing-4",
"operator": {
"type": "string",
"operation": "contains"
},
"leftValue": "={{ $json.messageText }}",
"rightValue": "bao gia"
},
{
"id": "pricing-5",
"operator": {
"type": "string",
"operation": "contains"
},
"leftValue": "={{ $json.messageText }}",
"rightValue": "chi phi"
}
]
},
"renameOutput": true
},
{
"outputKey": "human",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": false,
"typeValidation": "strict"
},
"combinator": "or",
"conditions": [
{
"id": "human-0",
"operator": {
"type": "string",
"operation": "contains"
},
"leftValue": "={{ $json.messageText }}",
"rightValue": "nguoi that"
},
{
"id": "human-1",
"operator": {
"type": "string",
"operation": "contains"
},
"leftValue": "={{ $json.messageText }}",
"rightValue": "human"
},
{
"id": "human-2",
"operator": {
"type": "string",
"operation": "contains"
},
"leftValue": "={{ $json.messageText }}",
"rightValue": "nguoi that"
},
{
"id": "human-3",
"operator": {
"type": "string",
"operation": "contains"
},
"leftValue": "={{ $json.messageText }}",
"rightValue": "tu van"
},
{
"id": "human-4",
"operator": {
"type": "string",
"operation": "contains"
},
"leftValue": "={{ $json.messageText }}",
"rightValue": "lien he"
},
{
"id": "human-5",
"operator": {
"type": "string",
"operation": "contains"
},
"leftValue": "={{ $json.messageText }}",
"rightValue": "lien he"
},
{
"id": "human-6",
"operator": {
"type": "string",
"operation": "contains"
},
"leftValue": "={{ $json.messageText }}",
"rightValue": "hotro"
},
{
"id": "human-7",
"operator": {
"type": "string",
"operation": "contains"
},
"leftValue": "={{ $json.messageText }}",
"rightValue": "ho tro"
}
]
},
"renameOutput": true
}
]
},
"options": {
"fallbackOutput": "extra",
"renameFallbackOutput": "ai"
}
},
"typeVersion": 3.2
},
{
"id": "send-menu",
"name": "Send Menu",
"type": "n8n-nodes-zalo-platform.zaloBot",
"position": [
1184,
224
],
"parameters": {
"text": "=DICH VU THE NEXOVA\n\nTHE NEXOVA giup doanh nghiep Viet tiet kiem 40 den 80% thoi gian van hanh nho tu dong hoa va AI.\n\nDich vu tieu bieu:\n1. Tu van va trien khai n8n\n2. AI Chatbot tieng Viet cho Zalo, Messenger, Web\n3. Phat trien n8n community node theo yeu cau (Firecrawl, Zalo Bot, OpenRouter...)\n4. Tu dong hoa CRM, marketing, thuong mai dien tu\n5. Giam sat doi thu va phan tich canh tranh\n\nTiep theo:\n- Go 'san pham' de xem giai phap chi tiet\n- Go 'gia' de nhan bao gia tham khao\n- Go 'nguoi that' de duoc tu van mien phi\n\nhttps://thenexova.com/contact",
"chatId": "={{ $('Extract Customer Info').item.json.chatId }}"
},
"credentials": {
"zaloBotApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "send-product-photo",
"name": "Send Product Photo",
"type": "n8n-nodes-zalo-platform.zaloBot",
"position": [
1184,
384
],
"parameters": {
"photo": "={{ $('Set Configuration').item.json.productPhotoUrl }}",
"chatId": "={{ $('Extract Customer Info').item.json.chatId }}",
"caption": "=Giai phap AI Chatbot Zalo cua THE NEXOVA\n\nCham soc khach hang 24/7 bang tieng Viet tu nhien. Tich hop CRM Google Sheets, phat hien y dinh, leo thang sang nhan vien that khi can.\n\nDay cung chinh la chatbot ban dang tro chuyen cung!\n\nTinh nang chinh:\n- Hieu tieng Viet co dau\n- Luu lich su khach hang tu dong\n- Bao gia, demo san pham, gui sticker\n- Mo rong de dang cho Web, Messenger, Telegram\n\nBao gia: go 'gia'\nTu van: go 'nguoi that'\n\nhttps://thenexova.com",
"operation": "sendPhoto"
},
"credentials": {
"zaloBotApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "send-pricing",
"name": "Send Pricing",
"type": "n8n-nodes-zalo-platform.zaloBot",
"position": [
1184,
544
],
"parameters": {
"text": "={{ $('Set Configuration').item.json.pricingText }}",
"chatId": "={{ $('Extract Customer Info').item.json.chatId }}"
},
"credentials": {
"zaloBotApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "log-escalation",
"name": "Log Escalation",
"type": "n8n-nodes-base.googleSheets",
"position": [
1184,
704
],
"parameters": {
"columns": {
"value": {
"name": "={{ $('Extract Customer Info').item.json.senderName }}",
"reply": "Da chuyen cho nhan vien",
"intent": "human_escalation",
"message": "={{ $('Extract Customer Info').item.json.messageOriginal }}",
"senderId": "={{ $('Extract Customer Info').item.json.senderId }}",
"messageId": "={{ $('Extract Customer Info').item.json.messageId }}",
"timestamp": "={{ $('Extract Customer Info').item.json.timestamp }}"
},
"schema": [
{
"id": "timestamp",
"type": "string",
"displayName": "timestamp"
},
{
"id": "senderId",
"type": "string",
"displayName": "senderId"
},
{
"id": "name",
"type": "string",
"displayName": "name"
},
{
"id": "messageId",
"type": "string",
"displayName": "messageId"
},
{
"id": "message",
"type": "string",
"displayName": "message"
},
{
"id": "intent",
"type": "string",
"displayName": "intent"
},
{
"id": "reply",
"type": "string",
"displayName": "reply"
}
],
"mappingMode": "defineBelow",
"matchingColumns": []
},
"options": {},
"operation": "append",
"sheetName": {
"__rl": true,
"mode": "name",
"value": "Conversations"
},
"documentId": {
"__rl": true,
"mode": "id",
"value": "={{ $('Set Configuration').item.json.googleSheetId }}"
},
"authentication": "serviceAccount"
},
"credentials": {
"googleApi": {
"name": "<your credential>"
}
},
"typeVersion": 4.5
},
{
"id": "send-escalation-ack",
"name": "Acknowledge Escalation",
"type": "n8n-nodes-zalo-platform.zaloBot",
"position": [
1488,
704
],
"parameters": {
"text": "=Cam on {{ $('Extract Customer Info').item.json.senderName }}!\n\nYeu cau cua ban da duoc chuyen den doi ngu THE NEXOVA. Tu van vien se lien he trong vong 15 phut (gio lam viec 8h den 18h, T2 den T6).\n\nTrong luc cho, ban co the tham khao:\nWebsite: https://thenexova.com\nEmail: contact@thenexova.com\nForm lien he: https://thenexova.com/contact\n\nTHE NEXOVA, dong hanh tu dong hoa cho doanh nghiep Viet",
"chatId": "={{ $('Extract Customer Info').item.json.chatId }}"
},
"credentials": {
"zaloBotApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "ai-reply",
"name": "Gemini AI Reply",
"type": "@n8n/n8n-nodes-langchain.googleGemini",
"position": [
1184,
880
],
"parameters": {
"modelId": {
"__rl": true,
"mode": "list",
"value": "models/gemini-2.0-flash"
},
"options": {},
"messages": {
"values": [
{
"content": "=Ban la tro ly cham soc khach hang chuyen nghiep cua THE NEXOVA, doi tac tu dong hoa va AI cho doanh nghiep Viet Nam.\n\nQuy tac tra loi:\n1. Bang tieng Viet co dau, than thien, ngan gon (toi da 150 tu)\n2. Khi phu hop, goi y dich vu THE NEXOVA: tu van n8n, AI Chatbot tieng Viet, tu dong hoa quy trinh, custom n8n community node\n3. Neu khach hoi ve gia, goi y go 'gia'\n4. Neu khach muon xem demo san pham, goi y go 'san pham'\n5. Neu khong chac cau tra loi, huong dan khach:\n - Website: https://thenexova.com\n - Email: contact@thenexova.com\n - Form lien he: https://thenexova.com/contact\n - Hoac go 'nguoi that' de gap tu van vien\n\nCau hoi tu khach hang ten {{ $('Extract Customer Info').item.json.senderName }}:\n{{ $json.messageOriginal }}"
}
]
}
},
"credentials": {
"googlePalmApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "send-ai-reply",
"name": "Send AI Reply",
"type": "n8n-nodes-zalo-platform.zaloBot",
"position": [
1488,
880
],
"parameters": {
"text": "={{ $json.content.parts[0].text }}",
"chatId": "={{ $('Extract Customer Info').item.json.chatId }}"
},
"credentials": {
"zaloBotApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "log-conversation",
"name": "Log Conversation",
"type": "n8n-nodes-base.googleSheets",
"position": [
1792,
880
],
"parameters": {
"columns": {
"value": {
"name": "={{ $('Extract Customer Info').item.json.senderName }}",
"reply": "={{ $('Gemini AI Reply').item.json.content.parts[0].text }}",
"intent": "ai_reply",
"message": "={{ $('Extract Customer Info').item.json.messageOriginal }}",
"senderId": "={{ $('Extract Customer Info').item.json.senderId }}",
"messageId": "={{ $('Extract Customer Info').item.json.messageId }}",
"timestamp": "={{ $('Extract Customer Info').item.json.timestamp }}"
},
"schema": [
{
"id": "timestamp",
"type": "string",
"display": true,
"required": false,
"displayName": "timestamp",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "senderId",
"type": "string",
"display": true,
"required": false,
"displayName": "senderId",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "name",
"type": "string",
"display": true,
"required": false,
"displayName": "name",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "messageId",
"type": "string",
"display": true,
"required": false,
"displayName": "messageId",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "message",
"type": "string",
"display": true,
"required": false,
"displayName": "message",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "intent",
"type": "string",
"display": true,
"required": false,
"displayName": "intent",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "reply",
"type": "string",
"display": true,
"required": false,
"displayName": "reply",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "append",
"sheetName": {
"__rl": true,
"mode": "name",
"value": "Conversations"
},
"documentId": {
"__rl": true,
"mode": "id",
"value": "={{ $('Set Configuration').item.json.googleSheetId }}"
},
"authentication": "serviceAccount"
},
"credentials": {
"googleApi": {
"name": "<your credential>"
}
},
"typeVersion": 4.5
},
{
"id": "b38fdc25-3e79-43d7-97b2-5ccc921eb680",
"name": "Listen Welcome Reply",
"type": "n8n-nodes-zalo-platform.zaloBot",
"position": [
1712,
64
],
"parameters": {
"operation": "getUpdates"
},
"credentials": {
"zaloBotApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "normalize-listen",
"name": "Normalize After Listen",
"type": "n8n-nodes-base.set",
"position": [
1984,
64
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "msg-text",
"name": "messageText",
"type": "string",
"value": "={{ ($json.message?.text || $json.result?.[0]?.message?.text || '').toLowerCase().trim() }}"
},
{
"id": "msg-orig",
"name": "messageOriginal",
"type": "string",
"value": "={{ $json.message?.text || $json.result?.[0]?.message?.text || '' }}"
},
{
"id": "msg-source",
"name": "messageSource",
"type": "string",
"value": "welcome_reply"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "normalize-return",
"name": "Normalize Returning",
"type": "n8n-nodes-base.set",
"position": [
800,
464
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "msg-text",
"name": "messageText",
"type": "string",
"value": "={{ $('Extract Customer Info').item.json.messageText }}"
},
{
"id": "msg-orig",
"name": "messageOriginal",
"type": "string",
"value": "={{ $('Extract Customer Info').item.json.messageOriginal }}"
},
{
"id": "msg-source",
"name": "messageSource",
"type": "string",
"value": "first_message"
}
]
}
},
"typeVersion": 3.4
}
],
"active": false,
"settings": {
"binaryMode": "separate",
"executionOrder": "v1"
},
"versionId": "a2c0b743-16ec-4f6f-97c5-5d85e74cc607",
"connections": {
"Detect Intent": {
"main": [
[
{
"node": "Send Menu",
"type": "main",
"index": 0
}
],
[
{
"node": "Send Product Photo",
"type": "main",
"index": 0
}
],
[
{
"node": "Send Pricing",
"type": "main",
"index": 0
}
],
[
{
"node": "Log Escalation",
"type": "main",
"index": 0
}
],
[
{
"node": "Gemini AI Reply",
"type": "main",
"index": 0
}
]
]
},
"Send AI Reply": {
"main": [
[
{
"node": "Log Conversation",
"type": "main",
"index": 0
}
]
]
},
"Log Escalation": {
"main": [
[
{
"node": "Acknowledge Escalation",
"type": "main",
"index": 0
}
]
]
},
"Gemini AI Reply": {
"main": [
[
{
"node": "Send AI Reply",
"type": "main",
"index": 0
}
]
]
},
"Is New Customer?": {
"main": [
[
{
"node": "Append New Customer",
"type": "main",
"index": 0
}
],
[
{
"node": "Normalize Returning",
"type": "main",
"index": 0
}
]
]
},
"Set Configuration": {
"main": [
[
{
"node": "Extract Customer Info",
"type": "main",
"index": 0
}
]
]
},
"Append New Customer": {
"main": [
[
{
"node": "Send Welcome Sticker",
"type": "main",
"index": 0
}
]
]
},
"Normalize Returning": {
"main": [
[
{
"node": "Detect Intent",
"type": "main",
"index": 0
}
]
]
},
"Listen Welcome Reply": {
"main": [
[
{
"node": "Normalize After Listen",
"type": "main",
"index": 0
}
]
]
},
"Receive Zalo Message": {
"main": [
[
{
"node": "Set Configuration",
"type": "main",
"index": 0
}
]
]
},
"Send Welcome Message": {
"main": [
[
{
"node": "Listen Welcome Reply",
"type": "main",
"index": 0
}
]
]
},
"Send Welcome Sticker": {
"main": [
[
{
"node": "Send Welcome Message",
"type": "main",
"index": 0
}
]
]
},
"Extract Customer Info": {
"main": [
[
{
"node": "Lookup Customer in CRM",
"type": "main",
"index": 0
}
]
]
},
"Lookup Customer in CRM": {
"main": [
[
{
"node": "Is New Customer?",
"type": "main",
"index": 0
}
]
]
},
"Normalize After Listen": {
"main": [
[
{
"node": "Detect Intent",
"type": "main",
"index": 0
}
]
]
}
}
}
Credentials you'll need
Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.
googleApigooglePalmApizaloBotApi
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
A production ready Zalo Bot chatbot that handles the full customer journey for Vietnamese small and medium businesses: greeting new customers with a sticker, listening for their first reply, routing the message to the right handler, generating AI fallback answers in Vietnamese,…
Source: https://n8n.io/workflows/14816/ — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
This n8n template automates the identification & optimisation of Answer Engine Optimisation (AEO) opportunities by extracting Google "People Also Ask" (PAA) data to generate high-authority response sn
Eliminate 90% of manual work in procurement by automating quote requests, response tracking, price extraction, and supplier follow-ups. This complete automation handles everything from sending persona
This workflow allows users to ask portfolio-related questions in a simple format (). It validates the input, fetches client data and holdings from Google Sheets, retrieves live market prices via API,
This n8n template demonstrates how to automate email classification, labeling, draft generation, and logging using Gmail, OpenAI, and Google Sheets. Use cases include customer support management, sale
Transform your Gmail sent folder into a comprehensive, enriched contact database automatically. This workflow processes hundreds or thousands of sent emails, extracting and enriching contact informati