{
  "name": "Lead Follow-Up Sequence",
  "nodes": [
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "new-lead",
        "responseMode": "onReceived"
      },
      "id": "3b92ba18-2fb2-4707-853f-6dd015ef31e0",
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 1,
      "position": [
        240,
        300
      ]
    },
    {
      "parameters": {
        "unit": "minutes",
        "amount": 30
      },
      "id": "c2543e21-f03e-42fe-b668-bd71c25b20ac",
      "name": "Wait 30 min",
      "type": "n8n-nodes-base.wait",
      "typeVersion": 1,
      "position": [
        460,
        300
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "={{$env.WATI_ENDPOINT}}/api/v1/sendSessionMessage/{{$json.phone}}",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "messageText",
              "value": "Hi {{$json.name}}, thanks for reaching out! I'll be in touch within a few hours to discuss how we can automate your workflow. \u2014 Ali"
            }
          ]
        }
      },
      "id": "ef025932-d6be-4cf1-9ad5-14c0ea82c6d9",
      "name": "Send WhatsApp",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 1,
      "position": [
        680,
        220
      ]
    },
    {
      "parameters": {
        "operation": "send",
        "to": "={{$json.email}}",
        "subject": "Got your message \u2014 Ali from Esipick",
        "message": "Hi {{$json.name}},\n\nThanks for reaching out! I've received your message and will be in touch within 4 hours to discuss your automation needs.\n\nBest,\nAli"
      },
      "id": "b1fdcbff-bffd-490d-a81d-616091f656f7",
      "name": "Send Email",
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 1,
      "position": [
        680,
        380
      ]
    },
    {
      "parameters": {
        "operation": "append",
        "sheetId": "={{$env.SHEET_ID}}",
        "range": "Leads!A:F"
      },
      "id": "24f14566-5877-41f6-833f-b00421455c7c",
      "name": "Add to CRM Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 1,
      "position": [
        900,
        300
      ]
    }
  ],
  "connections": {
    "Webhook": {
      "main": [
        [
          {
            "node": "Wait 30 min",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait 30 min": {
      "main": [
        [
          {
            "node": "Send WhatsApp",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Send Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send WhatsApp": {
      "main": [
        [
          {
            "node": "Add to CRM Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "tags": []
}