{
  "name": "WhatsApp Order Agent Workflow",
  "nodes": [
    {
      "id": "node-1",
      "name": "WhatsApp Trigger",
      "type": "n8n-nodes-base.webhook",
      "parameters": {
        "path": "whatsapp-webhook",
        "method": "POST"
      },
      "position": [
        100,
        200
      ]
    },
    {
      "id": "node-2",
      "name": "AI Intent Analysis",
      "type": "n8n-nodes-base.openai",
      "parameters": {
        "model": "gpt-4",
        "prompt": "Analyze the user's message: {{ $node[\"WhatsApp Trigger\"].json[\"body\"][\"message\"] }}. Extract the product and quantity if they want to order something."
      },
      "position": [
        300,
        200
      ]
    },
    {
      "id": "node-3",
      "name": "Check Inventory",
      "type": "n8n-nodes-base.httpRequest",
      "parameters": {
        "url": "https://api.inventory.local/check",
        "method": "POST",
        "bodyParameters": {
          "product": "={{ $node[\"AI Intent Analysis\"].json[\"extracted\"][\"product\"] }}"
        }
      },
      "position": [
        500,
        200
      ]
    },
    {
      "id": "node-4",
      "name": "Send WhatsApp Response",
      "type": "n8n-nodes-base.whatsapp",
      "parameters": {
        "message": "Hello! We've received your order for {{ $node[\"AI Intent Analysis\"].json[\"extracted\"][\"quantity\"] }}x {{ $node[\"AI Intent Analysis\"].json[\"extracted\"][\"product\"] }}. We're processing it now!"
      },
      "position": [
        700,
        200
      ]
    }
  ],
  "connections": {
    "node-1": {
      "main": [
        [
          {
            "node": "node-2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "node-2": {
      "main": [
        [
          {
            "node": "node-3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "node-3": {
      "main": [
        [
          {
            "node": "node-4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}