{
  "name": "WhatsApp Lead Follow-Up — reply to every lead in under 60 seconds",
  "nodes": [
    {
      "parameters": {
        "content": "## WhatsApp Lead Follow-Up (free)\n\nAnswers every new lead on WhatsApp in seconds, logs it, and sends one polite follow-up after 24h.\n\n**Setup (10 min):**\n1. Point your website form / ad platform / landing page webhook to the Webhook node URL (POST).\n2. In both HTTP Request nodes, paste your WhatsApp API key (Wati shown; respond.io/AiSensy work the same — swap the URL).\n3. Create a WhatsApp *template message* in your provider dashboard named `lead_instant_reply` and `lead_follow_up_24h`, approve them with Meta.\n4. Connect Google Sheets credentials and pick a spreadsheet.\n\n**Expected payload:** `{ \"name\": \"...\", \"phone\": \"+15551234567\", \"source\": \"website\", \"message\": \"...\" }`\n\nFull version with reply detection, day 1/3/7 cadence, lead scoring and missed-call recovery:\nhttps://stackpick-b8s.pages.dev/templates/\n\nWhich WhatsApp platform to pick (compared with real pricing):\nhttps://stackpick-b8s.pages.dev/vs/wati-vs-respond-io/",
        "height": 540,
        "width": 420
      },
      "id": "note-setup",
      "name": "Setup notes",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [-720, -160]
    },
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "lead-intake",
        "options": {}
      },
      "id": "webhook-lead",
      "name": "New lead (webhook)",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2,
      "position": [-240, 80],
      "webhookId": "lead-intake"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "a1",
              "name": "name",
              "value": "={{ $json.body.name || 'there' }}",
              "type": "string"
            },
            {
              "id": "a2",
              "name": "phone",
              "value": "={{ ($json.body.phone || '').replace(/[^+\\d]/g, '') }}",
              "type": "string"
            },
            {
              "id": "a3",
              "name": "source",
              "value": "={{ $json.body.source || 'unknown' }}",
              "type": "string"
            },
            {
              "id": "a4",
              "name": "message",
              "value": "={{ $json.body.message || '' }}",
              "type": "string"
            },
            {
              "id": "a5",
              "name": "received_at",
              "value": "={{ $now.toISO() }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "id": "set-normalize",
      "name": "Normalize lead",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [-20, 80]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "=https://live-mt-server.wati.io/YOUR_TENANT_ID/api/v1/sendTemplateMessage?whatsappNumber={{ $json.phone }}",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer YOUR_WATI_API_KEY"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={{ JSON.stringify({ template_name: 'lead_instant_reply', broadcast_name: 'lead_instant_reply', parameters: [{ name: 'name', value: $json.name }] }) }}",
        "options": {}
      },
      "id": "http-instant-reply",
      "name": "Send instant WhatsApp reply",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [200, 80]
    },
    {
      "parameters": {
        "operation": "append",
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": ""
        },
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": ""
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "received_at": "={{ $('Normalize lead').item.json.received_at }}",
            "name": "={{ $('Normalize lead').item.json.name }}",
            "phone": "={{ $('Normalize lead').item.json.phone }}",
            "source": "={{ $('Normalize lead').item.json.source }}",
            "message": "={{ $('Normalize lead').item.json.message }}",
            "status": "instant_reply_sent"
          }
        },
        "options": {}
      },
      "id": "sheets-log",
      "name": "Log lead to sheet",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [420, 80]
    },
    {
      "parameters": {
        "amount": 24,
        "unit": "hours"
      },
      "id": "wait-24h",
      "name": "Wait 24 hours",
      "type": "n8n-nodes-base.wait",
      "typeVersion": 1.1,
      "position": [640, 80],
      "webhookId": "wait-24h-lead"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "=https://live-mt-server.wati.io/YOUR_TENANT_ID/api/v1/sendTemplateMessage?whatsappNumber={{ $('Normalize lead').item.json.phone }}",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer YOUR_WATI_API_KEY"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={{ JSON.stringify({ template_name: 'lead_follow_up_24h', broadcast_name: 'lead_follow_up_24h', parameters: [{ name: 'name', value: $('Normalize lead').item.json.name }] }) }}",
        "options": {}
      },
      "id": "http-follow-up",
      "name": "Send 24h follow-up",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [860, 80]
    },
    {
      "parameters": {
        "content": "**Tip:** pause the follow-up for leads that already replied.\nIn Wati: add the contact to a 'replied' list via their automation, or check `GET /api/v1/getMessages` before this node. The paid pack ships this reply-check plus a day 1/3/7 cadence prebuilt.",
        "height": 180,
        "width": 320
      },
      "id": "note-replied",
      "name": "Reply-check tip",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [820, -140]
    }
  ],
  "connections": {
    "New lead (webhook)": {
      "main": [[{ "node": "Normalize lead", "type": "main", "index": 0 }]]
    },
    "Normalize lead": {
      "main": [[{ "node": "Send instant WhatsApp reply", "type": "main", "index": 0 }]]
    },
    "Send instant WhatsApp reply": {
      "main": [[{ "node": "Log lead to sheet", "type": "main", "index": 0 }]]
    },
    "Log lead to sheet": {
      "main": [[{ "node": "Wait 24 hours", "type": "main", "index": 0 }]]
    },
    "Wait 24 hours": {
      "main": [[{ "node": "Send 24h follow-up", "type": "main", "index": 0 }]]
    }
  },
  "settings": {
    "executionOrder": "v1"
  },
  "pinData": {},
  "meta": {
    "templateCredsSetupCompleted": false
  }
}
