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": [
{
"parameters": {
"httpMethod": "POST",
"path": "whatsapp-webhook",
"responseFormat": "json"
},
"name": "Webhook",
"type": "n8n-nodes-base.webhook",
"typeVersion": 1,
"position": [
200,
300
]
},
{
"parameters": {
"functionCode": "const from = $json.From;\nconst payload = $json.Interactive?.button_reply?.id || (/oi/i.test($json.Body) && 'menu');\nreturn [{ json: { from, action: payload } }];"
},
"name": "Parse Button",
"type": "n8n-nodes-base.function",
"typeVersion": 1,
"position": [
400,
300
]
},
{
"parameters": {
"rules": [
{
"value1": "={{$json.action}}",
"operation": "equal",
"value2": "menu"
},
{
"value1": "={{$json.action}}",
"operation": "equal",
"value2": "liberar_he"
},
{
"value1": "={{$json.action}}",
"operation": "equal",
"value2": "bloquear_maquina"
},
{
"value1": "={{$json.action}}",
"operation": "equal",
"value2": "desbloquear_maquina"
},
{
"value1": "={{$json.action}}",
"operation": "contains",
"value2": "dept_"
},
{
"value1": "={{$json.action}}",
"operation": "contains",
"value2": "member_"
},
{
"value1": "={{$json.action}}",
"operation": "equal",
"value2": "confirm_yes"
}
]
},
"name": "Switch Action",
"type": "n8n-nodes-base.switch",
"typeVersion": 1,
"position": [
600,
300
]
},
{
"parameters": {
"url": "=https://graph.facebook.com/v15.0/{{ $credentials.whatsappPhoneNumberId }}/messages",
"method": "POST",
"jsonParameters": true,
"options": {},
"headers": {
"Authorization": "Bearer {{ $credentials.whatsappToken }}",
"Content-Type": "application/json"
},
"bodyParametersJson": "={\n \"messaging_product\": \"whatsapp\",\n \"to\": {{$json.from}},\n \"type\": \"interactive\",\n \"interactive\": {\n \"type\": \"button\",\n \"body\": { \"text\": \"Ol\u00e1! Escolha uma a\u00e7\u00e3o:\" },\n \"action\": {\n \"buttons\": [\n { \"type\": \"reply\", \"reply\": { \"id\": \"liberar_he\", \"title\": \"Liberar HE\" } },\n { \"type\": \"reply\", \"reply\": { \"id\": \"bloquear_maquina\", \"title\": \"Bloquear m\u00e1quina\" } },\n { \"type\": \"reply\", \"reply\": { \"id\": \"desbloquear_maquina\", \"title\": \"Desbloquear m\u00e1quina\" } }\n ]\n }\n }\n}"
},
"name": "Send Initial Menu",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 1,
"position": [
800,
200
]
},
{
"parameters": {
"url": "https://sua-api.local/api/registerSelection",
"method": "POST",
"jsonParameters": true,
"bodyParametersJson": "={ \"user\": {{$json.from}}, \"stage\": \"initial\", \"selection\": \"{{$json.action}}\" }"
},
"name": "Register Initial",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 1,
"position": [
1000,
200
]
},
{
"parameters": {
"url": "=https://graph.facebook.com/v15.0/{{ $credentials.whatsappPhoneNumberId }}/messages",
"method": "POST",
"jsonParameters": true,
"options": {},
"headers": {
"Authorization": "Bearer {{ $credentials.whatsappToken }}",
"Content-Type": "application/json"
},
"bodyParametersJson": "={\n \"messaging_product\": \"whatsapp\",\n \"to\": {{$json.from}},\n \"type\": \"interactive\",\n \"interactive\": {\n \"type\": \"button\",\n \"body\": { \"text\": \"Escolha o departamento:\" },\n \"action\": {\n \"buttons\": [\n { \"type\": \"reply\", \"reply\": { \"id\": \"dept_ti\", \"title\": \"TI\" } },\n { \"type\": \"reply\", \"reply\": { \"id\": \"dept_financeiro\", \"title\": \"Financeiro\" } },\n { \"type\": \"reply\", \"reply\": { \"id\": \"dept_rh\", \"title\": \"RH\" } }\n ]\n }\n }\n}"
},
"name": "Send Department Menu",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 1,
"position": [
1200,
200
]
},
{
"parameters": {
"url": "https://sua-api.local/api/registerSelection",
"method": "POST",
"jsonParameters": true,
"bodyParametersJson": "={ \"user\": {{$json.from}}, \"stage\": \"department\", \"selection\": \"{{$json.action}}\" }"
},
"name": "Register Department",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 1,
"position": [
1400,
200
]
},
{
"parameters": {
"url": "=https://graph.facebook.com/v15.0/{{ $credentials.whatsappPhoneNumberId }}/messages",
"method": "POST",
"jsonParameters": true,
"options": {},
"headers": {
"Authorization": "Bearer {{ $credentials.whatsappToken }}",
"Content-Type": "application/json"
},
"bodyParametersJson": "={\n \"messaging_product\": \"whatsapp\",\n \"to\": {{$json.from}},\n \"type\": \"interactive\",\n \"interactive\": {\n \"type\": \"button\",\n \"body\": { \"text\": \"Escolha o membro:\" },\n \"action\": {\n \"buttons\": {{$json.action === 'dept_ti' ? [\n { \"type\": \"reply\", \"reply\": { \"id\": \"member_alice\", \"title\": \"Alice\" } },\n { \"type\": \"reply\", \"reply\": { \"id\": \"member_bob\", \"title\": \"Bob\" } }\n ] : $json.action === 'dept_financeiro' ? [\n { \"type\": \"reply\", \"reply\": { \"id\": \"member_carla\", \"title\": \"Carla\" } },\n { \"type\": \"reply\", \"reply\": { \"id\": \"member_daniel\", \"title\": \"Daniel\" } }\n ] : [\n { \"type\": \"reply\", \"reply\": { \"id\": \"member_eva\", \"title\": \"Eva\" } },\n { \"type\": \"reply\", \"reply\": { \"id\": \"member_frank\", \"title\": \"Frank\" } }\n ]}}}\n}"
},
"name": "Send Member Menu",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 1,
"position": [
1600,
200
]
},
{
"parameters": {
"url": "https://sua-api.local/api/registerSelection",
"method": "POST",
"jsonParameters": true,
"bodyParametersJson": "={ \"user\": {{$json.from}}, \"stage\": \"member\", \"selection\": \"{{$json.action}}\" }"
},
"name": "Register Member",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 1,
"position": [
1800,
200
]
},
{
"parameters": {
"url": "=https://graph.facebook.com/v15.0/{{ $credentials.whatsappPhoneNumberId }}/messages",
"method": "POST",
"jsonParameters": true,
"options": {},
"headers": {
"Authorization": "Bearer {{ $credentials.whatsappToken }}",
"Content-Type": "application/json"
},
"bodyParametersJson": "={\n \"messaging_product\": \"whatsapp\",\n \"to\": {{$json.from}},\n \"type\": \"interactive\",\n \"interactive\": {\n \"type\": \"button\",\n \"body\": { \"text\": \"Confirma a a\u00e7\u00e3o escolhida?\" },\n \"action\": {\n \"buttons\": [\n { \"type\": \"reply\", \"reply\": { \"id\": \"confirm_yes\", \"title\": \"Confirmar\" } },\n { \"type\": \"reply\", \"reply\": { \"id\": \"menu\", \"title\": \"Cancelar\" } }\n ]\n }\n }\n}"
},
"name": "Send Confirmation",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 1,
"position": [
2000,
200
]
},
{
"parameters": {
"url": "https://sua-api.local/api/executeAction",
"method": "POST",
"jsonParameters": true,
"bodyParametersJson": "={ \"user\": {{$json.from}}, \"confirm\": true }"
},
"name": "Process Action",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 1,
"position": [
2200,
200
]
},
{
"parameters": {
"responseCode": 200
},
"name": "HTTP Response",
"type": "n8n-nodes-base.httpResponse",
"typeVersion": 1,
"position": [
2400,
200
]
}
],
"connections": {
"Webhook": {
"main": [
[
{
"node": "Parse Button",
"type": "main",
"index": 0
}
]
]
},
"Parse Button": {
"main": [
[
{
"node": "Switch Action",
"type": "main",
"index": 0
}
]
]
},
"Switch Action": {
"main": [
[
{
"node": "Send Initial Menu",
"type": "main",
"index": 0
}
],
[
{
"node": "Register Initial",
"type": "main",
"index": 1
}
],
[
{
"node": "Register Initial",
"type": "main",
"index": 2
}
],
[
{
"node": "Register Initial",
"type": "main",
"index": 3
}
],
[
{
"node": "Register Department",
"type": "main",
"index": 4
}
],
[
{
"node": "Register Member",
"type": "main",
"index": 5
}
],
[
{
"node": "Process Action",
"type": "main",
"index": 6
}
]
]
},
"Send Initial Menu": {
"main": [
[
{
"node": "HTTP Response",
"type": "main",
"index": 0
}
]
]
},
"Register Initial": {
"main": [
[
{
"node": "Send Department Menu",
"type": "main",
"index": 0
}
]
]
},
"Send Department Menu": {
"main": [
[
{
"node": "HTTP Response",
"type": "main",
"index": 0
}
]
]
},
"Register Department": {
"main": [
[
{
"node": "Send Member Menu",
"type": "main",
"index": 0
}
]
]
},
"Send Member Menu": {
"main": [
[
{
"node": "HTTP Response",
"type": "main",
"index": 0
}
]
]
},
"Register Member": {
"main": [
[
{
"node": "Send Confirmation",
"type": "main",
"index": 0
}
]
]
},
"Send Confirmation": {
"main": [
[
{
"node": "HTTP Response",
"type": "main",
"index": 0
}
]
]
},
"Process Action": {
"main": [
[
{
"node": "HTTP Response",
"type": "main",
"index": 0
}
]
]
}
}
}
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
Meeta. Uses httpRequest, httpResponse. Webhook trigger; 12 nodes.
Source: https://gist.github.com/achatadogamer/fe4676919e864bc6f9d0ea71a9bab9bd — 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.
This n8n template provides enterprise-level version control for your workflows using GitHub integration. Stop losing hours to broken workflows and manual exports – get proper commit history, visual di
This flow creates dummy files for every item added in your *Arrs (Radarr/Sonarr) with the tag .
This workflow acts as a central API gateway for all technical indicator agents in the Binance Spot Market Quant AI system. It listens for incoming webhook requests and dynamically routes them to the c
Sign PDF documents with legally-compliant digital signatures using X.509 certificates. Supports multiple PAdES signature levels (B, T, LT, LTA) with optional visible stamps.
📡 This workflow serves as the central Alpha Vantage API fetcher for Tesla trading indicators, delivering cleaned 20-point JSON outputs for three timeframes: , , and . It is required by the following a