Describe the problem/error/question
Using the whatsapp business cloud node periodically disconnects. I have to go back into Meta → Business Manager → Whatsapp → API Setup → Generate a new access token.
Then resubmit the credentials into the Whatsapp Business Cloud node.
What is the error message (if any)?
Connection failed.
Please share your workflow
{
“nodes”: [
{
“parameters”: {
“updates”: [
“messages”
]
},
“type”: “n8n-nodes-base.whatsAppTrigger”,
“typeVersion”: 1,
“position”: [
-40,
0
],
“id”: “3da64008-f974-4514-9d88-25ff37564a68”,
“name”: “Chat Received”,
“webhookId”: “74a1a9a2-c4ee-4468-a939-846a7bdff1bb”,
“credentials”: {
“whatsAppTriggerApi”: {
“id”: “MDUSv22VUw0dOE88”,
“name”: “WhatsApp OAuth account”
}
}
},
{
“parameters”: {
“promptType”: “define”,
“text”: “={{ $json.messages[0].text.body }}”,
“options”: {
“systemMessage”: “#Role\nYour name is Susanne, you are a professional customer service representative and appointment setter for Primal, engaging with potential leads on WhatsApp. You will answer questions first then suggest scheduling a call with a Strategist, sharing the meeting link only when 6 critical lead details are collected and synced with the Google Sheets tool.\n\n#Task\nYour primary objective is to be as helpful as possible by answering questions from leads. Do your best to answer their questions and ensure they have no further queries.\n\nWhen the conversation becomes sales-related—such as discussing pricing, proposals, credentials, meetings, video calls, or services—you will always encourage them to book a meeting with a scheduling link.\n\nIf you cannot answer a question, mention that a Strategist can provide more details and encourage them to book a meeting through the scheduling link.\n\n#Scheduling Link\n\nhttps://meetings.hubspot.com/aziz-khawar/brief-meeting\n\n**Always share the link as above never in parentheses or brackets it should just be a simple link.\n\n#Context\nYou work for Primal.\n\nPrimal is a performance marketing agency offering:\n\nSEO services\nGoogle Ads\nFacebook Ads\nTikTok Ads\n\n#Style\nUse simple words and short sentences.\nGrade 3 grammar.\nFriendly tone.\nNo emojis.\nKeep responses under 20 words, similar to chat app messaging.\nAlways ask one question at at time.\n\n#SOP\n\nGreeting Message:\n\nStart every conversation with:\n"Hi there. Thanks for reaching out to Primal."\n\nAlways answer questions to the best of your ability and if you can’t then recommend that they speak to a strategist.\n\nYou will only share the meeting scheduling link only after you have gone through the Sales Qualification Process.\n\nSales Qualification Process:\n\nIf the conversation shows increased interest and intent to do more with us, inform the lead that you need a few details before sharing a meeting link.\n\nAsk for these details all in separate messages in this order:\n 1. What is your first name?\n 2. What is your email address?\n 3. What is your company name?\n 4. What is your company website?\n 5. How many employees do you have?\n 6. What is your best phone number (with country code formatted correctly)?\n\n = must-have and required information to proceed.\n\nIf the lead shared details previously, then instead of asking you should confirm the details instead.\n\nRemember: Keep responses under 20 words, similar to chat app messaging and only ask one question at a time. Never group questions together or in a list.\n\nRemember: To always confirm the final details with the lead then sync the data with Google Sheets .\n\n## Tools\n\nOnce all six details are gathered, immediately use Google Sheets tool.\n\nSync the same contact details to the Google Sheets tool for record-keeping.\n\nThe sequence should always be:\n1. Collect Lead Info ➔ 2. Google Sheets Sync ➔ 3. Share meeting scheduler\n\nMeeting Link Sharing:\n\nAfter the data sync, encourage the lead to schedule a meeting:\n\n"Thanks for sharing your details. You can book a convenient time with our Strategist here: https://meetings.hubspot.com/aziz-khawar/brief-meeting.\"\n\n\nObjection Handling:\n\nIf you cannot answer a question:\n\nAsk if the lead would like to move forward by gathering the lead details listed above.\n\nThen follow the Google Sheets update and meeting scheduling steps.\n\n#EXAMPLE 1\n\nQ Can you share pricing?\nA We need to learn more about your business. Would you like to speak to a Strategist?\n\n#EXAMPLE 2\n\nQ What makes you better than other agencies?\nA* We use INSTINCT, our proprietary process. Would you like to speak to a Strategist?\n\n#EXAMPLE 3\n\nQ Can you send me more info first?\nA A Strategist can help with that. Should I share their meeting scheduler?\n\n#EXAMPLE 4 \nQ Can you share pricing? \nA We’ll need to learn more about your business before we can correctly give you investment options. Would you like to speak to a strategist?\n\n#EXAMPLE 5\n\nQ What makes you better than other agencies?\n A We utilize INSTINCT our proprietary process for all campaigns that drive the best ROI’s in the industry. Would you like to speak to a strategist?\n\nNotes:\nDo not mention tools or the knowledge base, or that you are AI.\nKeep responses under 20 words and natural.\nPresent information as if it’s known first-hand.\nOnly ask one question at a time. Never group questions together or in a list.\nIf the lead can’t provide a company website ask for their Instagram page or as a last resort their Facebook page, then if they don’t have it say it’s fine and move onto the next question.\nNEVER mention that you used tools or a bot or AI.\nNEVER ask the next question until the lead answers the current one.\n”
}
},
“type”: “@n8n/n8n-nodes-langchain.agent”,
“typeVersion”: 1.7,
“position”: [
480,
-40
],
“id”: “96136c36-4d06-46de-8aaf-cd38739fbe59”,
“name”: “AI Agent”
},
{
“parameters”: {
“sessionIdType”: “customKey”,
“sessionKey”: “={{ $(‘Chat Received’).item.json.contacts[0].wa_id }}”,
“contextWindowLength”: 10
},
“type”: “@n8n/n8n-nodes-langchain.memoryBufferWindow”,
“typeVersion”: 1.3,
“position”: [
520,
200
],
“id”: “53d84b44-0ffa-4454-b856-4b20c1dc78d2”,
“name”: “Window Buffer Memory”
},
{
“parameters”: {
“operation”: “send”,
“phoneNumberId”: “=605620382626542”,
“recipientPhoneNumber”: “={{ $(‘Chat Received’).item.json.contacts[0].wa_id }}”,
“textBody”: “={{ $json.output }}”,
“additionalFields”: {},
“requestOptions”: {}
},
“type”: “n8n-nodes-base.whatsApp”,
“typeVersion”: 1,
“position”: [
1240,
-240
],
“id”: “db69572a-858e-418a-b6ee-3dcf1657ed3c”,
“name”: “WhatsApp Business Cloud”,
“credentials”: {
“whatsAppApi”: {
“id”: “TalBaCKLLzqKBjyp”,
“name”: “WhatsApp account”
}
}
},
{
“parameters”: {
“conditions”: {
“options”: {
“caseSensitive”: true,
“leftValue”: “”,
“typeValidation”: “strict”,
“version”: 2
},
“conditions”: [
{
“id”: “328b0db0-62d2-4409-87e1-01da692eab53”,
“leftValue”: “={{ $json.messages[0].text.body }}”,
“rightValue”: “”,
“operator”: {
“type”: “string”,
“operation”: “exists”,
“singleValue”: true
}
}
],
“combinator”: “and”
},
“options”: {}
},
“type”: “n8n-nodes-base.if”,
“typeVersion”: 2.2,
“position”: [
200,
0
],
“id”: “fce56afe-2db2-4516-aeb4-20ee348d2d16”,
“name”: “If”
},
{
“parameters”: {
“descriptionType”: “manual”,
“toolDescription”: “For every message the user sends, collect the customer’s details which should include First Name, Phone Number (with country code formatted correctly), Work Email, Company Name, Company Website and Number Of Employees.”,
“operation”: “append”,
“documentId”: {
“__rl”: true,
“value”: “n8n Test - Google Sheets”,
“mode”: “url”
},
“sheetName”: {
“__rl”: true,
“value”: “gid=0”,
“mode”: “list”,
“cachedResultName”: “Notes”,
“cachedResultUrl”: “n8n Test - Google Sheets”
},
“columns”: {
“mappingMode”: “defineBelow”,
“value”: {
“First Name”: “={{ /n8n-auto-generated-fromAI-override/ $fromAI(‘First_Name’, , 'string') }}", "Phone Number": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Phone_Number',
, ‘string’) }}”,
“Email”: “={{ /n8n-auto-generated-fromAI-override/ $fromAI(‘Email’, , 'string') }}", "Company Name": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Company_Name',
, ‘string’) }}”,
“Number Of Employees”: “={{ /n8n-auto-generated-fromAI-override/ $fromAI(‘Number_Of_Employees’, , 'string') }}", "Company Website": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Company_Website',
, ‘string’) }}”
},
“matchingColumns”: ,
“schema”: [
{
“id”: “First Name”,
“displayName”: “First Name”,
“required”: false,
“defaultMatch”: false,
“display”: true,
“type”: “string”,
“canBeUsedToMatch”: true
},
{
“id”: “Phone Number”,
“displayName”: “Phone Number”,
“required”: false,
“defaultMatch”: false,
“display”: true,
“type”: “string”,
“canBeUsedToMatch”: true
},
{
“id”: “Email”,
“displayName”: “Email”,
“required”: false,
“defaultMatch”: false,
“display”: true,
“type”: “string”,
“canBeUsedToMatch”: true
},
{
“id”: “Company Name”,
“displayName”: “Company Name”,
“required”: false,
“defaultMatch”: false,
“display”: true,
“type”: “string”,
“canBeUsedToMatch”: true
},
{
“id”: “Number Of Employees”,
“displayName”: “Number Of Employees”,
“required”: false,
“defaultMatch”: false,
“display”: true,
“type”: “string”,
“canBeUsedToMatch”: true
},
{
“id”: “Company Website”,
“displayName”: “Company Website”,
“required”: false,
“defaultMatch”: false,
“display”: true,
“type”: “string”,
“canBeUsedToMatch”: true
}
],
“attemptToConvertTypes”: false,
“convertFieldsToString”: false
},
“options”: {}
},
“type”: “n8n-nodes-base.googleSheetsTool”,
“typeVersion”: 4.5,
“position”: [
740,
200
],
“id”: “4f5b1251-27f7-4dba-9686-9ba5822f86c8”,
“name”: “Google Sheets”,
“credentials”: {
“googleSheetsOAuth2Api”: {
“id”: “zw1IrWbr4bedwdik”,
“name”: “Google Sheets account”
}
}
},
{
“parameters”: {
“model”: {
“__rl”: true,
“value”: “gpt-4o”,
“mode”: “list”,
“cachedResultName”: “gpt-4o”
},
“options”: {}
},
“type”: “@n8n/n8n-nodes-langchain.lmChatOpenAi”,
“typeVersion”: 1.2,
“position”: [
300,
200
],
“id”: “43042ecb-2198-414f-8d82-4cb22b9d5ae7”,
“name”: “OpenAI Chat Model”,
“credentials”: {
“openAiApi”: {
“id”: “dY2vOJrR45uE7Uwo”,
“name”: “OpenAi account”
}
}
},
{
“parameters”: {
“operation”: “send”,
“phoneNumberId”: “605620382626542”,
“recipientPhoneNumber”: “{{ $(‘Chat Received’).item.json.contacts[0].wa_id }}”,
“textBody”: “Were you able to find a good time to book a call?”,
“additionalFields”: {},
“requestOptions”: {}
},
“type”: “n8n-nodes-base.whatsApp”,
“typeVersion”: 1,
“position”: [
2160,
-300
],
“id”: “6d083e25-122f-468f-97fd-32909feab77b”,
“name”: “WhatsApp Business Cloud1”,
“credentials”: {
“whatsAppApi”: {
“id”: “TalBaCKLLzqKBjyp”,
“name”: “WhatsApp account”
}
}
},
{
“parameters”: {
“amount”: 1,
“unit”: “days”
},
“type”: “n8n-nodes-base.wait”,
“typeVersion”: 1.1,
“position”: [
1860,
-280
],
“id”: “5a8939ec-dccd-46a3-9393-ef0e7d6115a1”,
“name”: “Wait”,
“webhookId”: “15797e82-c02f-4f0b-95d4-6642bc4a5187”
},
{
“parameters”: {
“conditions”: {
“options”: {
“caseSensitive”: true,
“leftValue”: “”,
“typeValidation”: “strict”,
“version”: 2
},
“conditions”: [
{
“id”: “b4306910-e8aa-446b-9e39-a891f4d83e0c”,
“leftValue”: “={{ $(‘AI Agent’).item.json.output }}”,
“rightValue”: “meetings.hubspot.com”,
“operator”: {
“type”: “string”,
“operation”: “contains”
}
}
],
“combinator”: “and”
},
“options”: {}
},
“type”: “n8n-nodes-base.if”,
“typeVersion”: 2.2,
“position”: [
1560,
-220
],
“id”: “9bd29dbc-15d9-4505-b6e2-855bd79481c7”,
“name”: “If1”
}
],
“connections”: {
“Chat Received”: {
“main”: [
[
{
“node”: “If”,
“type”: “main”,
“index”: 0
}
]
]
},
“AI Agent”: {
“main”: [
[
{
“node”: “WhatsApp Business Cloud”,
“type”: “main”,
“index”: 0
}
]
]
},
“Window Buffer Memory”: {
“ai_memory”: [
[
{
“node”: “AI Agent”,
“type”: “ai_memory”,
“index”: 0
}
]
]
},
“WhatsApp Business Cloud”: {
“main”: [
[
{
“node”: “If1”,
“type”: “main”,
“index”: 0
}
]
]
},
“If”: {
“main”: [
[
{
“node”: “AI Agent”,
“type”: “main”,
“index”: 0
}
]
]
},
“Google Sheets”: {
“ai_tool”: [
[
{
“node”: “AI Agent”,
“type”: “ai_tool”,
“index”: 0
}
]
]
},
“OpenAI Chat Model”: {
“ai_languageModel”: [
[
{
“node”: “AI Agent”,
“type”: “ai_languageModel”,
“index”: 0
}
]
]
},
“Wait”: {
“main”: [
[
{
“node”: “WhatsApp Business Cloud1”,
“type”: “main”,
“index”: 0
}
]
]
},
“If1”: {
“main”: [
[
{
“node”: “Wait”,
“type”: “main”,
“index”: 0
}
]
]
}
},
“pinData”: {},
“meta”: {
“templateCredsSetupCompleted”: true,
“instanceId”: “aa754b1d57c4e846eccf5b1546b80e1ceb275ffa01a29dd5d463cff08d967f5e”
}
}
Information on your n8n setup
- n8n version: Running version [email protected]
- Database (default: SQLite): None
- n8n EXECUTIONS_PROCESS setting (default: own, main): own
- Running n8n via (Docker, npm, n8n cloud, desktop app): n8n cloud
- Operating system: Mac
I am also on a trial account.