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 →
{
"name": "WhatsApp AI Chatbot",
"nodes": [
{
"parameters": {
"httpMethod": "POST",
"path": "whatsapp-webhook",
"responseMode": "responseNode",
"options": {}
},
"id": "a1b2c3d4-1111-4000-8000-000000000001",
"name": "WhatsApp Webhook",
"type": "n8n-nodes-base.webhook",
"typeVersion": 2,
"position": [
240,
300
]
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "set-user-msg",
"name": "userMessage",
"value": "={{ $json.body.messages[0].text.body }}",
"type": "string"
},
{
"id": "set-phone",
"name": "phoneNumber",
"value": "={{ $json.body.messages[0].from }}",
"type": "string"
}
]
},
"options": {}
},
"id": "a1b2c3d4-1111-4000-8000-000000000002",
"name": "Extract Message",
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
460,
300
]
},
{
"parameters": {
"resource": "chat",
"operation": "message",
"model": "gpt-4o",
"messages": {
"values": [
{
"role": "system",
"content": "You are a helpful WhatsApp customer support assistant. Be concise, friendly, and helpful. Keep responses under 300 characters when possible. Answer in the same language the user writes in."
},
{
"role": "user",
"content": "={{ $json.userMessage }}"
}
]
},
"options": {
"temperature": 0.7,
"maxTokens": 500
}
},
"id": "a1b2c3d4-1111-4000-8000-000000000003",
"name": "OpenAI Chat",
"type": "@n8n/n8n-nodes-langchain.openAi",
"typeVersion": 1.6,
"position": [
680,
300
],
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "set-reply",
"name": "replyText",
"value": "={{ $json.message.content }}",
"type": "string"
}
]
},
"options": {}
},
"id": "a1b2c3d4-1111-4000-8000-000000000004",
"name": "Format Reply",
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
900,
300
]
},
{
"parameters": {
"respondWith": "json",
"responseBody": "={{ JSON.stringify({ messaging_product: 'whatsapp', to: $('Extract Message').item.json.phoneNumber, type: 'text', text: { body: $json.replyText } }) }}",
"options": {
"responseCode": 200
}
},
"id": "a1b2c3d4-1111-4000-8000-000000000005",
"name": "Respond to Webhook",
"type": "n8n-nodes-base.respondToWebhook",
"typeVersion": 1.1,
"position": [
1120,
300
]
}
],
"connections": {
"WhatsApp Webhook": {
"main": [
[
{
"node": "Extract Message",
"type": "main",
"index": 0
}
]
]
},
"Extract Message": {
"main": [
[
{
"node": "OpenAI Chat",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Chat": {
"main": [
[
{
"node": "Format Reply",
"type": "main",
"index": 0
}
]
]
},
"Format Reply": {
"main": [
[
{
"node": "Respond to Webhook",
"type": "main",
"index": 0
}
]
]
}
},
"settings": {
"executionOrder": "v1"
},
"staticData": null
}
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.
openAiApi
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
WhatsApp AI Chatbot. Uses openAi. Webhook trigger; 5 nodes.
Source: https://github.com/mlnjsh/n8n-workflows-mega/blob/main/workflows/ai-chatbots/01-whatsapp-ai-chatbot.json — 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.
🤖 Telegram Messaging Agent for Text/Audio/Images. Uses telegram, stickyNote, httpRequest, lmChatOpenAi. Webhook trigger; 39 nodes.
🤖 Telegram Messaging Agent for Text/Audio/Images. Uses telegram, stickyNote, httpRequest, lmChatOpenAi. Webhook trigger; 39 nodes.
FAQ Chatbot with Human Fallback. Uses openAi, slack. Webhook trigger; 7 nodes.
This comprehensive N8N automation template revolutionizes content creation by delivering a complete end-to-end solution for AI-powered blog generation. Transform simple ideas into fully SEO-optimized,
Story Generation – Your idea is transformed into a narrative split into scenes using DeepSeek LLM. Visuals – Each scene is illustrated with AI images via Replicate, then animated into cinematic video