Make.com workflow template
WhatsApp Business Chatbot (Make.com)
Watches for incoming WhatsApp Business Cloud events, forwards the sender and message text to your AI agent's webhook (e.g. an n8n workflow), and sends the agent's reply back to the customer over WhatsApp. Includes error handling that emails you if the webhook call fails and silently ignores failures on the outbound WhatsApp send.
Beginner15-25 minutesMake.comWhatsApp Business Cloud APIGmail
01
What this workflow handles
- WhatsApp messages automatically routed to your AI agent
- Replies sent back to the customer over WhatsApp
- Email alert if the connection to your AI agent fails
02
Setup steps
- 1Connect your WhatsApp Business Cloud account in Make
- 2Connect a Gmail account for error alerts
- 3Set the HTTP request URL to your AI agent's webhook (e.g. the WhatsApp AI Agent - Main n8n workflow)
- 4Set the WhatsApp sender ID (fromId) to your own phone number ID
- 5Update the error-alert recipient email
03
Values to replace
Review every placeholder below before activating this workflow. Public downloads should never include live credentials or client data.
- AI agent webhook URL
- WhatsApp Business Account ID
- WhatsApp phone number ID (fromId)
- Error-alert email address
- Gmail connection
Workflow JSON preview
Review before downloading or importing.
{
"name": "WhatsApp Business Chatbot",
"flow": [
{
"id": 2,
"module": "whatsapp-business-cloud:watchEvents2",
"version": 1,
"parameters": {
"__IMTHOOK__": 0
},
"mapper": {},
"metadata": {
"designer": {
"x": -300,
"y": 0
},
"restore": {
"parameters": {
"__IMTHOOK__": {
"data": {
"editable": "false"
},
"label": "WhatsApp Business "
}
}
},
"parameters": [
{
"name": "__IMTHOOK__",
"type": "hook:whatsapp-business-cloud",
"label": "Webhook",
"required": true
}
],
"interface": [
{
"name": "id",
"type": "text",
"label": "WhatsApp Business Account ID"
},
{
"name": "time",
"type": "date",
"label": "Time"
},
{
"name": "field",
"type": "text",
"label": "Field"
},
{
"name": "messaging_product",
"type": "text",
"label": "Messaging Product"
},
{
"name": "metadata",
"spec": [
{
"name": "display_phone_number",
"type": "text",
"label": "Display Phone Number"
},
{
"name": "phone_number_id",
"type": "text",
"label": "Phone Number ID"
}
],
"type": "collection",
"label": "Metadata"
},
{
"name": "contacts",
"spec": {
"spec": [
{
"name": "profile",
"spec": [
{
"name": "name",
"type": "text",
"label": "Name"
}
],
"type": "collection",
"label": "Profile"
},
{
"name": "wa_id",
"type": "text",
"label": "WhatsApp ID"
}
],
"type": "collection"
},
"type": "array",
"label": "Contacts"
},
{
"name": "messages",
"spec": {
"spec": [
{
"name": "from",
"type": "text",
"label": "Sender"
},
{
"name": "id",
"type": "text",
"label": "Message ID"
},
{
"name": "timestamp",
"type": "date",
"label": "Timestamp"
},
{
"name": "text",
"spec": [
{
"name": "body",
"type": "text",
"label": "Body"
}
],
"type": "collection",
"label": "Text"
},
{
"name": "type",
"type": "text",
"label": "Type"
},
{
"name": "image",
"spec": [
{
"name": "caption",
"type": "text",
"label": "Caption"
},
{
"name": "mime_type",
"type": "text",
"label": "MIME Type"
},
{
"name": "sha256",
"type": "text",
"label": "SHA256"
},
{
"name": "id",
"type": "text",
"label": "Media ID"
}
],
"type": "collection",
"label": "Image"
},
{
"name": "audio",
"spec": [
{
"name": "mime_type",
"type": "text",
"label": "MIME Type"
},
{
"name": "sha256",
"type": "text",
"label": "SHA256"
},
{
"name": "id",
"type": "text",
"label": "Media ID"
},
{
"name": "voice",
"type": "boolean",
"label": "Voice"
}
],
"type": "collection",
"label": "Audio"
},
{
"name": "video",
"spec": [
{
"name": "caption",
"type": "text",
"label": "Caption"
},
{
"name": "mime_type",
"type": "text",
"label": "MIME Type"
},
{
"name": "sha256",
"type": "text",
"label": "SHA256"
},
{
"name": "id",
"type": "text",
"label": "Media ID"
}
],
"type": "collection",
"label": "Video"
},
{
"name": "document",
"spec": [
{
"name": "caption",
"type": "text",
"label": "Caption"
},
{
"name": "filename",
"type": "text",
"label": "File Name"
},
{
"name": "mime_type",
"type": "text",
"label": "MIME Type"
},
{
"name": "sha256",
"type": "text",
"label": "SHA256"
},
{
"name": "id",
"type": "text",
"label": "Media ID"
}
],
"type": "collection",
"label": "Document"
},
{
"name": "contacts",
"spec": {
"spec": [
{
"name": "name",
"spec": [
{
"name": "formatted_name",
"type": "text",
"label": "Formatted Name"
},
{
"name": "first_name",
"type": "text",
"label": "First Name"
},
{
"name": "last_name",
"type": "text",
"label": "Last Name"
},
{
"name": "middle_name",
"type": "text",
"label": "Middle Name"
},
{
"name": "suffix",
"type": "text",
"label": "Name Suffix"
},
{
"name": "prefix",
"type": "text",
"label": "Name Prefix"
}
],
"type": "collection",
"label": "Name"
},
{
"name": "phones",
"spec": [
{
"name": "phone",
"type": "text",
"label": "Phone"
},
{
"name": "type",
"type": "text",
"label": "Type"
}
],
"type": "array",
"label": "Phones"
},
{
"name": "emails",
"spec": [
{
"name": "email",
"type": "email",
"label": "Email"
},
{
"name": "type",
"type": "text",
"label": "Type"
}
],
"type": "array",
"label": "Emails"
},
{
"name": "org",
"spec": [
{
"name": "company",
"type": "text",
"label": "Company"
},
{
"name": "department",
"type": "text",
"label": "Department"
},
{
"name": "title",
"type": "text",
"label": "Title"
}
],
"type": "collection",
"label": "Organization"
},
{
"name": "urls",
"spec": [
{
"name": "type",
"type": "text",
"label": "Type"
},
{
"name": "url",
"type": "url",
"label": "URL"
}
],
"type": "array",
"label": "URLs"
},
{
"name": "addresses",
"spec": [
{
"name": "type",
"type": "text",
"label": "Type"
},
{
"name": "street",
"type": "text",
"label": "Street"
},
{
"name": "city",
"type": "text",
"label": "City"
},
{
"name": "zip",
"type": "text",
"label": "ZIP"
},
{
"name": "country",
"type": "text",
"label": "Country"
},
{
"name": "country_code",
"type": "text",
"label": "Country Code"
}
],
"type": "array",
"label": "Addresses"
},
{
"name": "birthday",
"type": "text",
"label": "Birthday"
}
],
"type": "collection"
},
"type": "array",
"label": "Contacts"
},
{
"name": "sticker",
"spec": [
{
"name": "mime_type",
"type": "text",
"label": "MIME Type"
},
{
"name": "sha256",
"type": "text",
"label": "SHA256"
},
{
"name": "id",
"type": "text",
"label": "Media ID"
}
],
"type": "collection",
"label": "Sticker"
},
{
"name": "location",
"spec": [
{
"name": "latitude",
"type": "number",
"label": "Latitude"
},
{
"name": "longitude",
"type": "number",
"label": "Longitude"
},
{
"name": "name",
"type": "text",
"label": "Name"
},
{
"name": "address",
"type": "text",
"label": "Address"
}
],
"type": "collection",
"label": "Location"
},
{
"name": "context",
"spec": [
{
"name": "from",
"type": "text",
"label": "From"
},
{
"name": "id",
"type": "text",
"label": "Context ID"
}
],
"type": "collection",
"label": "Context"
},
{
"name": "button",
"spec": [
{
"name": "payload",
"type": "text",
"label": "Payload"
},
{
"name": "text",
"type": "text",
"label": "Text"
}
],
"type": "collection",
"label": "Button"
},
{
"name": "interactive",
"spec": [
{
"name": "type",
"type": "text",
"label": "Type"
},
{
"name": "list_reply",
"spec": [
{
"name": "id",
"type": "number",
"label": "ID"
},
{
"name": "title",
"type": "text",
"label": "Title"
},
{
"name": "description",
"type": "text",
"label": "Description"
}
],
"type": "collection",
"label": "List Reply"
},
{
"name": "button_reply",
"spec": [
{
"name": "id",
"type": "number",
"label": "ID"
},
{
"name": "title",
"type": "text",
"label": "Title"
}
],
"type": "collection",
"label": "Button Reply"
}
],
"type": "collection",
"label": "Interactive"
}
],
"type": "collection"
},
"type": "array",
"label": "Messages"
},
{
"name": "display_phone_number",
"type": "text",
"label": "Display Phone Number"
},
{
"name": "decision",
"type": "text",
"label": "Decision"
},
{
"name": "requested_verified_name",
"type": "text",
"label": "Requested Verified Name"
},
{
"name": "rejection_reason",
"type": "text",
"label": "Rejection Reason"
}
]
}
},
{
"id": 4,
"module": "http:MakeRequest",
"version": 4,
"parameters": {
"authenticationType": "noAuth",
"tlsType": ""
},
"mapper": {
"url": "https://YOUR_WEBHOOK_URL_FROM_WhatsApp_AI_Agent_Main.com",
"method": "post",
"contentType": "json",
"parseResponse": true,
"stopOnHttpError": true,
"timeout": "300",
"allowRedirects": true,
"shareCookies": false,
"requestCompressedContent": true,
"inputMethod": "jsonString",
"jsonStringBodyContent": "{\n\"user_id\" : \"{{2.messages[].from}}\",\n\"user_message\": \"{{2.messages[].text.body}}\"\n}"
},
"metadata": {
"designer": {
"x": 35,
"y": -1
},
"restore": {
"parameters": {
"authenticationType": {
"label": "No authenticationUse when no credentials are required for the request."
},
"tlsType": {
"label": "Empty"
}
},
"expect": {
"method": {
"mode": "chose",
"label": "POST"
},
"headers": {
"mode": "chose"
},
"queryParameters": {
"mode": "chose"
},
"contentType": {
"label": "application/jsonEnter data in the JSON format, as a string or using a data structure."
},
"parseResponse": {
"mode": "chose"
},
"stopOnHttpError": {
"mode": "chose"
},
"allowRedirects": {
"mode": "chose"
},
"shareCookies": {
"mode": "chose"
},
"requestCompressedContent": {
"mode": "chose"
},
"inputMethod": {
"label": "JSON stringEnter the JSON body as a raw text string. If values contain JSON reserved characters, you must escape them manually."
},
"paginationType": {
"label": "Empty"
}
}
},
"parameters": [
{
"name": "authenticationType",
"type": "select",
"label": "Authentication type",
"required": true,
"validate": {
"enum": [
"noAuth",
"apiKey",
"basicAuth",
"oAuth"
]
}
},
{
"name": "tlsType",
"type": "select",
"label": "Transport layer security (TLS)",
"validate": {
"enum": [
"mTls",
"tls"
]
}
},
{
"name": "proxyKeychain",
"type": "keychain:proxy",
"label": "Proxy"
}
],
"expect": [
{
"name": "url",
"type": "url",
"label": "URL",
"required": true
},
{
"name": "method",
"type": "select",
"label": "Method",
"required": true,
"validate": {
"enum": [
"get",
"head",
"post",
"put",
"patch",
"delete",
"options"
]
}
},
{
"name": "headers",
"type": "array",
"label": "Headers",
"spec": {
"name": "value",
"label": "Header",
"type": "collection",
"spec": [
{
"name": "name",
"label": "Name",
"type": "text",
"required": true,
"validate": {
"pattern": "^[-!#$%&'*+.^_`|~0-9A-Za-z]+$"
}
},
{
"name": "value",
"label": "Value",
"type": "text"
}
]
}
},
{
"name": "queryParameters",
"type": "array",
"label": "Query parameters",
"spec": {
"name": "value",
"label": "Parameter",
"type": "collection",
"spec": [
{
"name": "name",
"label": "Name",
"type": "text",
"required": true
},
{
"name": "value",
"label": "Value",
"type": "text"
}
]
}
},
{
"name": "contentType",
"type": "select",
"label": "Body content type",
"validate": {
"enum": [
"json",
"multipart",
"urlEncoded",
"custom"
]
}
},
{
"name": "parseResponse",
"type": "boolean",
"label": "Parse response",
"required": true
},
{
"name": "stopOnHttpError",
"type": "boolean",
"label": "Return error if HTTP request fails",
"required": true
},
{
"name": "timeout",
"type": "uinteger",
"label": "Timeout",
"validate": {
"min": 1,
"max": 300
}
},
{
"name": "allowRedirects",
"type": "boolean",
"label": "Allow redirects",
"required": true
},
{
"name": "shareCookies",
"type": "boolean",
"label": "Share cookies with other HTTP modules",
"required": true
},
{
"name": "requestCompressedContent",
"type": "boolean",
"label": "Request compressed content",
"required": true
},
{
"name": "inputMethod",
"type": "select",
"label": "Body input method",
"required": true,
"validate": {
"enum": [
"dataStructure",
"jsonString"
]
}
},
{
"name": "jsonStringBodyContent",
"type": "text",
"label": "Body content",
"required": true
},
{
"name": "paginationType",
"type": "select",
"label": "Pagination type",
"validate": {
"enum": [
"offsetBased",
"pageBased",
"urlBased",
"tokenBased"
]
}
}
],
"interface": [
{
"name": "data",
"label": "Data",
"type": "any"
},
{
"name": "statusCode",
"label": "Status Code",
"type": "number"
},
{
"name": "headers",
"label": "Headers",
"type": "collection",
"spec": [
{
"name": "content-length",
"label": "Content-Length",
"type": "text"
},
{
"name": "content-encoding",
"label": "Content-Encoding",
"type": "text"
},
{
"name": "content-type",
"label": "Content-Type",
"type": "text"
},
{
"name": "server",
"label": "Server",
"type": "text"
},
{
"name": "cache-control",
"label": "Cache-Control",
"type": "text"
},
{
"name": "set-cookie",
"label": "Set-Cookie",
"type": "array",
"spec": {
"type": "text"
}
}
]
}
],
"advanced": true
},
"onerror": [
{
"id": 19,
"module": "google-email:sendAnEmail",
"version": 4,
"parameters": {
"__IMTCONN__": 0
},
"mapper": {
"to": [
"YOUR_ALERT_EMAIL@example.com"
],
"subject": "{{4.error.type}} in Make Scenario",
"bodyType": "collection",
"contents": [
{
"text": "The Scenario Stopped with the below error:\n\n{{4.error.type}} {{4.error.message}}\nDetails: \n{{4.error.detail}}\n",
"image": {}
}
]
},
"metadata": {
"designer": {
"x": 118,
"y": 268
},
"restore": {
"expect": {
"cc": {
"mode": "chose"
},
"to": {
"mode": "chose",
"items": [
null
]
},
"bcc": {
"mode": "chose"
},
"from": {
"mode": "chose"
},
"bodyType": {
"label": "Collection of contents (text, images, etc.)"
},
"contents": {
"mode": "chose",
"items": [
null
]
},
"signature": {
"mode": "chose"
},
"attachments": {
"mode": "chose"
},
"emailHeaders": {
"mode": "chose"
}
},
"parameters": {
"__IMTCONN__": {
"data": {
"scoped": "true",
"connection": "google-email"
},
"label": "YOUR_NAME's Gmail connection (YOUR_GMAIL_ADDRESS@gmail.com)"
}
}
},
"parameters": [
{
"name": "__IMTCONN__",
"type": "account:google-email",
"label": "Connection",
"required": true
}
],
"expect": [
{
"name": "to",
"spec": {
"name": "value",
"type": "email",
"label": "Recipient email address",
"required": true,
"validate": true
},
"type": "array",
"label": "To",
"required": true
},
{
"name": "subject",
"type": "text",
"label": "Subject"
},
{
"name": "bodyType",
"type": "select",
"label": "Body type",
"required": true,
"validate": {
"enum": [
"rawHtml",
"collection"
]
}
},
{
"name": "attachments",
"spec": {
"name": "value",
"spec": [
{
"name": "filename",
"type": "filename",
"label": "File name",
"required": true,
"semantic": "file:name"
},
{
"name": "data",
"type": "buffer",
"label": "Data",
"required": true,
"semantic": "file:data"
}
],
"type": "collection",
"label": "Attachment"
},
"type": "array",
"label": "Attachments"
},
{
"name": "from",
"type": "select",
"label": "From"
},
{
"name": "cc",
"spec": {
"name": "value",
"type": "email",
"label": "Recipient email address"
},
"type": "array",
"label": "CC recipients"
},
{
"name": "bcc",
"spec": {
"name": "value",
"type": "email",
"label": "Recipient email address"
},
"type": "array",
"label": "BCC recipients"
},
{
"name": "emailHeaders",
"spec": {
"name": "value",
"spec": [
{
"name": "key",
"type": "text",
"label": "Key",
"required": true
},
{
"name": "value",
"type": "text",
"label": "Value"
}
],
"type": "collection",
"label": "Email header"
},
"type": "array",
"label": "Additional email headers"
},
{
"name": "contents",
"spec": {
"name": "value",
"spec": [
{
"name": "text",
"type": "text",
"label": "Text"
},
{
"name": "image",
"spec": [
{
"name": "filename",
"type": "filename",
"label": "File name",
"semantic": "file:name"
},
{
"name": "data",
"type": "buffer",
"label": "Data",
"semantic": "file:data"
},
{
"name": "width",
"type": "uinteger",
"label": "Width"
},
{
"name": "height",
"type": "uinteger",
"label": "Height"
}
],
"type": "collection",
"label": "Image"
}
],
"type": "collection",
"label": "Content"
},
"type": "array",
"label": "Body contents"
},
{
"name": "signature",
"type": "select",
"label": "Signature content"
}
]
}
}
]
},
{
"id": 6,
"module": "whatsapp-business-cloud:sendMessage",
"version": 1,
"parameters": {
"__IMTCONN__": 0
},
"mapper": {
"to": "{{2.messages[].from}}",
"text": {
"body": "{{4.data.reply}}",
"preview_url": false
},
"type": "text",
"fromId": "YOUR_WHATSAPP_PHONE_NUMBER_ID"
},
"metadata": {
"designer": {
"x": 357,
"y": 2
},
"restore": {
"expect": {
"text": {
"nested": {
"preview_url": {
"mode": "chose"
}
}
},
"type": {
"label": "Text"
},
"fromId": {
"mode": "chose",
"label": "YOUR_BUSINESS_NAME (+1 XXX-XXX-XXXX)"
}
},
"parameters": {
"__IMTCONN__": {
"data": {
"scoped": "true",
"connection": "whatsapp-business-cloud"
},
"label": "YOUR_BUSINESS_NAME WhatsApp Business Cloud connection (YOUR_BUSINESS_NAME (YOUR_WHATSAPP_BUSINESS_ACCOUNT_ID))"
}
}
},
"parameters": [
{
"name": "__IMTCONN__",
"type": "account:whatsapp-business-cloud,whatsapp-business-cloud2",
"label": "Connection",
"required": true
}
],
"expect": [
{
"name": "fromId",
"type": "select",
"label": "Sender ID",
"required": true
},
{
"name": "to",
"type": "text",
"label": "Receiver",
"required": true
},
{
"name": "type",
"type": "select",
"label": "Message Type",
"required": true,
"validate": {
"enum": [
"text",
"image",
"audio",
"video",
"document",
"sticker",
"location",
"contacts",
"interactive"
]
}
},
{
"name": "text",
"spec": [
{
"name": "body",
"type": "text",
"label": "Body",
"required": true,
"validate": {
"max": 4096
}
},
{
"name": "preview_url",
"type": "boolean",
"label": "Preview URL",
"required": true
}
],
"type": "collection",
"label": "Text"
}
]
},
"onerror": [
{
"id": 18,
"module": "builtin:Ignore",
"version": 1,
"metadata": {
"designer": {
"x": 558,
"y": 228
}
}
}
]
}
],
"metadata": {
"instant": true,
"version": 1,
"scenario": {
"roundtrips": 1,
"maxErrors": 3,
"autoCommit": true,
"autoCommitTriggerLast": true,
"sequential": false,
"slots": null,
"confidential": false,
"dataloss": false,
"dlq": true,
"freshVariables": false
},
"designer": {
"orphans": []
},
"zone": "eu2.make.com",
"notes": []
}
}