This workflow corresponds to n8n.io template #9440 — we link there as the canonical source.
This workflow follows the Agent → HTTP Request 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 →
{
"nodes": [
{
"id": "ffb21e8f-9568-4e5f-a7dc-9ede3cb3529d",
"name": "AI Agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
4080,
416
],
"parameters": {
"text": "={{ $json.chat_input }}",
"options": {},
"promptType": "define"
},
"typeVersion": 2.1
},
{
"id": "5598448f-1646-4299-923a-2dcf6707b4f2",
"name": "Simple Memory",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"position": [
4240,
656
],
"parameters": {
"sessionKey": "={{ $('Set fields1').item.json.message.chat_id }}",
"sessionIdType": "customKey",
"contextWindowLength": 10
},
"typeVersion": 1.3
},
{
"id": "9929d34c-2954-4272-861a-57b441c7eec0",
"name": "Wait3",
"type": "n8n-nodes-base.wait",
"position": [
1456,
544
],
"parameters": {
"amount": 7
},
"typeVersion": 1.1
},
{
"id": "9975c463-56c0-463c-8311-2d56b20e0684",
"name": "No Operation, do nothing3",
"type": "n8n-nodes-base.noOp",
"position": [
1456,
112
],
"parameters": {},
"typeVersion": 1
},
{
"id": "c21ec32e-ad73-4fac-8442-30d8906e1a5e",
"name": "Switch Type",
"type": "n8n-nodes-base.switch",
"position": [
2288,
304
],
"parameters": {
"rules": {
"values": [
{
"outputKey": "Text",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "a1ae30d8-caca-41ff-857b-ed9f55b09ca1",
"operator": {
"type": "string",
"operation": "contains"
},
"leftValue": "={{ $json.content_type }}",
"rightValue": "text"
}
]
},
"renameOutput": true
},
{
"outputKey": "Audio",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "11e0f3f8-1dd2-4efd-aad1-cf42c96bbc5d",
"operator": {
"type": "string",
"operation": "contains"
},
"leftValue": "={{ $json.content_type }}",
"rightValue": "audio"
}
]
},
"renameOutput": true
},
{
"outputKey": "Image",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "c338dd6b-e18d-4528-95e7-990cd94d5da7",
"operator": {
"type": "string",
"operation": "contains"
},
"leftValue": "={{ $json.content_type }}",
"rightValue": "image"
}
]
},
"renameOutput": true
}
]
},
"options": {}
},
"typeVersion": 3.2
},
{
"id": "5371ce24-b650-47de-a77c-5b8438cbcca4",
"name": "Transcribe a recording",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
2960,
384
],
"parameters": {
"options": {},
"resource": "audio",
"operation": "transcribe"
},
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.8
},
{
"id": "a8a2f5e1-d9d1-46ab-8b1b-af95fcb1a3d8",
"name": "Audio Content",
"type": "n8n-nodes-base.set",
"position": [
3152,
384
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "5f4831a4-5837-492f-b7a9-84b8e9f1f3a9",
"name": "content",
"type": "string",
"value": "={{ $json.text }}"
},
{
"id": "85531cdf-5fc0-41f6-bed9-da0dfaa517ba",
"name": "timestamp",
"type": "string",
"value": "={{ $('Code in JavaScript').item.json.timestamp }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "45c98f8a-81ac-4e99-a85b-3401b04e5c40",
"name": "Analyze image",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
2912,
656
],
"parameters": {
"text": "What's in the image?",
"modelId": {
"__rl": true,
"mode": "list",
"value": "gpt-4o",
"cachedResultName": "GPT-4O"
},
"options": {},
"resource": "image",
"imageUrls": "={{ $json.publicUrl }}",
"operation": "analyze"
},
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.8
},
{
"id": "0347c99c-b10b-49cb-acc4-6bb1522fe85c",
"name": "Image Content",
"type": "n8n-nodes-base.set",
"position": [
3136,
656
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "ac66cc5d-a460-43d6-8932-7a5fb3c63daf",
"name": "=Image",
"type": "string",
"value": "=Caption written by User: {{ $('Code in JavaScript').item.json.content }}\n\nImage analysis: {{ $json.content }}\n\n"
},
{
"id": "3a54bf57-8d27-4857-bef9-614e505ec802",
"name": "timestamp",
"type": "string",
"value": "={{ $('Code in JavaScript').item.json.timestamp }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "e147bb2c-4b47-43d4-891f-3307afb7046c",
"name": "Text Content",
"type": "n8n-nodes-base.set",
"position": [
2864,
128
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "5f4cdc1a-fc80-4aed-9493-38caeb7103f9",
"name": "content",
"type": "string",
"value": "={{ $('Code in JavaScript').item.json.content }}"
},
{
"id": "203a7e05-03f0-413a-90ac-aade62096999",
"name": "timestamp",
"type": "string",
"value": "={{ $('Code in JavaScript').item.json.timestamp }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "a78497d6-29ec-4019-a8c8-fb3eebc76e53",
"name": "Chat Input",
"type": "n8n-nodes-base.set",
"position": [
3872,
416
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "866095be-3f42-4f6a-a7f1-67adec82bf58",
"name": "chat_input",
"type": "string",
"value": "={{ $json.Content.map(msg => msg.content || msg.Image).join('\\n') }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "078ca1b6-4baf-42f3-bef5-6fca9f8dad7a",
"name": "Switch",
"type": "n8n-nodes-base.switch",
"position": [
1232,
288
],
"parameters": {
"rules": {
"values": [
{
"outputKey": "Ignore",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "81c7205c-84c9-480e-8b5a-1a12b5ff7baa",
"operator": {
"type": "string",
"operation": "notEquals"
},
"leftValue": "={{ JSON.parse($json.Mensaje.last()).message_id }}",
"rightValue": "={{ $('Set fields1').item.json.message.message_id }}"
}
]
},
"renameOutput": true
},
{
"outputKey": "Continue",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "4fca4c39-e8bf-490b-8e2e-176c95d9156e",
"operator": {
"type": "dateTime",
"operation": "before"
},
"leftValue": "={{ DateTime.fromISO(JSON.parse($json.Mensaje.last()).timestamp).toUTC().toISO() }}",
"rightValue": "={{ $now.minus(7, 'seconds').toUTC().toISO() }}"
}
]
},
"renameOutput": true
}
]
},
"options": {
"fallbackOutput": "extra",
"renameFallbackOutput": "Wait"
}
},
"typeVersion": 3.2
},
{
"id": "bf1f8bcc-2cf6-4fb9-9a07-29196c621701",
"name": "Code in JavaScript",
"type": "n8n-nodes-base.code",
"position": [
2080,
320
],
"parameters": {
"jsCode": "// Code node in n8n\n// Loops through all input items and parses the \"Mensaje\" field\nreturn items.map(item => {\n let parsed = {};\n try {\n parsed = JSON.parse(item.json.Mensaje);\n } catch (error) {\n // If parsing fails, log it and continue\n parsed = { error: 'Invalid JSON', raw: item.json.Mensaje };\n }\n \n return {\n json: parsed\n };\n});\n"
},
"typeVersion": 2
},
{
"id": "2de4aea2-00fa-4f32-9172-420b59c96e93",
"name": "Send Message to User",
"type": "n8n-nodes-base.httpRequest",
"position": [
4768,
416
],
"parameters": {
"url": "https://www.wasenderapi.com/api/send-message",
"method": "POST",
"options": {},
"sendBody": true,
"sendHeaders": true,
"bodyParameters": {
"parameters": [
{
"name": "to",
"value": "={{ $('Set fields1').item.json.message.chat_id }}"
},
{
"name": "text",
"value": "={{ $json.output }}"
}
]
},
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "Bearer YOUR_TOKEN_HERE API KEY"
}
]
}
},
"typeVersion": 4.2
},
{
"id": "33193b50-0af9-4883-abd5-55a087dcca6a",
"name": "Get the audio",
"type": "n8n-nodes-base.httpRequest",
"position": [
2608,
384
],
"parameters": {
"url": "https://www.wasenderapi.com/api/decrypt-media",
"method": "POST",
"options": {},
"jsonBody": "={\n \"data\": {\n \"messages\": {\n \"key\": {\n \"id\": \"{{ $json.message_id }}\"\n },\n \"message\": {\n \"audioMessage\": {\n \"url\": \"{{ $json.url }}\",\n \"mimetype\": \"{{ $json.mimetype }}\",\n \"mediaKey\": \"{{ $json.mediaKey }}\",\n \"fileSha256\": \"{{ $json.fileSha256 }}\",\n \"fileLength\": \"{{ $json.fileLength }}\",\n \"fileName\": \"audio/mpeg\"\n }\n }\n }\n }\n}",
"sendBody": true,
"sendHeaders": true,
"specifyBody": "json",
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "Bearer YOUR_TOKEN_HERE API KEY "
}
]
}
},
"typeVersion": 4.2
},
{
"id": "4c87722c-fac4-48ff-9d51-3747211dfa0a",
"name": "Download the audio",
"type": "n8n-nodes-base.httpRequest",
"position": [
2784,
384
],
"parameters": {
"url": "={{ $json.publicUrl }}",
"options": {}
},
"typeVersion": 4.2
},
{
"id": "04c92b95-1756-4b11-8829-224ebcc5686b",
"name": "Split Out",
"type": "n8n-nodes-base.splitOut",
"position": [
1872,
320
],
"parameters": {
"options": {},
"fieldToSplitOut": "Mensaje"
},
"typeVersion": 1
},
{
"id": "0c0914f9-c5c4-49a7-a1d4-7b59ea71fe54",
"name": "Get the photo",
"type": "n8n-nodes-base.httpRequest",
"position": [
2704,
656
],
"parameters": {
"url": "https://www.wasenderapi.com/api/decrypt-media",
"method": "POST",
"options": {},
"jsonBody": "={\n \"data\": {\n \"messages\": {\n \"key\": {\n \"id\": \"{{ $json.message_id }}\"\n },\n \"message\": {\n \"imageMessage\": {\n \"url\": \"{{ $json.url }}\",\n \"mimetype\": \"{{ $json.mimetype }}\",\n \"mediaKey\": \"{{ $json.mediaKey }}\",\n \"fileSha256\": \"{{ $json.fileSha256 }}\",\n \"fileLength\": \"{{ $json.fileLength }}\",\n \"fileName\": \"image.jpg\"\n\n }\n }\n }\n }\n}",
"sendBody": true,
"sendHeaders": true,
"specifyBody": "json",
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "Bearer YOUR_TOKEN_HERE API KEY"
}
]
}
},
"typeVersion": 4.2
},
{
"id": "22c600ee-a27d-4619-8f83-a4f70a221b3a",
"name": "OpenAI Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
4048,
624
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4.1-mini",
"cachedResultName": "GPT-4.1-mini"
},
"options": {}
},
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.2
},
{
"id": "217076f7-8505-48a0-80f3-f3160c09f99a",
"name": "Wait",
"type": "n8n-nodes-base.wait",
"position": [
4560,
416
],
"parameters": {
"amount": 6
},
"typeVersion": 1.1
},
{
"id": "72c7bc0f-827d-4f17-b83c-c7df897e4235",
"name": "Aggregate",
"type": "n8n-nodes-base.aggregate",
"position": [
3440,
400
],
"parameters": {
"options": {},
"aggregate": "aggregateAllItemData",
"destinationFieldName": "Content"
},
"typeVersion": 1
},
{
"id": "d3b853a8-0318-4e70-b742-56e0b394efb8",
"name": "Merge",
"type": "n8n-nodes-base.merge",
"position": [
3648,
400
],
"parameters": {
"numberInputs": 3
},
"typeVersion": 3.2
},
{
"id": "7781dec5-b1db-4e85-8033-fd232f98fb3c",
"name": "Redis",
"type": "n8n-nodes-base.redis",
"position": [
736,
304
],
"parameters": {
"list": "={{ $json.message.chat_id }}_buffer",
"tail": true,
"operation": "push",
"messageData": "={{ JSON.stringify({\n message_id: $('Set fields1').item.json.message.message_id,\n chat_id: $('Set fields1').item.json.message.chat_id,\n content_type: $('Set fields1').item.json.message.content_type,\n content: $('Set fields1').item.json.message.content,\n timestamp: $('Set fields1').item.json.message.timestamp,\n url: $('Set fields1').item.json.url,\n mimetype: $('Set fields1').item.json.mimetype,\n mediaKey: $('Set fields1').item.json.mediaKey,\n fileSha256: $('Set fields1').item.json.fileSha256,\n fileLength: $('Set fields1').item.json.fileLength,\n jpegThumbnail: $('Set fields1').item.json.jpegThumbnail,\n user: $('Set fields1').item.json.user\n}) }}"
},
"credentials": {
"redis": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "627b5411-38d2-4399-b71d-3e11ad01ff6e",
"name": "Redis1",
"type": "n8n-nodes-base.redis",
"position": [
976,
304
],
"parameters": {
"key": "={{ $('Set fields1').item.json.message.chat_id }}_buffer",
"options": {},
"operation": "get",
"propertyName": "Mensaje"
},
"credentials": {
"redis": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "e6ab5949-7386-4a93-bc37-019f554f83da",
"name": "Redis2",
"type": "n8n-nodes-base.redis",
"position": [
1456,
304
],
"parameters": {
"key": "={{ $('Set fields1').item.json.message.chat_id }}_buffer",
"operation": "delete"
},
"credentials": {
"redis": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "01c8625c-a36a-45d9-b27d-dfc85e093e38",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-192,
64
],
"parameters": {
"width": 320,
"height": 480,
"content": "## WasenderAPI Setup\n\n**Quick Start:**\n1. Sign up at [wasenderapi.com](https://wasenderapi.com)\n2. Choose a plan ($6-$45)\n3. Create session with your WhatsApp number\n4. Scan QR code to connect\n5. Enable webhook with `messages.received` event\n\n**\u26a0\ufe0f Tip:** For new numbers, use manually for 7 days first to avoid detection."
},
"typeVersion": 1
},
{
"id": "a29ed058-4dfa-433e-b653-7a642fbeee82",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
176,
64
],
"parameters": {
"width": 320,
"height": 592,
"content": "## Set Fields Node\n\n**Purpose:** Extracts and organizes WhatsApp message data\n\n**Key Fields:**\n- `message_id` - Unique message identifier\n- `chat_id` - Conversation identifier \n- `content_type` - text/audio/image\n- `content` - Message text/caption\n- `timestamp` - Message date/time\n- Media fields: `url`, `mimetype`, `mediaKey`, etc.\n\n**Result:** Clean, structured data for processing"
},
"typeVersion": 1
},
{
"id": "0c3a30af-c954-4378-84c4-795069c8b80b",
"name": "Sticky Note6",
"type": "n8n-nodes-base.stickyNote",
"position": [
736,
-288
],
"parameters": {
"color": 3,
"width": 848,
"height": 1072,
"content": "## Message Buffer System\n\n**Flow:**\n1. **Redis** - Stores messages in buffer\n2. **Redis1** - Reads accumulated messages\n3. **Switch** - Decides action:\n - Ignore duplicates\n - Continue if 7s elapsed\n - Wait if messages still arriving\n4. **Wait3** - Pauses 7s for more messages\n5. **Redis2** - Cleans buffer after processing\n\n**Why?** Groups consecutive messages for smarter AI responses\n\n**Redis Setup:** Free tier at [redis.io](https://redis.io)"
},
"typeVersion": 1
},
{
"id": "e02f45ab-8b2a-4a3c-81b2-3db89912663d",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
1808,
-16
],
"parameters": {
"width": 624,
"height": 576,
"content": "## Message Processing\n\n**Split Out** - Separates buffered messages into individual items\n\n**Code** - Parses JSON messages safely with error handling\n\n**Switch Type** - Routes by content:\n- **Text** \u2192 Direct processing\n- **Audio** \u2192 Transcription flow\n- **Image** \u2192 Vision analysis flow\n\n**Result:** Each message type gets specialized handling"
},
"typeVersion": 1
},
{
"id": "0e8c3e7a-7f5b-4e18-a1ca-63e9bb4ec89d",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
2480,
-464
],
"parameters": {
"color": 4,
"width": 896,
"height": 1392,
"content": "## Content Processing\n\n**TEXT:** Extract content + timestamp\n\n**AUDIO:**\n1. Decrypt via WasenderAPI\n2. Download file\n3. Transcribe with OpenAI Whisper\n4. Format as text\n\n**IMAGE:**\n1. Decrypt via WasenderAPI \n2. Analyze with GPT-4O Vision\n3. Combine user caption + AI description\n\n**OpenAI Setup:**\n- Get API key at [platform.openai.com](https://platform.openai.com)\n- Add payment method\n- Costs: ~$0.006/min audio, ~$0.01/image"
},
"typeVersion": 1
},
{
"id": "9d02f39c-2589-4bb0-8a45-6b30c67e44e8",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
3424,
-128
],
"parameters": {
"width": 944,
"height": 896,
"content": "## AI Conversation System\n\n**Aggregate** - Combines all processed messages\n\n**Merge** - Joins data streams\n\n**Chat Input** - Creates unified text from all content types\n\n**AI Agent** - Processes with custom prompt\n\n**OpenAI Model** - GPT-4.1-mini for responses\n\n**Memory** - Remembers last 10 exchanges per chat\n\n**Result:** Context-aware AI that handles text, audio & images"
},
"typeVersion": 1
},
{
"id": "f1048ef3-8096-4569-bdb8-2d398e37ae2f",
"name": "Sticky Note5",
"type": "n8n-nodes-base.stickyNote",
"position": [
4480,
-112
],
"parameters": {
"width": 464,
"height": 720,
"content": "## Response Delivery\n\n**Wait (6s)** - Critical anti-ban protection!\n- Simulates human typing time\n- Prevents instant bot detection\n- Protects WhatsApp account\n\n**Send Message** - Delivers AI response via WasenderAPI\n\n**\u26a0\ufe0f Important:** \n- Never remove the wait\n- 6-8s is optimal timing\n- Instant responses = account suspension risk"
},
"typeVersion": 1
},
{
"id": "d800b3f3-d8ba-43ac-b7b6-b14e6843da95",
"name": "Set fields1",
"type": "n8n-nodes-base.set",
"position": [
208,
496
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "d3a9a053-6bc1-4b06-bd1d-66619c92154d",
"name": "message.message_id",
"type": "string",
"value": "={{ $json.body.data.messages.key.id }}"
},
{
"id": "00682555-4e80-4351-8ed3-71812ecd54f6",
"name": "message.chat_id",
"type": "string",
"value": "={{ $json.body.data.messages.key.remoteJid }}"
},
{
"id": "d28e7894-2df8-4ea4-bd01-8e4f285e3068",
"name": "url",
"type": "string",
"value": "={{ $json.body?.data?.messages?.message?.imageMessage?.url || '' }}{{ $json.body?.data?.messages?.message?.audioMessage?.url || '' }}"
},
{
"id": "c1e1ce53-ac41-4989-9f8d-e03f2a5395bf",
"name": "message.content_type",
"type": "string",
"value": "={{ ($json.body.data.messages.message.extendedTextMessage && $json.body.data.messages.message.extendedTextMessage.text) || ($json.body.data.messages.message.conversation) ? 'text' : '' }}{{ $json.body.data.messages.message.audioMessage && $json.body.data.messages.message.audioMessage.mimetype ? 'audio' : '' }}{{ $json.body.data.messages.message.imageMessage && $json.body.data.messages.message.imageMessage.url ? 'image' : '' }}"
},
{
"id": "46117b1c-4557-4354-8581-c5368b7b1bcf",
"name": "message.content",
"type": "string",
"value": "={{ $json.body.data.messages.message.conversation || '' }}{{ $json.body.data.messages.message.extendedTextMessage?.text || ''}}{{ $json.body.data.messages.message.imageMessage?.caption || ''}}"
},
{
"id": "2911cef7-00f5-4cf0-9e12-75509faf543a",
"name": "message.timestamp",
"type": "string",
"value": "={{ DateTime.fromMillis($json.body.timestamp).toUTC().toISO() }}"
},
{
"id": "23fd732c-6575-4b85-a3ba-b94ee137035f",
"name": "mimetype",
"type": "string",
"value": "={{ $json.body?.data?.messages?.message?.audioMessage?.mimetype || '' }}{{ $json.body?.data?.messages?.message?.imageMessage?.mimetype || '' }}"
},
{
"id": "db3fcae5-e030-4369-8738-08141e5a5184",
"name": "mediaKey",
"type": "string",
"value": "={{ $json.body?.data?.messages?.message?.audioMessage?.mediaKey || '' }}{{ $json.body?.data?.messages?.message?.imageMessage?.mediaKey || '' }}"
},
{
"id": "b629f260-390a-471b-8892-adb85a720ed1",
"name": "fileSha256",
"type": "string",
"value": "={{ $json.body?.data?.messages?.message?.audioMessage?.fileSha256 || '' }}{{ $json.body?.data?.messages?.message?.imageMessage?.fileSha256 || '' }}"
},
{
"id": "6b3ec16e-5e18-485a-9791-645ab1a49d98",
"name": "fileLength",
"type": "string",
"value": "={{ $json.body?.data?.messages?.message?.audioMessage?.fileLength || '' }}{{ $json.body?.data?.messages?.message?.imageMessage?.fileLength || '' }}"
},
{
"id": "759584be-888e-46b4-bf7c-0e9db2b39887",
"name": "jpegThumbnail",
"type": "string",
"value": "={{ $json.body.data.messages.message.imageMessage?.jpegThumbnail ||''}}"
},
{
"id": "019920f4-ce87-4c9a-be61-b11f4b0e13d7",
"name": "user.name",
"type": "string",
"value": "={{ $json.body.data.messages.pushName }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "ab0149b7-c162-427b-9d11-6a8f4866be7b",
"name": "When clicking 'Execute workflow'",
"type": "n8n-nodes-base.manualTrigger",
"position": [
48,
80
],
"parameters": {},
"typeVersion": 1
},
{
"id": "6e8a5c44-6a18-40e9-9b81-ed002c4473fe",
"name": "Sticky Note7",
"type": "n8n-nodes-base.stickyNote",
"position": [
-32,
-16
],
"parameters": {
"height": 80,
"content": "## Change to Webhook Trigger\nReplace manual trigger with webhook for production"
},
"typeVersion": 1
}
],
"connections": {
"Wait": {
"main": [
[
{
"node": "Send Message to User",
"type": "main",
"index": 0
}
]
]
},
"Merge": {
"main": [
[
{
"node": "Chat Input",
"type": "main",
"index": 0
}
]
]
},
"Redis": {
"main": [
[
{
"node": "Redis1",
"type": "main",
"index": 0
}
]
]
},
"Wait3": {
"main": [
[
{
"node": "Redis1",
"type": "main",
"index": 0
}
]
]
},
"Redis1": {
"main": [
[
{
"node": "Switch",
"type": "main",
"index": 0
}
]
]
},
"Redis2": {
"main": [
[
{
"node": "Split Out",
"type": "main",
"index": 0
}
]
]
},
"Switch": {
"main": [
[
{
"node": "No Operation, do nothing3",
"type": "main",
"index": 0
}
],
[
{
"node": "Redis2",
"type": "main",
"index": 0
}
],
[
{
"node": "Wait3",
"type": "main",
"index": 0
}
]
]
},
"AI Agent": {
"main": [
[
{
"node": "Wait",
"type": "main",
"index": 0
}
]
]
},
"Aggregate": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 0
}
]
]
},
"Split Out": {
"main": [
[
{
"node": "Code in JavaScript",
"type": "main",
"index": 0
}
]
]
},
"Chat Input": {
"main": [
[
{
"node": "AI Agent",
"type": "main",
"index": 0
}
]
]
},
"Set fields1": {
"main": [
[
{
"node": "Redis",
"type": "main",
"index": 0
}
]
]
},
"Switch Type": {
"main": [
[
{
"node": "Text Content",
"type": "main",
"index": 0
}
],
[
{
"node": "Get the audio",
"type": "main",
"index": 0
}
],
[
{
"node": "Get the photo",
"type": "main",
"index": 0
}
]
]
},
"Text Content": {
"main": [
[
{
"node": "Aggregate",
"type": "main",
"index": 0
}
]
]
},
"Analyze image": {
"main": [
[
{
"node": "Image Content",
"type": "main",
"index": 0
}
]
]
},
"Audio Content": {
"main": [
[
{
"node": "Aggregate",
"type": "main",
"index": 0
}
]
]
},
"Get the audio": {
"main": [
[
{
"node": "Download the audio",
"type": "main",
"index": 0
}
]
]
},
"Get the photo": {
"main": [
[
{
"node": "Analyze image",
"type": "main",
"index": 0
}
]
]
},
"Image Content": {
"main": [
[
{
"node": "Aggregate",
"type": "main",
"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
}
]
]
},
"Code in JavaScript": {
"main": [
[
{
"node": "Switch Type",
"type": "main",
"index": 0
}
]
]
},
"Download the audio": {
"main": [
[
{
"node": "Transcribe a recording",
"type": "main",
"index": 0
}
]
]
},
"Transcribe a recording": {
"main": [
[
{
"node": "Audio Content",
"type": "main",
"index": 0
}
]
]
},
"When clicking 'Execute workflow'": {
"main": [
[
{
"node": "Set fields1",
"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.
openAiApiredis
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
👥 Who's it for This workflow is perfect for businesses or individuals who want to automate WhatsApp conversations 💬 with an intelligent AI chatbot that can handle text, voice notes 🎵, and images 🖼️. No advanced coding required! 🤖 What it does It automatically receives WhatsApp…
Source: https://n8n.io/workflows/9440/ — 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.
Digital marketers, content creators, social media managers, and businesses who want to use AI marketing automation for YouTube Shorts without spending hours on production. This AI workflow helps anyon
Transform your salon/service business with this streamlined WhatsApp automation system featuring Claude integration, zero-setup database management, and intelligent conversation handling. Claude MCP I
Transform your salon/service business with this streamlined Telegram automation system featuring Claude integration, zero-setup database management, and intelligent conversation handling. Claude MCP I
This automation is designed to help you generate AI-powered music tracks, cover art, and fully rendered music videos — all triggered from a simple Telegram chat and managed via Google Sheets.
This n8n workflow is designed for Facebook Page administrators, social media managers, and community moderators who want to automate comment management on their Facebook Pages. It's perfect for busine