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 →
{
"name": "WhatsApp Agent com Claude",
"nodes": [
{
"parameters": {
"httpMethod": "GET",
"path": "whatsapp-webhook",
"responseMode": "responseNode",
"options": {}
},
"id": "webhook-verify",
"name": "Webhook Verifica\u00e7\u00e3o",
"type": "n8n-nodes-base.webhook",
"typeVersion": 2,
"position": [
220,
140
]
},
{
"parameters": {
"respondWith": "text",
"responseBody": "={{ $json.query['hub.challenge'] }}",
"options": {}
},
"id": "respond-challenge",
"name": "Responder Challenge",
"type": "n8n-nodes-base.respondToWebhook",
"typeVersion": 1.1,
"position": [
440,
140
]
},
{
"parameters": {
"httpMethod": "POST",
"path": "whatsapp-webhook",
"responseMode": "responseNode",
"options": {
"rawBody": true
}
},
"id": "webhook-messages",
"name": "Webhook Mensagens",
"type": "n8n-nodes-base.webhook",
"typeVersion": 2,
"position": [
220,
380
]
},
{
"parameters": {
"respondWith": "noData",
"options": {}
},
"id": "respond-200",
"name": "Responder 200",
"type": "n8n-nodes-base.respondToWebhook",
"typeVersion": 1.1,
"position": [
440,
380
]
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict"
},
"conditions": [
{
"id": "check-messages",
"leftValue": "={{ $json.body.entry[0].changes[0].value.messages }}",
"rightValue": "",
"operator": {
"type": "array",
"operation": "exists",
"singleValue": true
}
},
{
"id": "check-text-type",
"leftValue": "={{ $json.body.entry[0].changes[0].value.messages[0].type }}",
"rightValue": "text",
"operator": {
"type": "string",
"operation": "equals"
}
}
],
"combinator": "and"
},
"options": {}
},
"id": "filter-messages",
"name": "Filtrar Mensagens de Texto",
"type": "n8n-nodes-base.filter",
"typeVersion": 2.2,
"position": [
660,
380
]
},
{
"parameters": {
"mode": "raw",
"jsonOutput": "={\n \"from\": \"{{ $json.body.entry[0].changes[0].value.messages[0].from }}\",\n \"name\": \"{{ $json.body.entry[0].changes[0].value.contacts[0].profile.name }}\",\n \"text\": {{ JSON.stringify($json.body.entry[0].changes[0].value.messages[0].text.body) }},\n \"messageId\": \"{{ $json.body.entry[0].changes[0].value.messages[0].id }}\"\n}",
"options": {}
},
"id": "extract-message",
"name": "Extrair Dados da Mensagem",
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
880,
380
]
},
{
"parameters": {
"promptType": "define",
"text": "={{ $json.text }}",
"options": {
"systemMessage": "Voc\u00ea \u00e9 um assistente de atendimento ao cliente via WhatsApp.\n\n## Comportamento\n- Seja educado, prestativo e objetivo nas respostas.\n- Responda sempre em portugu\u00eas brasileiro.\n- Mantenha as respostas curtas e diretas, adequadas para WhatsApp.\n- Se n\u00e3o souber a resposta, diga que vai verificar e pe\u00e7a para o cliente aguardar.\n- Nunca invente informa\u00e7\u00f5es que voc\u00ea n\u00e3o tem certeza.\n\n## Informa\u00e7\u00f5es do Neg\u00f3cio\n- Nome da empresa: [Nome da Empresa]\n- Hor\u00e1rio de funcionamento: Segunda a Sexta, 9h \u00e0s 18h\n- Contato: [telefone/email]\n\n## Perguntas Frequentes\n1. Pergunta: [pergunta exemplo]\n Resposta: [resposta exemplo]\n\n## Regras\n- N\u00e3o compartilhe dados sens\u00edveis de outros clientes.\n- Se o cliente pedir para falar com um humano, informe que a equipe ser\u00e1 notificada.\n- Para assuntos urgentes, oriente o cliente a ligar para o n\u00famero de suporte."
}
},
"id": "ai-agent",
"name": "AI Agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"typeVersion": 1.7,
"position": [
1100,
380
]
},
{
"parameters": {
"options": {
"model": "claude-sonnet-4-6-20250514",
"maxTokensToSample": 1024
}
},
"id": "claude-model",
"name": "Claude Sonnet",
"type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
"typeVersion": 1.3,
"position": [
1060,
600
],
"credentials": {
"anthropicApi": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"sessionIdType": "customKey",
"sessionKey": "={{ $('Extrair Dados da Mensagem').item.json.from }}",
"contextWindowLength": 20
},
"id": "memory",
"name": "Mem\u00f3ria por Contato",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"typeVersion": 1.3,
"position": [
1240,
600
]
},
{
"parameters": {
"method": "POST",
"url": "=https://graph.facebook.com/v21.0/{{ $credentials.whatsappPhoneNumberId }}/messages",
"authentication": "predefinedCredentialType",
"nodeCredentialType": "httpCustomAuth",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "Content-Type",
"value": "application/json"
}
]
},
"sendBody": true,
"specifyBody": "json",
"jsonBody": "={\n \"messaging_product\": \"whatsapp\",\n \"to\": \"{{ $('Extrair Dados da Mensagem').item.json.from }}\",\n \"type\": \"text\",\n \"text\": {\n \"body\": {{ JSON.stringify($json.output) }}\n }\n}",
"options": {}
},
"id": "send-whatsapp",
"name": "Enviar Resposta WhatsApp",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
1340,
380
]
}
],
"connections": {
"Webhook Verifica\u00e7\u00e3o": {
"main": [
[
{
"node": "Responder Challenge",
"type": "main",
"index": 0
}
]
]
},
"Webhook Mensagens": {
"main": [
[
{
"node": "Responder 200",
"type": "main",
"index": 0
},
{
"node": "Filtrar Mensagens de Texto",
"type": "main",
"index": 0
}
]
]
},
"Filtrar Mensagens de Texto": {
"main": [
[
{
"node": "Extrair Dados da Mensagem",
"type": "main",
"index": 0
}
]
]
},
"Extrair Dados da Mensagem": {
"main": [
[
{
"node": "AI Agent",
"type": "main",
"index": 0
}
]
]
},
"Claude Sonnet": {
"ai_languageModel": [
[
{
"node": "AI Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Mem\u00f3ria por Contato": {
"ai_memory": [
[
{
"node": "AI Agent",
"type": "ai_memory",
"index": 0
}
]
]
},
"AI Agent": {
"main": [
[
{
"node": "Enviar Resposta WhatsApp",
"type": "main",
"index": 0
}
]
]
}
},
"settings": {
"executionOrder": "v1"
},
"staticData": null,
"tags": [],
"triggerCount": 2
}
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.
anthropicApi
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
WhatsApp Agent com Claude. Uses agent, lmChatAnthropic, memoryBufferWindow, httpRequest. Webhook trigger; 10 nodes.
Source: https://github.com/A7laundry/a7-planos-assinatura/blob/695edcc7e3a7c7c174e2061cce7d5be84f0f1436/n8n-workflow.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.
AI Energy Analysis. Uses agent, lmChatAnthropic, memoryBufferWindow, httpRequestTool. Webhook trigger; 15 nodes.
Lead Pipeline v3.0. Uses httpRequest, agent, lmChatAnthropic, toolThink. Webhook trigger; 77 nodes.
This workflow turns your WhatsApp Business number into a 24/7 AI-powered customer assistant — without any third-party chatbot platform. It receives incoming WhatsApp messages via Evolution API, unders
Avecta. Uses httpRequest, agent, lmChatAnthropic, memoryBufferWindow. Webhook trigger; 32 nodes.
Integrates GHL + Wazzap with Redis and an AI Agent using ClientInfo to process messages, generate accurate replies, and send them via a custom field trigger.