{
  "name": "Growwh — Website Lead / Abandoned Cart to WhatsApp + Google Sheets",
  "nodes": [
    {
      "parameters": { "httpMethod": "POST", "path": "growwh-lead-capture", "responseMode": "onReceived" },
      "id": "webhook-1",
      "name": "Lead / Cart Webhook",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2,
      "position": [240, 300]
    },
    {
      "parameters": {
        "operation": "append",
        "documentId": { "__rl": true, "value": "YOUR_GOOGLE_SHEET_ID", "mode": "id" },
        "sheetName": { "__rl": true, "value": "Leads", "mode": "name" }
      },
      "id": "sheets-1",
      "name": "Log to Google Sheets CRM",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [480, 220]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://graph.facebook.com/v19.0/YOUR_PHONE_NUMBER_ID/messages",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            { "name": "Authorization", "value": "Bearer YOUR_WHATSAPP_TOKEN" }
          ]
        },
        "sendBody": true,
        "jsonBody": "={\n  \"messaging_product\": \"whatsapp\",\n  \"to\": \"{{ $json.phone }}\",\n  \"type\": \"template\",\n  \"template\": { \"name\": \"abandoned_cart_nudge\", \"language\": { \"code\": \"en\" } }\n}"
      },
      "id": "wa-1",
      "name": "Send WhatsApp Follow-Up",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [480, 400]
    }
  ],
  "connections": {
    "Lead / Cart Webhook": {
      "main": [
        [
          { "node": "Log to Google Sheets CRM", "type": "main", "index": 0 },
          { "node": "Send WhatsApp Follow-Up", "type": "main", "index": 0 }
        ]
      ]
    }
  },
  "active": false,
  "settings": { "executionOrder": "v1" }
}
