AutomationFlowsWeb Scraping › Jura's Food Bot V1

Jura's Food Bot V1

Jura's Food Bot v1. Uses httpRequest. Webhook trigger; 15 nodes.

Webhook trigger★★★★☆ complexity15 nodesHTTP Request
Web Scraping Trigger: Webhook Nodes: 15 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
{
  "name": "Jura's Food Bot v1",
  "nodes": [
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "whatsapp-juras",
        "responseMode": "responseNode",
        "options": {}
      },
      "id": "wh-trigger",
      "name": "Webhook Meta",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2,
      "position": [
        240,
        320
      ]
    },
    {
      "parameters": {
        "respondWith": "text",
        "responseBody": "EVENT_RECEIVED",
        "options": {
          "responseCode": 200
        }
      },
      "id": "resp-200",
      "name": "Reply 200 OK",
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1,
      "position": [
        460,
        480
      ]
    },
    {
      "parameters": {
        "jsCode": "// Extrai dados da Meta WhatsApp Webhook\nconst body = $input.first().json.body;\n\nif (!body || body.object !== 'whatsapp_business_account') {\n  return [{ json: { skip: true, reason: 'not_wa_event' } }];\n}\n\nconst messages = [];\nfor (const entry of body.entry || []) {\n  for (const change of entry.changes || []) {\n    const value = change.value || {};\n    const phoneNumberId = value.metadata?.phone_number_id;\n    for (const msg of value.messages || []) {\n      const contact = (value.contacts || []).find(c => c.wa_id === msg.from);\n      const text = msg.text?.body || msg.button?.text || msg.interactive?.button_reply?.title || '';\n      messages.push({\n        msg_id: msg.id,\n        from: msg.from,\n        timestamp: msg.timestamp,\n        type: msg.type,\n        text,\n        phone_number_id: phoneNumberId,\n        customer_name: contact?.profile?.name || null,\n        raw: msg\n      });\n    }\n  }\n}\n\nif (messages.length === 0) return [{ json: { skip: true, reason: 'no_messages' } }];\nreturn messages.map(m => ({ json: m }));"
      },
      "id": "extract",
      "name": "Extract Message",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        680,
        320
      ]
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": false,
            "leftValue": "",
            "typeValidation": "loose"
          },
          "conditions": [
            {
              "id": "skip-cond",
              "leftValue": "={{ $json.skip }}",
              "rightValue": true,
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "id": "is-skip",
      "name": "Skip non-messages",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2,
      "position": [
        900,
        320
      ]
    },
    {
      "parameters": {
        "jsCode": "// Classifier simples por keyword. Retorna intent.\nconst text = ($json.text || '').toLowerCase().trim();\nlet intent = 'default';\n\nif (/^(oi|ol\u00e1|ola|bom dia|boa tarde|boa noite|hey|opa|eai|e ai)/i.test(text.split(/\\s/)[0])) intent = 'greeting';\nelse if (/(horario|hor\u00e1rio|abrem|abre|funcionamento|fecha|hora)/.test(text)) intent = 'hours';\nelse if (/(cardap|menu|preco|pre\u00e7o|valor|combo|burger|hamb|hot.?dog|batata|refri|sucos|milkshake)/.test(text)) intent = 'menu';\nelse if (/(endereco|endere\u00e7o|onde|localiza|fica|rua|av|avenida|centro|kombi|mirassol|bady|rio.?preto)/.test(text)) intent = 'location';\nelse if (/(reclam|horriv|p\u00e9ssimo|pessimo|nojo|procon|anvisa|vigilanc|gerent|denuncia)/.test(text)) intent = 'complaint';\nelse if (/(quero|pedir|fazer.?pedido|encomend)/.test(text)) intent = 'order';\n\nreturn [{ json: { ...$json, intent } }];"
      },
      "id": "classify",
      "name": "Classify Intent",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        1120,
        220
      ]
    },
    {
      "parameters": {
        "rules": {
          "values": [
            {
              "outputKey": "greeting",
              "conditions": {
                "options": {
                  "caseSensitive": false,
                  "typeValidation": "loose"
                },
                "conditions": [
                  {
                    "leftValue": "={{ $json.intent }}",
                    "rightValue": "greeting",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    }
                  }
                ],
                "combinator": "and"
              }
            },
            {
              "outputKey": "hours",
              "conditions": {
                "options": {
                  "caseSensitive": false,
                  "typeValidation": "loose"
                },
                "conditions": [
                  {
                    "leftValue": "={{ $json.intent }}",
                    "rightValue": "hours",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    }
                  }
                ],
                "combinator": "and"
              }
            },
            {
              "outputKey": "menu",
              "conditions": {
                "options": {
                  "caseSensitive": false,
                  "typeValidation": "loose"
                },
                "conditions": [
                  {
                    "leftValue": "={{ $json.intent }}",
                    "rightValue": "menu",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    }
                  }
                ],
                "combinator": "and"
              }
            },
            {
              "outputKey": "location",
              "conditions": {
                "options": {
                  "caseSensitive": false,
                  "typeValidation": "loose"
                },
                "conditions": [
                  {
                    "leftValue": "={{ $json.intent }}",
                    "rightValue": "location",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    }
                  }
                ],
                "combinator": "and"
              }
            },
            {
              "outputKey": "complaint",
              "conditions": {
                "options": {
                  "caseSensitive": false,
                  "typeValidation": "loose"
                },
                "conditions": [
                  {
                    "leftValue": "={{ $json.intent }}",
                    "rightValue": "complaint",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    }
                  }
                ],
                "combinator": "and"
              }
            },
            {
              "outputKey": "order",
              "conditions": {
                "options": {
                  "caseSensitive": false,
                  "typeValidation": "loose"
                },
                "conditions": [
                  {
                    "leftValue": "={{ $json.intent }}",
                    "rightValue": "order",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    }
                  }
                ],
                "combinator": "and"
              }
            }
          ]
        },
        "options": {
          "fallbackOutput": "extra"
        },
        "renameFallbackOutput": "default"
      },
      "id": "switch",
      "name": "Route Intent",
      "type": "n8n-nodes-base.switch",
      "typeVersion": 3,
      "position": [
        1340,
        220
      ]
    },
    {
      "parameters": {
        "jsCode": "const nome = ($json.customer_name || '').split(' ')[0];\nconst saudacao = nome ? `Ol\u00e1, ${nome}!` : 'Ol\u00e1!';\nreturn [{ json: { ...$json, reply: `${saudacao} \ud83d\udc4b\\n\\nVoc\u00ea chegou no *Jura's Food* \u2014 a casa do interior!\\n\\nO que voc\u00ea procura?\\n\\n\ud83c\udf54 Card\u00e1pio: https://jurasfood.com.br/\\n\ud83d\udccd Unidades: 5 dispon\u00edveis\\n\ud83d\udd50 Aberto: seg-s\u00e1b 10:30-23:30 / dom 17:30-23:30\\n\\nManda pra mim:\\n\u2022 \"card\u00e1pio\" \u2014 pra ver os burgers e combos\\n\u2022 \"hor\u00e1rio\" \u2014 funcionamento\\n\u2022 \"onde fica\" \u2014 endere\u00e7os\\n\u2022 \"quero pedir\" \u2014 fazer pedido\\n\\nFica f\u00e1cil \ud83c\udf54` } }];"
      },
      "id": "reply-greeting",
      "name": "Reply: Greeting",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        1560,
        60
      ]
    },
    {
      "parameters": {
        "jsCode": "return [{ json: { ...$json, reply: '\ud83d\udd50 *Hor\u00e1rio de funcionamento*\\n\\nSegunda a s\u00e1bado: 10:30 \u00e0s 23:30\\nDomingo: 17:30 \u00e0s 23:30\\n\\nTodas as 5 unidades abrem nesse hor\u00e1rio.\\n\\nQuer ver o card\u00e1pio? Manda \"card\u00e1pio\" \ud83c\udf54' } }];"
      },
      "id": "reply-hours",
      "name": "Reply: Hours",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        1560,
        180
      ]
    },
    {
      "parameters": {
        "jsCode": "return [{ json: { ...$json, reply: '\ud83c\udf54 *Card\u00e1pio Jura\\'s Food*\\n\\nMonta seu pedido direto no nosso site (com fotos, pre\u00e7os e carrinho):\\n\\n\ud83d\udc49 https://jurasfood.com.br/\\n\\nTemos:\\n\u2022 Burgers (a partir de R$ 22)\\n\u2022 Combos completos\\n\u2022 Hot Dogs Turbinados\\n\u2022 Churrascos\\n\u2022 Milk-shakes, sucos, refris\\n\\nMonta seu pedido l\u00e1 e finaliza pelo WhatsApp da unidade mais pr\u00f3xima!' } }];"
      },
      "id": "reply-menu",
      "name": "Reply: Menu",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        1560,
        300
      ]
    },
    {
      "parameters": {
        "jsCode": "return [{ json: { ...$json, reply: '\ud83d\udccd *Nossas 5 unidades*\\n\\n\ud83c\udf54 Jura\\'s Centro JB \u2014 Av. Nove de Julho, 827\\n\ud83d\ude90 Jura\\'s Kombi JB \u2014 Av. Nove de Julho\\n\ud83c\udfea Jura\\'s Mirassol Pra\u00e7a \u2014 Pra\u00e7a An\u00edsio Moreira\\n\ud83c\udfea Jura\\'s Bady Bassitt \u2014 Av. Marginal Jos\u00e9 Marques\\n\ud83d\ude9a Jura\\'s Rio Preto Food Truck \u2014 R. S\u00e3o Jo\u00e3o, 1470\\n\\nDetalhes e mapa: https://jurasfood.com.br/' } }];"
      },
      "id": "reply-location",
      "name": "Reply: Location",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        1560,
        420
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://jurasfood.com.br/api/v1/ticket",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"channel\": \"whatsapp\",\n  \"customer_name\": {{ JSON.stringify($json.customer_name || null) }},\n  \"customer_phone\": \"{{ $json.from }}\",\n  \"type\": \"reclamacao\",\n  \"severity\": \"alta\",\n  \"subject\": \"Reclama\u00e7\u00e3o via WhatsApp\",\n  \"description\": {{ JSON.stringify($json.text) }},\n  \"metadata\": {\n    \"wa_message_id\": \"{{ $json.msg_id }}\",\n    \"phone_number_id\": \"{{ $json.phone_number_id }}\",\n    \"source\": \"n8n_bot_v1\"\n  }\n}",
        "options": {}
      },
      "id": "create-ticket",
      "name": "Create Ticket",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        1560,
        540
      ],
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "jsCode": "const ticketNumber = $json.ticket?.number || '?';\nreturn [{ json: { ...$('Classify Intent').item.json, reply: `\ud83d\ude4f Sentimos muito pelo problema.\\n\\nSua reclama\u00e7\u00e3o foi registrada (ticket #${ticketNumber}).\\n\\nO Andr\u00e9 (ouvidoria do Jura\\'s) j\u00e1 foi notificado e vai te responder em breve.\\n\\nObrigado pelo feedback \u2014 \u00e9 assim que a gente melhora.` } }];"
      },
      "id": "reply-complaint",
      "name": "Reply: Complaint",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        1780,
        540
      ]
    },
    {
      "parameters": {
        "jsCode": "return [{ json: { ...$json, reply: '\ud83d\uded2 *Fazer pedido*\\n\\nO jeito mais f\u00e1cil \u00e9 direto no nosso site com fotos e carrinho:\\n\\n\ud83d\udc49 https://jurasfood.com.br/\\n\\n1. Escolhe a unidade mais pr\u00f3xima\\n2. Monta o carrinho\\n3. Clica em \"Finalizar pelo WhatsApp\"\\n4. Voc\u00ea \u00e9 enviado pro zap da unidade com o pedido pronto\\n\\nOu prefere falar com a unidade diretamente? Manda \"onde fica\".' } }];"
      },
      "id": "reply-order",
      "name": "Reply: Order",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        1560,
        660
      ]
    },
    {
      "parameters": {
        "jsCode": "const nome = ($json.customer_name || '').split(' ')[0];\nconst saudacao = nome ? `Oi, ${nome}!` : 'Ol\u00e1!';\nreturn [{ json: { ...$json, reply: `${saudacao} Recebi sua mensagem.\\n\\nPra te ajudar mais r\u00e1pido, manda uma dessas op\u00e7\u00f5es:\\n\\n\u2022 \"card\u00e1pio\" \ud83c\udf54\\n\u2022 \"hor\u00e1rio\" \ud83d\udd50\\n\u2022 \"onde fica\" \ud83d\udccd\\n\u2022 \"quero pedir\" \ud83d\uded2\\n\u2022 \"reclama\u00e7\u00e3o\" \ud83d\ude4f (vai pra ouvidoria)\\n\\nOu acessa direto: https://jurasfood.com.br/` } }];"
      },
      "id": "reply-default",
      "name": "Reply: Default",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        1560,
        780
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "=https://graph.facebook.com/v25.0/{{ $json.phone_number_id }}/messages",
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "whatsAppApi",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"messaging_product\": \"whatsapp\",\n  \"recipient_type\": \"individual\",\n  \"to\": \"{{ $json.from }}\",\n  \"type\": \"text\",\n  \"text\": {\n    \"preview_url\": false,\n    \"body\": {{ JSON.stringify($json.reply) }}\n  }\n}",
        "options": {}
      },
      "id": "send-wa",
      "name": "Send WhatsApp",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        2100,
        400
      ],
      "credentials": {
        "whatsAppApi": {
          "name": "<your credential>"
        }
      }
    }
  ],
  "connections": {
    "Webhook Meta": {
      "main": [
        [
          {
            "node": "Extract Message",
            "type": "main",
            "index": 0
          },
          {
            "node": "Reply 200 OK",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Message": {
      "main": [
        [
          {
            "node": "Skip non-messages",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Skip non-messages": {
      "main": [
        [],
        [
          {
            "node": "Classify Intent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Classify Intent": {
      "main": [
        [
          {
            "node": "Route Intent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Route Intent": {
      "main": [
        [
          {
            "node": "Reply: Greeting",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Reply: Hours",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Reply: Menu",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Reply: Location",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Create Ticket",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Reply: Order",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Reply: Default",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Reply: Greeting": {
      "main": [
        [
          {
            "node": "Send WhatsApp",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Reply: Hours": {
      "main": [
        [
          {
            "node": "Send WhatsApp",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Reply: Menu": {
      "main": [
        [
          {
            "node": "Send WhatsApp",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Reply: Location": {
      "main": [
        [
          {
            "node": "Send WhatsApp",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Reply: Order": {
      "main": [
        [
          {
            "node": "Send WhatsApp",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Reply: Default": {
      "main": [
        [
          {
            "node": "Send WhatsApp",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Ticket": {
      "main": [
        [
          {
            "node": "Reply: Complaint",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Reply: Complaint": {
      "main": [
        [
          {
            "node": "Send WhatsApp",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "v1",
  "meta": {
    "templateCredsSetupCompleted": false
  },
  "tags": []
}

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

Jura's Food Bot v1. Uses httpRequest. Webhook trigger; 15 nodes.

Source: https://gist.github.com/andrealbino58-bot/f711a5ed3b6ce65f02c83593f2fc79fd — original creator credit. Request a take-down →

More Web Scraping workflows → · Browse all categories →

Related workflows

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

Web Scraping

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

n8n, Execute Workflow Trigger, HTTP Request +1
Web Scraping

This flow creates dummy files for every item added in your *Arrs (Radarr/Sonarr) with the tag .

HTTP Request, Ssh
Web Scraping

This workflow receives webhook requests from a content calendar and uses the X API v2 to publish text posts, threads, image/video posts, and polls, as well as delete existing posts and run a credentia

HTTP Request
Web Scraping

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

HTTP Request
Web Scraping

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.

Execute Command, HTTP Request, Read Write File +1