Today’s businesses use AI extensively for customer support automation. However, AI isn’t infallible — there will always be scenarios requiring human oversight.
In this article, we’ll explore how you can create a robust workflow in n8n that leverages Wassenger for WhatsApp automation, OpenAI’s Chat models, and seamlessly escalates to human assistance via Slack when necessary.
👉 Disconver our new feature flows to transform your customer service today! ⚡
⚙️ What you’ll learn:
- Setting up Wassenger with n8n
- Integrating the OpenAI Chat model in your n8n workflow
- Creating dynamic AI agent system messages for defined agent behaviours
- Designing an escalation path to human agents using Slack
🚀 Tools we’ll use:
- Wassenger: WhatsApp automation platform (Flows)
- OpenAI: AI-powered chat completion API
- Slack: A Team communication tool for human escalation
👉 Start your 7-day free trial on Wassenger and leverage our powerful WhatsApp automation flows to transform your customer service today! ⚡
🔧 Step-by-Step Guide:
✅ Step 1: Setting Up Wassenger Trigger
- Connect your Wassenger account to n8n.
- Configure a Wassenger trigger node to initiate workflows upon receiving WhatsApp messages.
✅ Step 2: Adding OpenAI Chat Model
- Integrate the OpenAI node in n8n.
- Set your OpenAI credentials.
- Configure the AI node to receive messages from Wassenger and generate responses.
✅ Step 3: Configure the AI Agent (Custom Behaviour)
- Create a clear and precise system prompt that defines the tasks the AI agent can and cannot handle (as provided earlier).
- Configure the AI agent node in n8n to use this system prompt for precise and relevant interactions.
Here you can find a sample message we used that you can modify with your own business information
You are an AI-powered Wassenger Customer Support Agent. Your primary role is to assist users by clearly, precisely, and politely answering questions related to the Wassenger platform, its API, integrations, configurations, usage instructions, and best practices.
Your tone must always be friendly, helpful, and professional.
🚩 Tasks you CAN perform: ✅ General Information:
Explain Wassenger features and functionalities clearly.
Assist users navigating through the Wassenger interface and options.
Provide clear guidance on how to use Wassenger’s API endpoints, with examples.
✅ Integrations:
Explain how Wassenger integrates with other services such as n8n, Zapier, Make, Google Sheets, CRMs, etc.
Guide users on creating automated workflows and custom integrations.
✅ Troubleshooting:
Provide solutions for common usage issues, such as connection or session problems.
Guide on best practices for avoiding common issues, such as WhatsApp number bans.
✅ Documentation and Tutorials:
Direct users to specific help-center articles and documentation.
Provide code snippets and configuration examples as documented officially.
✅ Platform Configuration:
Explain features such as chat assignment, labels, quick replies, automatic responses, etc.
Help users set up and manage departments, roles, permissions, and team settings.
🚫 Tasks you CANNOT perform (Always escalate to human agents): If users ask questions in these categories, kindly inform them clearly and politely that their request needs to be escalated to a human agent:
⚠️ Billing and Payments:
Issues with payments, invoices, refunds, cancellations, payment method changes, upgrades, downgrades, or subscription modifications.
Example reply:
"I see your query relates to billing and payments. I'm unable to access or handle payment information for security reasons. I'll escalate your request to our human support team who will assist you shortly."
⚠️ Account Ownership and Personal Data:
Changes to account ownership or sensitive data (emails, passwords, phone number transfers).
Personal data removal, export requests (GDPR-related), or account deletion.
Example reply:
"For privacy and security reasons, I can't manage personal data or account ownership requests. Let me forward your request to our support team who will help you further."
⚠️ Legal & Compliance:
GDPR and compliance-related questions or data privacy queries.
Requests related to terms of service, legal contracts, NDAs, or compliance documentation.
Example reply:
"Your question about legal or compliance topics requires specialized attention. I will escalate your request to our compliance team to assist you better."
⚠️ Advanced Technical Issues (that exceed documented knowledge):
Complex system issues, recurring API errors unexplained by standard troubleshooting steps.
Example reply:
"Your issue seems to require an in-depth technical investigation. I'll escalate this to our technical team so they can thoroughly review and assist you."
⚠️ Urgent and Business-critical Issues:
Issues that are identified by users as critical to their business operations.
Example reply:
"Given the urgency and importance of your issue, I will forward your query immediately to our dedicated support team who will reach out to you shortly."
🎯 General Escalation Procedure: Clearly state why you cannot assist.
Politely assure the user that their query will be addressed promptly by a human.
Immediately escalate the user's issue to the appropriate Wassenger team or support queue.
- When scalating the message take the info from {{ $('Wassenger Trigger').item.json.data.body }} content
✅ Step 4: Adding Simple Memory
- Include the “Simple Memory” node to store and retrieve conversation context, ensuring coherent interactions.
✅ Step 5: Human Escalation Using Custom Tool Workflow
- If the AI is uncertain about a user’s request, we trigger a sub-workflow.
- Set up a conditional logic node to determine if user details (like email) are provided.
✅ Step 6: Slack Integration for Human Assistance
- Use a Slack node to notify human support teams with critical details (user query, contact information).
- Prompt the user to provide their email address if it has not already been supplied.
👉 Start your 7-day free trial on Wassenger and leverage our powerful WhatsApp automation flows to transform your customer service today! ⚡
📐 Detailed Walkthrough of the Sub-workflow
Explain clearly how your sub-workflow works, including:
- Checking if an email is provided.
- Sending prompts to users if the email is missing.
- Alerting human agents in Slack clearly and informatively.
- Confirming escalation messages and user notifications.
📷 Workflow (Included JSON)
{
"name": "Ask a human for help when the AI doesn't know the answer",
"nodes": [
{
"parameters": {
"content": "### Main workflow: AI agent using custom tool",
"height": 486.5625,
"width": 927.5,
"color": 7
},
"id": "48f18cda-7baf-4c63-9c48-b27236ec009d",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [0, 0],
"typeVersion": 1
},
{
"parameters": {
"content": "**This tool calls the sub-workflow below**",
"height": 179,
"width": 297,
"color": 5
},
"id": "8102f76d-9d93-4754-9eb2-73a87f24204e",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [560, 240],
"typeVersion": 1
},
{
"parameters": {
"content": "**Set your credentials**",
"height": 213.44323866265472,
"width": 150,
"color": 2
},
"id": "1e3fbc3a-c7fc-4046-8b31-bc1e2880b522",
"name": "Sticky Note5",
"type": "n8n-nodes-base.stickyNote",
"position": [200, 220],
"typeVersion": 1
},
{
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini"
},
"options": {}
},
"id": "6a39707e-db29-4590-b1c8-ca2e18c7c61b",
"name": "OpenAI Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [240, 300],
"typeVersion": 1.2,
"credentials": {
"openAiApi": {
"id": "id_number",
"name": "OpenAi account 13"
}
}
},
{
"parameters": {
"sessionIdType": "customKey",
"sessionKey": "={{ $('Wassenger Trigger') }}",
"contextWindowLength": 20
},
"id": "c63f495c-ec2a-4ccc-92db-89f2649fad26",
"name": "Simple Memory",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"position": [420, 300],
"typeVersion": 1.3
},
{
"parameters": {
"name": "dont_know_tool",
"description": "Use this tool if you don't know the answer to the user's question, or if you're not very confident about your answer.",
"workflowId": {
"__rl": true,
"value": "CotpNRS12t1hzys2",
"mode": "list",
"cachedResultName": "My Sub-Workflow 1"
},
"workflowInputs": {
"mappingMode": "defineBelow",
"value": {},
"matchingColumns": [],
"schema": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
}
},
"id": "4ef494b9-439b-4857-9a90-96e9a542af86",
"name": "Not sure?",
"type": "@n8n/n8n-nodes-langchain.toolWorkflow",
"position": [620, 260],
"typeVersion": 2
},
{
"parameters": {
"promptType": "define",
"text": "={{ $('Wassenger Trigger') }}",
"options": {
"systemMessage": "=You are an AI-powered Wassenger Customer Support Agent.Your primary role is to assist users by clearly, precisely, and politely answering questions related to the Wassenger platform, its API, integrations, configurations, usage instructions, and best practices.\n\nYour tone must always be friendly, helpful, and professional.\n\n🚩 Tasks you CAN perform:\n✅ General Information:\n\nExplain Wassenger features and functionalities clearly.\n\nAssist users navigating through the Wassenger interface and options.\n\nProvide clear guidance on how to use Wassenger’s API endpoints, with examples.\n\n✅ Integrations:\n\nExplain how Wassenger integrates with other services such as n8n, Zapier, Make, Google Sheets, CRMs, etc.\n\nGuide users on creating automated workflows and custom integrations.\n\n✅ Troubleshooting:\n\nProvide solutions for common usage issues, such as connection or session problems.\n\nGuide on best practices for avoiding common issues, such as WhatsApp number bans.\n\n✅ Documentation and Tutorials:\n\nDirect users to specific help-center articles and documentation.\n\nProvide code snippets and configuration examples as documented officially.\n\n✅ Platform Configuration:\n\nExplain features such as chat assignment, labels, quick replies, automatic responses, etc.\n\nHelp users set up and manage departments, roles, permissions, and team settings.\n\n🚫 Tasks you CANNOT perform(Always escalate to human agents):\nIf users ask questions in these categories, kindly inform them clearly and politely that their request needs to be escalated to a human agent:\n\n⚠️ Billing and Payments:\n\nIssues with payments, invoices, refunds, cancellations, payment method changes, upgrades, downgrades, or subscription modifications.\n\nExample reply:\n\n\"I see your query relates to billing and payments.I'm unable to access or handle payment information for security reasons.I'll escalate your request to our human support team who will assist you shortly.\"\n\n⚠️ Account Ownership and Personal Data:\n\nChanges to account ownership or sensitive data(emails, passwords, phone number transfers).\n\nPersonal data removal, export requests(GDPR-related), or account deletion.\n\nExample reply:\n\n\"For privacy and security reasons, I can't manage personal data or account ownership requests.Let me forward your request to our support team who will help you further.\"\n\n⚠️ Legal & Compliance:\n\nGDPR and compliance-related questions or data privacy queries.\n\nRequests related to terms of service, legal contracts, NDAs, or compliance documentation.\n\nExample reply:\n\n\"Your question about legal or compliance topics requires specialized attention.I will escalate your request to our compliance team to assist you better.\"\n\n⚠️ Advanced Technical Issues(that exceed documented knowledge):\n\nComplex system issues, recurring API errors unexplained by standard troubleshooting steps.\n\nExample reply:\n\n\"Your issue seems to require an in-depth technical investigation.I'll escalate this to our technical team so they can thoroughly review and assist you.\"\n\n⚠️ Urgent and Business-critical Issues:\n\nIssues that are identified by users as critical to their business operations.\n\nExample reply:\n\n\"Given the urgency and importance of your issue, I will forward your query immediately to our dedicated support team who will reach out to you shortly.\"\n\n🎯 General Escalation Procedure:\nClearly state why you cannot assist.\n\nPolitely assure the user that their query will be addressed promptly by a human.\n\nImmediately escalate the user's issue to the appropriate Wassenger team or support queue.\n\n- When scalating the message take the info from {{ $('Wassenger Trigger').item.json.data.body }} content\n\n"
}
},
"id": "0cf88611-4e6f-4b7e-b7f2-0d121b6a12b0",
"name": "AI Agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [300, 60],
"typeVersion": 1.8
},
{
"parameters": {
"device": "device_id",
"events": ["message:in:new"],
"sampleEvent": "inbound-text"
},
"type": "n8n-nodes-wassenger.wassengerTrigger",
"typeVersion": 1,
"position": [80, 60],
"id": "b35532e3-7e3b-443b-bb37-9e06dba415c7",
"name": "Wassenger Trigger",
"webhookId": "3ab2aa49-81f1-40b8-942d-151861217f5b",
"credentials": {
"wassengerApiKey": {
"id": "api_key",
"name": "Wassenger Key account 9"
}
}
},
{
"parameters": {
"content": "### Sub-workflow: Custom tool\nThe agent above can call this workflow.It checks if the user has supplied an email address.If they haven't it prompts them to provide one.If they have, it messages a customer support channel for help.",
"height": 775.3931210698682,
"width": 1118.3459011229047,
"color": 7
},
"id": "b40a664b-0b76-4201-9b52-b35d7608063a",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [0, 500],
"typeVersion": 1
},
{
"parameters": {
"content": "**Set your credentials and Slack details**",
"height": 250.57252651663197,
"width": 178.0499248677781,
"color": 2
},
"id": "d6901508-7d25-4a79-a569-94dd1a0ca064",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [520, 700],
"typeVersion": 1
},
{
"parameters": {
"content": "## Next steps\n\nLearn more about [Advanced AI in n8n](https://docs.n8n.io/advanced-ai/)",
"height": 145
},
"id": "bcf8c374-c209-40ab-b5cc-5b73fbc27eaa",
"name": "Sticky Note6",
"type": "n8n-nodes-base.stickyNote",
"position": [820, 1060],
"typeVersion": 1
},
{
"parameters": {
"workflowInputs": {
"values": [
{
"name": "chatInput"
}
]
}
},
"id": "be94ed3b-5f7c-4693-a1c2-152a8128d576",
"name": "When Executed by Another Workflow",
"type": "n8n-nodes-base.executeWorkflowTrigger",
"position": [100, 900],
"typeVersion": 1.1
},
{
"parameters": {
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "e6dce436-5e85-4722-a7e4-0ceb940a5477",
"operator": {
"type": "string",
"operation": "regex"
},
"leftValue": "={{ $('When Executed by Another Workflow').item.json.chatInput }}",
"rightValue": "=/([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\\.[a-zA-Z0-9_-]+)/gi"
}
]
},
"options": {}
},
"id": "f5f4bf5f-0553-4077-9009-35358352bd07",
"name": "Check if user has provided email",
"type": "n8n-nodes-base.if",
"position": [280, 900],
"typeVersion": 2.2
},
{
"parameters": {
"select": "channel",
"channelId": {
"__rl": true,
"mode": "name",
"value": "#general"
},
"text": "={{ \"A user had a question the bot couldn't answer.Here's their message: \" + $('When Executed by Another Workflow').first().json.chatInput }}",
"otherOptions": {}
},
"id": "933b12ce-69c0-4a2d-87a7-b13ca1c21a9d",
"name": "Message Slack for help",
"type": "n8n-nodes-base.slack",
"position": [560, 780],
"webhookId": "c54bea4c-bdb6-4f42-9f82-525857df5a9a",
"typeVersion": 2.3
},
{
"parameters": {
"jsCode": "const response = {\"response\": \"Thank you for getting in touch.I've messaged a human to help.\"}\nreturn response;"
},
"id": "2e1e9918-584f-4787-b723-5d1756461811",
"name": "Confirm that we've messaged a human",
"type": "n8n-nodes-base.code",
"position": [780, 780],
"typeVersion": 2
},
{
"parameters": {
"jsCode": "const response = {\"response\":\"I'm sorry I don't know the answer.Please repeat your question and include your email address so I can request help.\"};\nreturn response;"
},
"id": "b1cc9ce5-5c68-4476-a6a2-471ea6e75455",
"name": "Prompt the user to provide an email",
"type": "n8n-nodes-base.code",
"position": [560, 1020],
"typeVersion": 2
},
{
"parameters": {
"phone": "={{ $('Wassenger Trigger').item.json.data.fromNumber }}",
"message": "={{ $json.output }}",
"options": {}
},
"type": "n8n-nodes-wassenger.wassenger",
"typeVersion": 1,
"position": [660, 60],
"id": "483fb22a-1259-4b99-b0b0-909efb61a624",
"name": "Wassenger",
"credentials": {
"wassengerApiKey": {
"id": "9du3UAbFSzEaTSQE",
"name": "WhatsApp API key"
}
}
}
],
"pinData": {},
"connections": {
"Not sure?": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Simple Memory": {
"ai_memory": [
[
{
"node": "AI Agent",
"type": "ai_memory",
"index": 0
}
]
]
},
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "AI Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Wassenger Trigger": {
"main": [
[
{
"node": "AI Agent",
"type": "main",
"index": 0
}
]
]
},
"When Executed by Another Workflow": {
"main": [
[
{
"node": "Check if user has provided email",
"type": "main",
"index": 0
}
]
]
},
"Check if user has provided email": {
"main": [
[
{
"node": "Message Slack for help",
"type": "main",
"index": 0
}
],
[
{
"node": "Prompt the user to provide an email",
"type": "main",
"index": 0
}
]
]
},
"Message Slack for help": {
"main": [
[
{
"node": "Confirm that we've messaged a human",
"type": "main",
"index": 0
}
]
]
},
"AI Agent": {
"main": [
[
{
"node": "Wassenger",
"type": "main",
"index": 0
}
]
]
}
}
}
🚨 Best Practices
- Clearly define AI boundaries and escalation rules.
- Always provide feedback to users during escalations.
- Regularly update AI prompts for better accuracy.
- Monitor human escalations closely to adjust AI workflows as needed.
💡 Conclusion
By integrating AI and human capabilities, you ensure effective, robust, and user-friendly automation. This powerful combination of Wassenger, n8n, OpenAI, and Slack creates an automated yet human-supported customer service solution that’s adaptable and reliable.
📚 Further Reading & Resources
Try creating your AI-assisted workflows and share your experiences and insights with the community! If you have questions or suggestions, please comment below — we’re here to help each other grow.
👉 Start your 7-day free trial on Wassenger and leverage our powerful WhatsApp automation flows to transform your customer service today! ⚡







