AutomationFlowsSlack & Telegram › WhatsApp Order Processing Workflow

WhatsApp Order Processing Workflow

Original n8n title: Whatsapp Order Automation

WhatsApp Order Automation. Uses httpRequest. Webhook trigger; 9 nodes.

Webhook trigger★★★★☆ complexity9 nodesHTTP Request
Slack & Telegram Trigger: Webhook Nodes: 9 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": "WhatsApp Order Automation",
  "nodes": [
    {
      "parameters": {
        "path": "whatsapp-message",
        "options": {}
      },
      "id": "webhook-trigger",
      "name": "WhatsApp Webhook",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 1,
      "position": [
        240,
        300
      ]
    },
    {
      "parameters": {
        "conditions": {
          "string": [
            {
              "value1": "={{$json[\"messageText\"]}}",
              "operation": "equal",
              "value2": "menu"
            }
          ]
        }
      },
      "id": "menu-condition",
      "name": "Is Menu Request?",
      "type": "n8n-nodes-base.if",
      "typeVersion": 1,
      "position": [
        460,
        300
      ]
    },
    {
      "parameters": {
        "url": "http://localhost:3000/api/orders",
        "options": {
          "headers": {
            "Content-Type": "application/json"
          }
        }
      },
      "id": "get-products",
      "name": "Get Products",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 3,
      "position": [
        680,
        200
      ]
    },
    {
      "parameters": {
        "url": "={{$node[\"WhatsApp Webhook\"].json[\"body\"][\"whatsapp_api_url\"]}}/messages",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "{\n  \"messaging_product\": \"whatsapp\",\n  \"to\": \"{{$json[\"phoneNumber\"]}}\",\n  \"type\": \"text\",\n  \"text\": {\n    \"body\": \"\ud83c\udf7d\ufe0f Menu:\\n\\n{{$node[\"Get Products\"].json.map(p => `${p.id}. ${p.name} - $${p.price}\\n   ${p.description}`).join('\\n\\n')}}\"\n  }\n}",
        "options": {
          "headers": {
            "Authorization": "Bearer {{$node[\"WhatsApp Webhook\"].json[\"whatsapp_access_token\"]}}"
          }
        }
      },
      "id": "send-menu",
      "name": "Send Menu",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 3,
      "position": [
        900,
        200
      ]
    },
    {
      "parameters": {
        "conditions": {
          "string": [
            {
              "value1": "={{$json[\"messageText\"]}}",
              "operation": "regex",
              "value2": "\\d+[x\u00d7]\\d+"
            }
          ]
        }
      },
      "id": "order-condition",
      "name": "Is Order?",
      "type": "n8n-nodes-base.if",
      "typeVersion": 1,
      "position": [
        680,
        400
      ]
    },
    {
      "parameters": {
        "jsCode": "// Parse order message\nconst message = $input.first().json.messageText;\nconst phoneNumber = $input.first().json.phoneNumber;\n\n// Extract items like \"1x2, 3x1\"\nconst itemMatches = message.match(/(\\d+)[x\u00d7](\\d+)/g);\nconst items = [];\n\nif (itemMatches) {\n  itemMatches.forEach(match => {\n    const [, itemId, quantity] = match.match(/(\\d+)[x\u00d7](\\d+)/);\n    items.push({\n      id: parseInt(itemId),\n      quantity: parseInt(quantity)\n    });\n  });\n}\n\nreturn [{\n  json: {\n    phoneNumber,\n    items,\n    originalMessage: message\n  }\n}];"
      },
      "id": "parse-order",
      "name": "Parse Order",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        900,
        400
      ]
    },
    {
      "parameters": {
        "url": "http://localhost:3000/api/orders",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "{\n  \"customer_phone\": \"{{$json[\"phoneNumber\"]}}\",\n  \"items\": {{JSON.stringify($json[\"items\"])}},\n  \"status\": \"pending\"\n}",
        "options": {}
      },
      "id": "create-order",
      "name": "Create Order",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 3,
      "position": [
        1120,
        400
      ]
    },
    {
      "parameters": {
        "conditions": {
          "string": [
            {
              "value1": "={{$json[\"messageText\"]}}",
              "operation": "equal",
              "value2": "track"
            }
          ]
        }
      },
      "id": "track-condition",
      "name": "Is Track Request?",
      "type": "n8n-nodes-base.if",
      "typeVersion": 1,
      "position": [
        680,
        600
      ]
    },
    {
      "parameters": {
        "url": "http://localhost:3000/api/customers/phone/{{$json[\"phoneNumber\"]}}",
        "options": {}
      },
      "id": "get-customer-orders",
      "name": "Get Customer Orders",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 3,
      "position": [
        900,
        600
      ]
    }
  ],
  "connections": {
    "WhatsApp Webhook": {
      "main": [
        [
          {
            "node": "Is Menu Request?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Is Menu Request?": {
      "main": [
        [
          {
            "node": "Get Products",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Is Order?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Products": {
      "main": [
        [
          {
            "node": "Send Menu",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Is Order?": {
      "main": [
        [
          {
            "node": "Parse Order",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Is Track Request?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse Order": {
      "main": [
        [
          {
            "node": "Create Order",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Is Track Request?": {
      "main": [
        [
          {
            "node": "Get Customer Orders",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": true,
  "settings": {},
  "createdAt": "2024-01-01T00:00:00.000Z",
  "updatedAt": "2024-01-01T00:00:00.000Z",
  "id": "whatsapp-order-automation"
}
Pro

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

About this workflow

WhatsApp Order Automation. Uses httpRequest. Webhook trigger; 9 nodes.

Source: https://github.com/mubashir-786/n8n-whatsapp-automation/blob/master/n8n-workflows/whatsapp-order-automation.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

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
Slack & Telegram

PsyCardv2. Uses executeCommand, telegram, readBinaryFile, googleDrive. Webhook trigger; 41 nodes.

Execute Command, Telegram, Read Binary File +2