{
  "name": "WhatsApp Gateway - Incoming Message to CRM HTTP Request",
  "nodes": [
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "whatsapp-gateway-crm",
        "responseMode": "onReceived",
        "options": {}
      },
      "id": "webhook-message-received",
      "name": "WhatsApp Gateway Webhook",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2,
      "position": [240, 300]
    },
    {
      "parameters": {
        "url": "https://crm.example.com/replace-with-lead-endpoint",
        "method": "POST",
        "sendBody": true,
        "bodyParameters": {
          "parameters": [
            {"name": "source", "value": "WhatsApp Gateway"},
            {"name": "event", "value": "={{$json.body.event}}"},
            {"name": "instance", "value": "={{$json.body.instance_name}}"},
            {"name": "contact_phone", "value": "={{$json.body.from}}"},
            {"name": "message", "value": "={{$json.body.message_text}}"},
            {"name": "received_at", "value": "={{$json.body.timestamp}}"}
          ]
        }
      },
      "id": "crm-http-placeholder",
      "name": "Create CRM Lead Placeholder",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4,
      "position": [520, 300],
      "notes": "Replace the example CRM URL and add your own authentication inside n8n."
    }
  ],
  "connections": {
    "WhatsApp Gateway Webhook": {
      "main": [[{"node": "Create CRM Lead Placeholder", "type": "main", "index": 0}]]
    }
  },
  "active": false,
  "settings": {},
  "tags": ["WhatsApp Gateway", "starter-template"]
}
