AutomationFlowsSlack & Telegram › N8n Fluxo Whatsapp Melhorado 2025

N8n Fluxo Whatsapp Melhorado 2025

N8N Fluxo Whatsapp Melhorado 2025. Uses mySql, httpRequest. Webhook trigger; 30 nodes.

Webhook trigger★★★★★ complexity30 nodesMySQLHTTP Request
Slack & Telegram Trigger: Webhook Nodes: 30 Complexity: ★★★★★ Added:

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 →

Download .json
{
  "nodes": [
    {
      "parameters": {
        "content": "## \ud83d\udccc GUIA DE FUNCIONAMENTO DO FLUXO\n\n### \ud83c\udfaf Objetivo\nAutoma\u00e7\u00e3o completa de captura de leads via WhatsApp com qualifica\u00e7\u00e3o e distribui\u00e7\u00e3o entre vendedores\n\n### 5\ufe0f\u20e3 Etapas Principais\n\n**1\ufe0f\u20e3 ENTRADA**\n\u25aa Webhook recebe mensagem WhatsApp Business\n\u25aa Extrai dados do contato (nome, n\u00famero, mensagem)\n\n**2\ufe0f\u20e3 BUSCA DE DADOS**\n\u25aa Carrega negocia\u00e7\u00f5es existentes do RD Station\n\u25aa Extrai n\u00fameros de telefone e IDs de contatos\n\u25aa Prepara lista para processamento\n\n**3\ufe0f\u20e3 VALIDA\u00c7\u00c3O E ROD\u00cdZIO**\n\u25aa Verifica se contato j\u00e1 existe no funil\n\u25aa Se novo \u2192 calcula pr\u00f3ximo vendedor (sistema circular com 7 vendedores)\n\u25aa Atualiza banco para pr\u00f3xima rota\u00e7\u00e3o\n\n**4\ufe0f\u20e3 CRIA\u00c7\u00c3O DE NEGOCIA\u00c7\u00c3O**\n\u25aa Cria deal no RD Station\n\u25aa Vincula ao vendedor sorteado\n\u25aa Envia primeira pergunta de qualifica\u00e7\u00e3o\n\n**5\ufe0f\u20e3 QUALIFICA\u00c7\u00c3O**\n\u25aa 1\u00aa pergunta: Qual equipamento? (1=CNC, 2=Laser, 3=Outros)\n\u25aa 2\u00aa pergunta: Canal de chegada? (1=Facebook, 2=Instagram, 3=Site, 4=Google)\n\u25aa Atualiza origem no CRM\n\u25aa Envia confirma\u00e7\u00e3o final\n\n\u23f1\ufe0f **Tempo total:** ~3 segundos por lead",
        "height": 550,
        "color": {
          "a": 1,
          "b": 0,
          "g": 0,
          "r": 1
        }
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -2800,
        600
      ],
      "id": "doc-fluxo-completo-002",
      "name": "\ud83c\udfac FLUXO COMPLETO EM 5 ETAPAS"
    },
    {
      "parameters": {
        "content": "## \ud83d\udc65 ROD\u00cdZIO DE VENDEDORES\n\n**Equipe Ativa (7 vendedores):**\n1\ufe0f Angelina Mariano\n2\ufe0f Carlos da Mak\n3\ufe0f Daniel Lima\n4\ufe0f Igor Henrique Behrend\n5\ufe0f Let\u00edcia F\u00e9lix\n6\ufe0f Luana Maria Maria\n7\ufe0f Mauricio Ranghiere\n\n**Como funciona:**\n\u2705 Sistema circular autom\u00e1tico\n\u2705 Incrementa +1 a cada novo lead\n\u2705 Volta para #1 ap\u00f3s o #7\n\u2705 Estado salvo em: mak_vendedores.nome\n\n**Para ADICIONAR vendedor:**\n1. Edite: \ud83c\udfaf Calcular pr\u00f3ximo vendedor\n2. Na array 'users', adicione novo objeto\n3. Salve e ative automaticamente\n\n**\u00daltimo vendedor utilizado:**\nVerifique em: \ud83d\udcbe Consultar rod\u00edzio",
        "height": 380,
        "color": {
          "a": 1,
          "b": 0,
          "g": 0.7,
          "r": 1
        }
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        300,
        550
      ],
      "id": "doc-vendedores-002",
      "name": "\ud83d\udc65 LISTA DE VENDEDORES"
    },
    {
      "parameters": {
        "content": "## \ud83d\udcac PERGUNTAS DE QUALIFICA\u00c7\u00c3O\n\n\ud83d\udfe6 **PERGUNTA 1** (n\u00f3: Enviar: Qual equipamento?)\n\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502 Qual tipo de equipamento?  \u2502\n\u2502 1\ufe0f Router CNC               \u2502\n\u2502 2\ufe0f M\u00e1quina a Laser          \u2502\n\u2502 3\ufe0f Outros                   \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n\n\ud83d\udfe6 **PERGUNTA 2** (n\u00f3: Enviar: Qual canal chegou?)\n\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502 Por qual canal voc\u00ea chegou?\u2502\n\u2502 1\ufe0f Facebook                 \u2502\n\u2502 2\ufe0f Instagram                \u2502\n\u2502 3\ufe0f Nosso site               \u2502\n\u2502 4\ufe0f Google/Outros            \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n\n\u26a0\ufe0f Respostas s\u00e3o processadas automaticamente\n\u2705 Cada resposta altera a origem do lead no CRM",
        "height": 350,
        "color": {
          "a": 1,
          "b": 0.5,
          "g": 0.7,
          "r": 1
        }
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        1200,
        400
      ],
      "id": "doc-perguntas-002",
      "name": "\ud83d\udcac PERGUNTAS (RESPOSTAS)"
    },
    {
      "parameters": {
        "content": "## \ud83d\udd10 CREDENCIAIS & TOKENS\n\n\ud83d\udd35 **MYSQL** (mak_vendedores)\n\u251c\u2500 ID: Ub9rBEg0XhqvXIoI\n\u251c\u2500 Nome: MySQL account 3\n\u2514\u2500 Fun\u00e7\u00e3o: Armazena rod\u00edzio de vendedores\n\n\ud83d\udd34 **RD STATION API**\n\u251c\u2500 Token 1: 695d49fc5fb...\n\u2502  \u2514\u2500 Criar negocia\u00e7\u00f5es\n\u251c\u2500 Token 2: 6051e93e0bcf...\n\u2502  \u2514\u2500 Atualizar origem de leads\n\u2514\u2500 Setup: https://crm.rdstation.com/api/v1/deals\n\n\ud83d\udc9a **WHATSAPP CLOUD API**\n\u251c\u2500 Token: EAAM8ap6Qllg...\n\u251c\u2500 App ID: 942971575572951\n\u251c\u2500 URL: https://graph.facebook.com/v19.0/\n\u2502      942971575572951/messages\n\u2514\u2500 Vers\u00e3o: v19.0 (checar atualiza\u00e7\u00f5es)\n\n\u26a0\ufe0f SEGURAN\u00c7A\n\u2717 N\u00e3o fa\u00e7a commit de tokens\n\u2717 Use vari\u00e1veis de ambiente\n\u2717 Rotine tokens a cada 90 dias",
        "height": 420,
        "color": {
          "a": 1,
          "b": 1,
          "g": 0.5,
          "r": 0.5
        }
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        2400,
        600
      ],
      "id": "doc-credentials-002",
      "name": "\ud83d\udd11 TOKENS & CREDENCIAIS"
    },
    {
      "parameters": {
        "content": "## \ud83c\udfa8 PALETA VISUAL DO FLUXO\n\n\ud83d\udfe6 **AZUIS** = Entrada (Webhook)\n\ud83d\udfe8 **AMARELOS** = Processamento (Code)\n\ud83d\udcca **AMARELOS** = Banco de Dados (MySQL)\n\ud83d\udd34 **VERMELHOS** = Condi\u00e7\u00f5es (IF)\n\ud83d\udfe2 **VERDES** = API Calls (HTTP)\n\ud83d\udfea **ROCOS** = Agrega\u00e7\u00e3o (Aggregate/Switch)\n\nEssa cor adjuda a rastrear o fluxo visualmente\ne identifica problemas mais rapidamente.",
        "height": 280,
        "color": {
          "a": 1,
          "b": 0.5,
          "g": 0.5,
          "r": 0.2
        }
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        2400,
        1250
      ],
      "id": "doc-colors-002",
      "name": "\ud83c\udfa8 PALETA VISUAL"
    },
    {
      "parameters": {
        "content": "## \ud83d\ude80 COMO ATIVAR E TESTAR\n\n\u2705 **PASSO 1: Ativar Webhook**\n1. Clique no n\u00f3 \"\ud83d\ude80 [ENTRADA] WhatsApp - Webhook\"\n2. Pressione \"Listen\" (bot\u00e3o azul)\n3. URL gerada: https://n8n.sumconnectia.tech/webhook/rhinoBOT\n\n\u2705 **PASSO 2: Validar no Meta**\n1. Painel Meta Business\n2. Configure webhook com URL acima\n3. Valide token de verifica\u00e7\u00e3o\n\n\u2705 **PASSO 3: Testar Envio**\n1. Envie mensagem no WhatsApp\n2. V\u00e1 \u00e0 aba \"Executions\"\n3. Verifique se entrada foi capturada\n\n\u2705 **PASSO 4: Validar Fluxo Completo**\n1. Clique em cada n\u00f3 output\n2. Confirme dados transformados\n3. Verifique se deal foi criado no RD\n\n\ud83d\udca1 **DICA:** Ative em modo test (Flow > Runs > Test) primeiro",
        "height": 420,
        "color": {
          "a": 1,
          "b": 0.8,
          "g": 0.5,
          "r": 1
        }
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -2800,
        1350
      ],
      "id": "doc-ativar-002",
      "name": "\ud83d\ude80 ATIVAR & TESTAR"
    },
    {
      "parameters": {
        "content": "## \ud83d\udee0\ufe0f TROUBLESHOOTING\n\n\u274c Lead n\u00e3o chega ao RD?\n\u2514\u2500 \u2705 Token RD expirado \u2192 Renovar em RD Station\n\n\u274c Mensagem WhatsApp n\u00e3o envia?\n\u2514\u2500 \u2705 Token Bearer inv\u00e1lido \u2192 Validar no Meta Business\n\n\u274c Rod\u00edzio n\u00e3o avan\u00e7a?\n\u2514\u2500 \u2705 DB n\u00e3o atualiza \u2192 Verificar credenciais MySQL\n\n\u274c Webhook n\u00e3o recebe?\n\u2514\u2500 \u2705 URL n\u00e3o ativa \u2192 Clicar \"Listen\" novamente\n\n\u274c Contato aparece 2x?\n\u2514\u2500 \u2705 Sem valida\u00e7\u00e3o \u2192 Adicionar IF de verifica\u00e7\u00e3o\n\n\u274c C\u00f3digo com erro?\n\u2514\u2500 \u2705 Sintaxe JavaScript \u2192 Ver console de erro\n\n\ud83d\udcca **Ver detalhes do erro:**\n1. Clique na bolt icon (\u26a1) na execu\u00e7\u00e3o\n2. Procure por \"error\" ou \"failed\"\n3. Copie mensagem de erro\n4. Corrija no n\u00f3 correspondente",
        "height": 420,
        "color": {
          "a": 1,
          "b": 0.2,
          "g": 0.3,
          "r": 1
        }
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -2800,
        2000
      ],
      "id": "doc-troubleshooting-002",
      "name": "\ud83d\udee0\ufe0f RESOLVER PROBLEMAS"
    },
    {
      "parameters": {
        "content": "## \ud83d\udccb CHECKLIST DI\u00c1RIO\n\n\u2610 Validar webhook ligado\n\u2610 Conferir token WhatsApp v\u00e1lido\n\u2610 Enviar mensagem de teste\n\u2610 Verificar cria\u00e7\u00e3o de negocia\u00e7\u00e3o no RD\n\u2610 Conferir rod\u00edzio avan\u00e7a corretamente\n\u2610 Revisar logs de execu\u00e7\u00e3o\n\u2610 Testar envio de ambas as perguntas\n\u2610 Confirmar atualiza\u00e7\u00e3o de origem\n\n**Executar se houver problemas:**\n1. Ir \u00e0 execu\u00e7\u00e3o com erro\n2. Clicar no n\u00f3 vermelho\n3. Ver mensagem de erro\n4. Corrigir par\u00e2metros\n5. Salvar fluxo\n6. Executar novamente",
        "height": 350,
        "color": {
          "a": 1,
          "b": 0.8,
          "g": 0.8,
          "r": 0.2
        }
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        1200,
        1700
      ],
      "id": "doc-checklist-002",
      "name": "\u2705 CHECKLIST DI\u00c1RIO"
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "n8n-nodes-base.splitInBatches",
      "typeVersion": 3,
      "position": [
        -448,
        1760
      ],
      "id": "fa75e50a-e7ee-4c9e-87aa-ae3269f1e580",
      "name": "\ud83d\udd04 Loop - Processar cada contato"
    },
    {
      "parameters": {
        "operation": "select",
        "table": {
          "__rl": true,
          "value": "mak_vendedores",
          "mode": "list",
          "cachedResultName": "mak_vendedores"
        },
        "returnAll": true,
        "options": {}
      },
      "type": "n8n-nodes-base.mySql",
      "typeVersion": 2.4,
      "position": [
        576,
        1280
      ],
      "id": "692a6d81-42cf-4714-8c70-47136cea55bf",
      "name": "\ud83d\udcbe Consultar rod\u00edzio de vendedores",
      "credentials": {
        "mySql": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "0d8c5459-e810-4a25-a867-fcafc487bdf7",
              "leftValue": "={{ $json.contact_phone.split(\"+\")[1].trim() }}",
              "rightValue": "={{ $('Webhook1').item.json.body.entry[0].changes[0].value.messages[0].from }}",
              "operator": {
                "type": "string",
                "operation": "equals",
                "name": "filter.operator.equals"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        -128,
        1872
      ],
      "id": "21d09e98-6aea-4dea-b591-d397bfc322fe",
      "name": "\u26a0\ufe0f Verificar se contato j\u00e1 existe"
    },
    {
      "parameters": {
        "jsCode": "const users = [\n  { id: \"694acff8816ebc001e9cab67\", name: \"Angelina Mariano\", whats: null },\n  { id: \"69653c6c69675e001d209f17\", name: \"Carlos da Mak\", whats: null },\n  { id: \"694ac74cc285820017920d6e\", name: \"Daniel Lima\", whats: null },\n  { id: \"69491e2111e608001cf0bde6\", name: \"Igor Henrique Behrend\", whats: null },\n  { id: \"694ac712b1088c001efc2637\", name: \"Let\u00edcia F\u00e9lix\", whats: null },\n  { id: \"694ad004e7a7720013f0b5ee\", name: \"Luana Maria Maria\", whats: null },\n  { id: \"696e6b245794b00017d62610\", name: \"Mauricio Ranghiere\", whats: null }\n];\n\n// ID recebido no input\nconst idAtual = $input.first().json.nome; \n// se preferir usar outro campo, ajuste aqui\n\n// Fun\u00e7\u00e3o de rod\u00edzio circular\nfunction getProximoUsuario(id) {\n  const indexAtual = users.findIndex(user => user.id === id);\n\n  // Se n\u00e3o encontrar o ID, come\u00e7a do primeiro\n  if (indexAtual === -1) {\n    return users[0];\n  }\n\n  const proximoIndex = (indexAtual + 1) % users.length;\n  return users[proximoIndex];\n}\n\nconst proximoUsuario = getProximoUsuario(idAtual);\n\n// Retorno no formato do n8n\nreturn [\n  {\n    json: {\n      id: proximoUsuario.id,\n      nome: proximoUsuario.name,\n      whats: proximoUsuario.whats\n    }\n  }\n];\n"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        896,
        1296
      ],
      "id": "f54856e1-c3b6-49af-98e7-a8dfbe6b6b31",
      "name": "\ud83c\udfaf Calcular pr\u00f3ximo vendedor (Rod\u00edzio)"
    },
    {
      "parameters": {
        "operation": "executeQuery",
        "query": "UPDATE mak_vendedores\nSET nome = '{{ $json.id }}'\nWHERE id = 1;\n",
        "options": {}
      },
      "type": "n8n-nodes-base.mySql",
      "typeVersion": 2.4,
      "position": [
        1216,
        1296
      ],
      "id": "1697290f-ddfb-4a91-9b4d-817130ea4f0e",
      "name": "\u270f\ufe0f Atualizar tabela com novo vendedor",
      "credentials": {
        "mySql": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "d4f3deed-0e26-4cc0-86aa-0ff42f3710f6",
              "leftValue": "={{ $('Webhook1').item.json.body.entry[0].changes[0].value.messages[0].text.body }}",
              "rightValue": "",
              "operator": {
                "type": "string",
                "operation": "exists",
                "singleValue": true
              }
            },
            {
              "id": "f3cbaa76-b466-4289-a737-3a8be22dcb06",
              "leftValue": "={{ $('Webhook1').item.json.body.entry[0].changes[0].value.messages[0].text.body }}",
              "rightValue": "3",
              "operator": {
                "type": "string",
                "operation": "equals",
                "name": "filter.operator.equals"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        560,
        1552
      ],
      "id": "2ba95334-ad1e-4318-8faf-908c222cc486",
      "name": "\ud83d\udd0d Usu\u00e1rio selecionou 'Outros'?"
    },
    {
      "parameters": {
        "url": "https://crm.rdstation.com/api/v1/deals",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "limit",
              "value": "200"
            },
            {
              "name": "start_date",
              "value": "={{ new Date().toISOString().split('T')[0] + 'T15:00:00' }}"
            },
            {
              "name": "end_date",
              "value": "={{ new Date(Date.now() - 5 * 24 * 60 * 60 * 1000).toISOString().split('T')[0] + 'T15:00:00' }}\n\n"
            },
            {
              "name": "deal_pipeline_id",
              "value": "694176a2158f6d00149ca8a0"
            },
            {
              "name": "token",
              "value": "695d49fc5fb01600182421e1"
            }
          ]
        },
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "accept",
              "value": "application/json"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        -1856,
        1760
      ],
      "id": "5dcb93e3-586b-45fb-9b08-dad85f67214d",
      "name": "\ud83d\udcca Carregar negocia\u00e7\u00f5es do RD Station"
    },
    {
      "parameters": {
        "jsCode": "const item = $input.item.json;\nconst results = [];\n\nif (item.deals && Array.isArray(item.deals)) {\n  for (const deal of item.deals) {\n    if (deal.contacts && Array.isArray(deal.contacts)) {\n      for (const contact of deal.contacts) {\n        const phone = contact.phones?.[0]?.phone || null;\n\n        results.push({\n          json: {\n            deal_id: deal.id,\n            contact_name: contact.name,\n            contact_phone: phone\n          }\n        });\n      }\n    }\n  }\n}\n\nreturn results;\n"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        -1296,
        1760
      ],
      "id": "bb1782c9-000f-406a-a28c-4911ae291008",
      "name": "\ud83d\udd0c Extrair n\u00fameros e IDs dos contatos"
    },
    {
      "parameters": {
        "fieldToSplitOut": "deal_id, contact_name, contact_phone",
        "options": {}
      },
      "type": "n8n-nodes-base.splitOut",
      "typeVersion": 1,
      "position": [
        -688,
        1760
      ],
      "id": "a003a66e-c752-48eb-860c-47a849c16489",
      "name": "\ud83d\udccb Distribuir contatos em lista"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "d4f3deed-0e26-4cc0-86aa-0ff42f3710f6",
              "leftValue": "={{ $('Webhook1').item.json.body.entry[0].changes[0].value.messages[0].text.body }}",
              "rightValue": "",
              "operator": {
                "type": "string",
                "operation": "exists",
                "singleValue": true
              }
            },
            {
              "id": "f3cbaa76-b466-4289-a737-3a8be22dcb06",
              "leftValue": "={{ $('Webhook1').item.json.body.entry[0].changes[0].value.messages[0].text.body }}",
              "rightValue": "1",
              "operator": {
                "type": "string",
                "operation": "equals",
                "name": "filter.operator.equals"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        192,
        1296
      ],
      "id": "b735f3a9-7f5f-4d04-af92-e8038d4e9a23",
      "name": "\u2705 Usu\u00e1rio selecionou 'Router CNC'?"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "d4f3deed-0e26-4cc0-86aa-0ff42f3710f6",
              "leftValue": "={{ $('Webhook1').item.json.body.entry[0].changes[0].value.messages[0].text.body }}",
              "rightValue": "",
              "operator": {
                "type": "string",
                "operation": "exists",
                "singleValue": true
              }
            },
            {
              "id": "f3cbaa76-b466-4289-a737-3a8be22dcb06",
              "leftValue": "={{ $('Webhook1').item.json.body.entry[0].changes[0].value.messages[0].text.body }}",
              "rightValue": "2",
              "operator": {
                "type": "string",
                "operation": "equals",
                "name": "filter.operator.equals"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        192,
        1552
      ],
      "id": "f8747fa5-abb6-4b6c-a226-2d12645e2780",
      "name": "\u26a1 Usu\u00e1rio selecionou 'Laser'?"
    },
    {
      "parameters": {
        "fieldsToAggregate": {
          "fieldToAggregate": [
            {}
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.aggregate",
      "typeVersion": 1,
      "position": [
        -112,
        1440
      ],
      "id": "6117adeb-a778-4a22-b5c0-70ef130408ca",
      "name": "\ud83e\udde9 Agrupar respostas"
    },
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "rhinoBOT",
        "responseMode": "responseNode",
        "options": {}
      },
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2.1,
      "position": [
        -2272,
        1760
      ],
      "id": "3ea12607-bda1-466a-a94f-756501e60cee",
      "name": "\ud83d\ude80 [ENTRADA] WhatsApp - Webhook"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://graph.facebook.com/v19.0/942971575572951/messages",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "<redacted-credential>"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"messaging_product\": \"whatsapp\",\n  \"to\": \"{{ $('Webhook1').item.json.body.entry[0].changes[0].value.contacts[0].wa_id }}\",\n  \"type\": \"text\",\n  \"text\": {\n    \"body\": \"Ol\u00e1! Eu sou a *Maria*, da *MAK* \ud83e\udd8f\\n\\nPara te ajudar de forma mais r\u00e1pida e precisa, qual tipo de equipamento voc\u00ea est\u00e1 buscando?\\n\\n\ud83d\udc49 *Responda apenas com o n\u00famero:*\\n\\n1 Router CNC\\n2\ufe0f M\u00e1quina a Laser\\n3\ufe0f Outros\"\n  }\n}\n ",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.3,
      "position": [
        976,
        1584
      ],
      "id": "1664feaf-be7e-403b-ad06-6e70c2da04d4",
      "name": "\ud83c\udfaf Enviar: Qual equipamento?"
    },
    {
      "parameters": {
        "rules": {
          "values": [
            {
              "conditions": {
                "conditions": [
                  {
                    "leftValue": "={{ $('Webhook1').item.json.body.entry[0].changes[0].value.messages[0].text.body }}",
                    "rightValue": "1",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    }
                  }
                ]
              },
              "renameOutput": true,
              "outputKey": "Facebook"
            },
            {
              "conditions": {
                "conditions": [
                  {
                    "leftValue": "={{ $('Webhook1').item.json.body.entry[0].changes[0].value.messages[0].text.body }}",
                    "rightValue": "2",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    }
                  }
                ]
              },
              "renameOutput": true,
              "outputKey": "Instagram"
            },
            {
              "conditions": {
                "conditions": [
                  {
                    "leftValue": "={{ $('Webhook1').item.json.body.entry[0].changes[0].value.messages[0].text.body }}",
                    "rightValue": "3",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    }
                  }
                ]
              },
              "renameOutput": true,
              "outputKey": "Site"
            },
            {
              "conditions": {
                "conditions": [
                  {
                    "leftValue": "={{ $('Webhook1').item.json.body.entry[0].changes[0].value.messages[0].text.body }}",
                    "rightValue": "4",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    }
                  }
                ]
              },
              "renameOutput": true,
              "outputKey": "Google"
            }
          ]
        },
        "options": {}
      },
      "id": "ed696e41-876d-498e-9113-4a420125e2c2",
      "name": "\ud83c\udf10 Rotear por origem (Facebook/Instagram/Site/Google)",
      "type": "n8n-nodes-base.switch",
      "typeVersion": 3,
      "position": [
        224,
        1872
      ]
    },
    {
      "parameters": {
        "method": "PUT",
        "url": "=https://crm.rdstation.com/api/v1/deals/{{ $json.deal_id }}",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "token",
              "value": "6051e93e0bcfa7000ae397fe"
            }
          ]
        },
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "accept",
              "value": "application/json"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "{ \"deal_source\": { \"_id\": \"694176a2158f6d00149ca89c\" } }",
        "options": {}
      },
      "id": "666c9f80-9733-4dd5-9767-a56329e4fddc",
      "name": "\ud83d\udcd8 Atualizar origem: Facebook/Instagram",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4,
      "position": [
        880,
        1840
      ]
    },
    {
      "parameters": {
        "method": "PUT",
        "url": "=https://crm.rdstation.com/api/v1/deals/{{ $json.deal_id }}",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "token",
              "value": "6051e93e0bcfa7000ae397fe"
            }
          ]
        },
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "accept",
              "value": "application/json"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "{ \"deal_source\": { \"_id\": \"694176a2158f6d00149ca895\" } }",
        "options": {}
      },
      "id": "d5a0f391-d337-42dc-a631-ea65558024fd",
      "name": "\ud83c\udf0d Atualizar origem: Site",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4,
      "position": [
        880,
        2032
      ]
    },
    {
      "parameters": {
        "method": "PUT",
        "url": "=https://crm.rdstation.com/api/v1/deals/{{ $json.deal_id }}",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "token",
              "value": "6051e93e0bcfa7000ae397fe"
            }
          ]
        },
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "accept",
              "value": "application/json"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "{ \"deal_source\": { \"_id\": \"694176a2158f6d00149ca89a\" } }",
        "options": {}
      },
      "id": "12e8235e-a545-41cb-a307-f2379fb9271a",
      "name": "\ud83d\udd0d Atualizar origem: Google/Outros",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4,
      "position": [
        880,
        2208
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://graph.facebook.com/v19.0/942971575572951/messages",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "<redacted-credential>"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"messaging_product\": \"whatsapp\",\n  \"to\": \"{{ $('Webhook1').item.json.body.entry[0].changes[0].value.contacts[0].wa_id }}\",\n  \"type\": \"text\",\n  \"text\": {\n    \"body\": \"Por qual canal voc\u00ea chegou at\u00e9 a *Rhino*? \ud83d\ude0a\\n\\n\ud83d\udc49 *Responda apenas com o n\u00famero:*\\n\\n1\ufe0f Facebook\\n2\ufe0f Instagram\\n3\ufe0f Nosso site\\n4\ufe0f Google\"\n  }\n}\n",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.3,
      "position": [
        1872,
        1296
      ],
      "id": "2c81fd97-ceb7-493b-b1b8-6bd6cbe6d19e",
      "name": "\ud83d\udcf1 Enviar: Qual canal chegou?"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://graph.facebook.com/v19.0/942971575572951/messages",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "<redacted-credential>"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"messaging_product\": \"whatsapp\",\n  \"to\": \"5551983097389\",\n  \"type\": \"text\",\n  \"text\": {\n    \"body\": \"\ud83d\udea8 *NOVO LEAD CADASTRADO PARA VOC\u00ca*\\n\\n\ud83d\udccc *T\u00edtulo:* {{ $('Cria negocia\u00e7\u00e3o').item.json.name }}\\n\ud83d\udd52 *Criado em:* {{ $now.format('dd-MM-yyyy HH:mm') }}\\n\\n\ud83d\udc49 *Clique para iniciar a conversa:*\\nhttps://wa.me/{{ $('Webhook1').item.json.body.entry[0].changes[0].value.contacts[0].wa_id }}\"\n  }\n}\n",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.3,
      "position": [
        2160,
        1296
      ],
      "id": "c83b77e9-8cc3-4f92-83f7-8cab89942ffc",
      "name": "[DESATIVADO] \ud83d\udcac Notificar vendedor",
      "disabled": true
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://crm.rdstation.com/api/v1/deals",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "token",
              "value": "695d49fc5fb01600182421e1"
            }
          ]
        },
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "accept",
              "value": "application/json"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"deal\": {\n    \"name\": \"{{ $('Webhook1').item.json.body.entry[0].changes[0].value.contacts[0].profile.name }}\",\n    \"deal_stage_id\": \"694176a2158f6d00149ca8a2\",\n    \"user_id\": \"{{ $('Encontra o pr\u00f3ximo1').item.json.id }}\"\n  },\n  \"contacts\": [\n    {\n      \"phones\": [\n        {\n          \"phone\": \"+{{ $('Webhook1').item.json.body.entry[0].changes[0].value.messages[0].from }}\",\n          \"type\": \"cellphone\"\n        }\n      ],\n      \"name\": \"{{ $('Webhook1').item.json.body.entry[0].changes[0].value.contacts[0].profile.name }}-{{ $('Webhook1').item.json.body.entry[0].changes[0].value.contacts[0].wa_id }}\"\n    }\n  ]\n} ",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        1568,
        1296
      ],
      "id": "f82e9221-cde7-446a-ad46-e94bce0d101e",
      "name": "\u2728 Criar negocia\u00e7\u00e3o no RD Station"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://graph.facebook.com/v19.0/942971575572951/messages",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "<redacted-credential>"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"messaging_product\": \"whatsapp\",\n  \"to\": \"{{ $('Webhook1').item.json.body.entry[0].changes[0].value.contacts[0].wa_id }}\",\n  \"type\": \"text\",\n  \"text\": {\n    \"body\": \"Obrigada pela resposta! \ud83d\ude0a\\n\\nJ\u00e1 estamos com as informa\u00e7\u00f5es por aqui e, em breve, um de nossos consultores entrar\u00e1 em contato para te ajudar da melhor forma poss\u00edvel.\\n\\nAt\u00e9 j\u00e1! \ud83e\udd8f\"\n  }\n}\n",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.3,
      "position": [
        1280,
        2048
      ],
      "id": "cf52fe94-ed1f-483e-adf7-5df0df5648b9",
      "name": "\ud83d\udc4b Enviar: Mensagem de confirma\u00e7\u00e3o"
    }
  ],
  "connections": {
    "Loop Over Items1": {
      "main": [
        [
          {
            "node": "Aggregate1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Existe no funil?1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Pega Ultimo vendedor1": {
      "main": [
        [
          {
            "node": "Encontra o pr\u00f3ximo1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Existe no funil?1": {
      "main": [
        [
          {
            "node": "Switch - Origem Lead",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Loop Over Items1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Encontra o pr\u00f3ximo1": {
      "main": [
        [
          {
            "node": "Atualiza com o novo Vendedor1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Atualiza com o novo Vendedor1": {
      "main": [
        [
          {
            "node": "Cria negocia\u00e7\u00e3o",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "\u00e9 cnc2": {
      "main": [
        [],
        [
          {
            "node": "mensagem token permenente",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Carrega negocia\u00e7\u00f5es": {
      "main": [
        [
          {
            "node": "Separa n\u00famero e IDs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Separa n\u00famero e IDs": {
      "main": [
        [
          {
            "node": "Cria lista",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Cria lista": {
      "main": [
        [
          {
            "node": "Loop Over Items1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "\u00e9 cnc": {
      "main": [
        [
          {
            "node": "Pega Ultimo vendedor1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "\u00e9 cnc1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "\u00e9 cnc1": {
      "main": [
        [
          {
            "node": "Pega Ultimo vendedor1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "\u00e9 cnc2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate1": {
      "main": [
        [
          {
            "node": "\u00e9 cnc",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook1": {
      "main": [
        [
          {
            "node": "Carrega negocia\u00e7\u00f5es",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "mensagem token permenente": {
      "main": [
        []
      ]
    },
    "Switch - Origem Lead": {
      "main": [
        [
          {
            "node": "Instagram / Facebook",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Instagram / Facebook",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Contato pelo Site",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Google e Outros Buscadores",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Instagram / Facebook": {
      "main": [
        [
          {
            "node": "msg -  canal de chegada1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Contato pelo Site": {
      "main": [
        [
          {
            "node": "msg -  canal de chegada1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google e Outros Buscadores": {
      "main": [
        [
          {
            "node": "msg -  canal de chegada1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "msg -  canal de chegada": {
      "main": [
        [
          {
            "node": "msg - aviso vendedor",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Cria negocia\u00e7\u00e3o": {
      "main": [
        [
          {
            "node": "msg -  canal de chegada",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "meta": {
    "templateCredsSetupCompleted": true
  }
}

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.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

N8N Fluxo Whatsapp Melhorado 2025. Uses mySql, httpRequest. Webhook trigger; 30 nodes.

Source: https://github.com/Fernando-Godinho/FIBERMEYER/blob/2372c5dcbae3a4a2fc76b6374c77923d49e51de1/backups/n8n_fluxo_whatsapp_MELHORADO_2025.json — original creator credit. Request a take-down →

More Slack & Telegram workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

Slack & Telegram

Post-Task Processing. Uses mySql, httpRequest, telegram. Webhook trigger; 8 nodes.

MySQL, HTTP Request, Telegram
Slack & Telegram

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

HTTP Request, Slack
Slack & Telegram

This workflow is a complete, production-ready solution for recovering abandoned carts in Shopify stores using a multi-channel, multi-touch approach. It automates personalized follow-ups via Email, SMS

HTTP Request, Shopify, SendGrid +5
Slack & Telegram

qualiopi. Uses airtable, telegram, emailSend, httpRequest. Webhook trigger; 51 nodes.

Airtable, Telegram, Email Send +3
Slack & Telegram

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

HTTP Request, Postgres, Slack +1