This workflow follows the HTTP Request → Postgres 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": "Kids & Teen Networking - Atendimento e Agendamento WhatsApp",
"nodes": [
{
"parameters": {
"httpMethod": "POST",
"path": "whatsapp-kids-teen",
"responseMode": "onReceived"
},
"name": "Webhook WhatsApp",
"type": "n8n-nodes-base.webhook",
"typeVersion": 1,
"position": [
200,
300
]
},
{
"parameters": {
"functionCode": "const body = $json.body || $json;\nreturn [{\ntelefone: body.from || body.phone || \"\",\nmensagem: (body.message || body.text || \"\").toString().trim()\n}];"
},
"name": "Extrair Dados Mensagem",
"type": "n8n-nodes-base.function",
"typeVersion": 1,
"position": [
400,
300
]
},
{
"parameters": {
"conditions": {
"string": [
{
"value1": "={{$json.mensagem}}",
"operation": "empty"
}
]
}
},
"name": "Primeira Intera\u00e7\u00e3o",
"type": "n8n-nodes-base.if",
"typeVersion": 1,
"position": [
600,
300
]
},
{
"parameters": {
"requestMethod": "POST",
"url": "http://evolution-api:8080/message/sendText",
"jsonParameters": true,
"options": {},
"bodyParametersJson": "={\"number\":\"{{$json.telefone}}\",\"text\":\"Ol\u00e1! \ud83d\udc4b\\nBem-vindo ao Kids & Teen Networking \u2702\ufe0f\\nSal\u00e3o de beleza especializado em crian\u00e7as e adolescentes.\\n\\nComo podemos ajudar hoje?\\n\\n1\ufe0f\u20e3 Agendar hor\u00e1rio\\n2\ufe0f\u20e3 Ver servi\u00e7os\\n3\ufe0f\u20e3 Hor\u00e1rio de funcionamento\\n4\ufe0f\u20e3 Falar com atendente\"}"
},
"name": "Enviar Boas Vindas",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 2,
"position": [
800,
200
]
},
{
"parameters": {
"dataType": "string",
"value1": "={{$json.mensagem}}",
"rules": [
{
"operation": "equal",
"value2": "1"
},
{
"operation": "equal",
"value2": "2"
},
{
"operation": "equal",
"value2": "3"
},
{
"operation": "equal",
"value2": "4"
}
]
},
"name": "Menu Cliente",
"type": "n8n-nodes-base.switch",
"typeVersion": 1,
"position": [
800,
420
]
},
{
"parameters": {
"requestMethod": "POST",
"url": "http://evolution-api:8080/message/sendText",
"jsonParameters": true,
"bodyParametersJson": "={\"number\":\"{{$json.telefone}}\",\"text\":\"Perfeito! Vamos agendar. Qual \u00e9 o nome da crian\u00e7a?\"}"
},
"name": "Perguntar Nome Crian\u00e7a",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 2,
"position": [
1050,
200
]
},
{
"parameters": {
"requestMethod": "POST",
"url": "http://evolution-api:8080/message/sendText",
"jsonParameters": true,
"bodyParametersJson": "={\"number\":\"{{$json.telefone}}\",\"text\":\"Nossos principais servi\u00e7os:\\n\u2702\ufe0f Corte infantil\\n\ud83d\udc87 Corte teen\\n\ud83c\udf89 Penteados\\n\u2728 Tratamento capilar infantil\"}"
},
"name": "Enviar Servi\u00e7os",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 2,
"position": [
1050,
420
]
},
{
"parameters": {
"requestMethod": "POST",
"url": "http://evolution-api:8080/message/sendText",
"jsonParameters": true,
"bodyParametersJson": "={\"number\":\"{{$json.telefone}}\",\"text\":\"Nosso hor\u00e1rio de funcionamento:\\nSegunda a Sexta: 09:00 \u00e0s 18:00\\nS\u00e1bado: 09:00 \u00e0s 16:00\"}"
},
"name": "Enviar Hor\u00e1rio Funcionamento",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 2,
"position": [
1050,
520
]
},
{
"parameters": {
"requestMethod": "POST",
"url": "http://evolution-api:8080/message/sendText",
"jsonParameters": true,
"bodyParametersJson": "={\"number\":\"{{$json.telefone}}\",\"text\":\"Perfeito! Um atendente humano ir\u00e1 continuar seu atendimento em instantes.\"}"
},
"name": "Encaminhar Atendente",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 2,
"position": [
1050,
620
]
},
{
"parameters": {
"functionCode": "return [{\ntelefone: $json.telefone,\nnome_crianca: $json.mensagem\n}];"
},
"name": "Salvar Nome Crian\u00e7a",
"type": "n8n-nodes-base.function",
"typeVersion": 1,
"position": [
1250,
200
]
},
{
"parameters": {
"requestMethod": "POST",
"url": "http://evolution-api:8080/message/sendText",
"jsonParameters": true,
"bodyParametersJson": "={\"number\":\"{{$json.telefone}}\",\"text\":\"Qual \u00e9 a idade da crian\u00e7a?\"}"
},
"name": "Perguntar Idade",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 2,
"position": [
1450,
200
]
},
{
"parameters": {
"functionCode": "return [{\ntelefone: $json.telefone,\nidade: $json.mensagem\n}];"
},
"name": "Salvar Idade",
"type": "n8n-nodes-base.function",
"typeVersion": 1,
"position": [
1650,
200
]
},
{
"parameters": {
"requestMethod": "POST",
"url": "http://evolution-api:8080/message/sendText",
"jsonParameters": true,
"bodyParametersJson": "={\"number\":\"{{$json.telefone}}\",\"text\":\"Qual servi\u00e7o deseja realizar?\"}"
},
"name": "Perguntar Servi\u00e7o",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 2,
"position": [
1850,
200
]
},
{
"parameters": {
"functionCode": "return [{\ntelefone: $json.telefone,\nservico: $json.mensagem\n}];"
},
"name": "Salvar Servi\u00e7o",
"type": "n8n-nodes-base.function",
"typeVersion": 1,
"position": [
2050,
200
]
},
{
"parameters": {
"requestMethod": "POST",
"url": "http://evolution-api:8080/message/sendText",
"jsonParameters": true,
"bodyParametersJson": "={\"number\":\"{{$json.telefone}}\",\"text\":\"Qual data deseja agendar?\"}"
},
"name": "Perguntar Data",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 2,
"position": [
2250,
200
]
},
{
"parameters": {
"functionCode": "return [{\ntelefone: $json.telefone,\ndata_agendamento: $json.mensagem\n}];"
},
"name": "Salvar Data",
"type": "n8n-nodes-base.function",
"typeVersion": 1,
"position": [
2450,
200
]
},
{
"parameters": {
"requestMethod": "POST",
"url": "http://evolution-api:8080/message/sendText",
"jsonParameters": true,
"bodyParametersJson": "={\"number\":\"{{$json.telefone}}\",\"text\":\"Qual hor\u00e1rio voc\u00ea prefere?\"}"
},
"name": "Perguntar Hor\u00e1rio",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 2,
"position": [
2650,
200
]
},
{
"parameters": {
"functionCode": "return [{\ntelefone: $json.telefone,\nhorario_agendamento: $json.mensagem,\ndata_contato: new Date().toISOString()\n}];"
},
"name": "Salvar Hor\u00e1rio",
"type": "n8n-nodes-base.function",
"typeVersion": 1,
"position": [
2850,
200
]
},
{
"parameters": {
"operation": "executeQuery",
"query": "INSERT INTO agendamentos (nome_cliente, telefone, nome_crianca, idade, servico, data_agendamento, horario_agendamento, data_contato) VALUES ('Cliente WhatsApp', {{$json.telefone}}, {{$json.nome_crianca}}, {{$json.idade}}, {{$json.servico}}, {{$json.data_agendamento}}, {{$json.horario_agendamento}}, {{$json.data_contato}});"
},
"name": "Salvar no PostgreSQL",
"type": "n8n-nodes-base.postgres",
"typeVersion": 1,
"position": [
3050,
200
]
},
{
"parameters": {
"requestMethod": "POST",
"url": "http://evolution-api:8080/message/sendText",
"jsonParameters": true,
"bodyParametersJson": "={\"number\":\"{{$json.telefone}}\",\"text\":\"Perfeito! Seu pedido de agendamento foi registrado. Nossa equipe ir\u00e1 confirmar o hor\u00e1rio em breve.\"}"
},
"name": "Confirmar Agendamento",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 2,
"position": [
3250,
200
]
}
],
"connections": {
"Webhook WhatsApp": {
"main": [
[
{
"node": "Extrair Dados Mensagem",
"type": "main",
"index": 0
}
]
]
},
"Extrair Dados Mensagem": {
"main": [
[
{
"node": "Primeira Intera\u00e7\u00e3o",
"type": "main",
"index": 0
}
]
]
},
"Primeira Intera\u00e7\u00e3o": {
"main": [
[
{
"node": "Enviar Boas Vindas",
"type": "main",
"index": 0
}
],
[
{
"node": "Menu Cliente",
"type": "main",
"index": 0
}
]
]
},
"Menu Cliente": {
"main": [
[
{
"node": "Perguntar Nome Crian\u00e7a",
"type": "main",
"index": 0
}
],
[
{
"node": "Enviar Servi\u00e7os",
"type": "main",
"index": 0
}
],
[
{
"node": "Enviar Hor\u00e1rio Funcionamento",
"type": "main",
"index": 0
}
],
[
{
"node": "Encaminhar Atendente",
"type": "main",
"index": 0
}
]
]
},
"Perguntar Nome Crian\u00e7a": {
"main": [
[
{
"node": "Salvar Nome Crian\u00e7a",
"type": "main",
"index": 0
}
]
]
},
"Salvar Nome Crian\u00e7a": {
"main": [
[
{
"node": "Perguntar Idade",
"type": "main",
"index": 0
}
]
]
},
"Perguntar Idade": {
"main": [
[
{
"node": "Salvar Idade",
"type": "main",
"index": 0
}
]
]
},
"Salvar Idade": {
"main": [
[
{
"node": "Perguntar Servi\u00e7o",
"type": "main",
"index": 0
}
]
]
},
"Perguntar Servi\u00e7o": {
"main": [
[
{
"node": "Salvar Servi\u00e7o",
"type": "main",
"index": 0
}
]
]
},
"Salvar Servi\u00e7o": {
"main": [
[
{
"node": "Perguntar Data",
"type": "main",
"index": 0
}
]
]
},
"Perguntar Data": {
"main": [
[
{
"node": "Salvar Data",
"type": "main",
"index": 0
}
]
]
},
"Salvar Data": {
"main": [
[
{
"node": "Perguntar Hor\u00e1rio",
"type": "main",
"index": 0
}
]
]
},
"Perguntar Hor\u00e1rio": {
"main": [
[
{
"node": "Salvar Hor\u00e1rio",
"type": "main",
"index": 0
}
]
]
},
"Salvar Hor\u00e1rio": {
"main": [
[
{
"node": "Salvar no PostgreSQL",
"type": "main",
"index": 0
}
]
]
},
"Salvar no PostgreSQL": {
"main": [
[
{
"node": "Confirmar Agendamento",
"type": "main",
"index": 0
}
]
]
}
}
}
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
Kids & Teen Networking - Atendimento e Agendamento WhatsApp. Uses httpRequest, postgres. Webhook trigger; 20 nodes.
Source: https://gist.github.com/esdrasuriatendimentosclub-create/ec7907f64a83beea769b0a1e8dbc8fae — 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 workflow automates end-to-end research analysis by coordinating multiple AI models—including NVIDIA NIM (Llama), OpenAI GPT-4, and Claude to analyze uploaded documents, extract insights, and gene
QA Platform — Jira Story to Test Workflow. Uses jiraTrigger, postgres, httpRequest, slack. Webhook trigger; 20 nodes.
Advanced Workflow with Branching and Error Handling. Uses emailSend, httpRequest, postgres, slack. Webhook trigger; 12 nodes.
Atendimento WhatsApp - Cortinas Bresser. Uses httpRequest, postgres, emailSend. Webhook trigger; 8 nodes.
HR teams, IT Operations, and System Administrators managing employee onboarding at scale. It’s perfect if you use Odoo 18 to trigger account requests and need Redmine + GitLab accounts created instant