{
  "name": "ClientFlow \u2014 Nurture Drip (New Lead \u2192 Sequence)",
  "nodes": [
    {
      "parameters": {
        "keepOnlySet": true,
        "values": {
          "string": [
            {
              "name": "API_BASE_URL",
              "value": "https://YOUR-API-DOMAIN.com/api"
            },
            {
              "name": "ORG_ID",
              "value": "REPLACE_WITH_ORG_UUID"
            },
            {
              "name": "AUTH_TOKEN",
              "value": "Bearer REPLACE_WITH_PERSONAL_ORG_TOKEN"
            }
          ]
        }
      },
      "id": "setEnv",
      "name": "Set ENV",
      "type": "n8n-nodes-base.set",
      "typeVersion": 2,
      "position": [
        220,
        180
      ]
    },
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "clientflow/leads",
        "responseMode": "lastNode"
      },
      "id": "leadWebhook",
      "name": "Webhook (New Lead)",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2,
      "position": [
        40,
        180
      ]
    },
    {
      "parameters": {
        "requestMethod": "POST",
        "url": "={{$json.API_BASE_URL}}/contacts",
        "jsonParameters": true,
        "options": {},
        "headerParametersJson": "[{\"name\":\"Authorization\",\"value\":\"={{$json.AUTH_TOKEN}}\"}]",
        "bodyParametersJson": "{\"orgId\":\"={{$json.ORG_ID}}\",\"first_name\":\"={{$json.first_name || \\\"Lead\\\"}}\",\"last_name\":\"={{$json.last_name || \\\"\\\"}}\",\"email\":\"={{$json.email || \\\"\\\"}}\",\"phone\":\"={{$json.phone || \\\"\\\"}}\",\"tags\":[\"nurture\"]}"
      },
      "id": "createContact",
      "name": "Create/Upsert Contact",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4,
      "position": [
        420,
        180
      ]
    },
    {
      "parameters": {
        "intervals": [
          {
            "unit": "minutes",
            "value": 5
          }
        ]
      },
      "id": "wait5",
      "name": "Wait 5m",
      "type": "n8n-nodes-base.wait",
      "typeVersion": 1,
      "position": [
        660,
        180
      ]
    },
    {
      "parameters": {
        "requestMethod": "POST",
        "url": "={{$json.API_BASE_URL}}/messages/outbound",
        "jsonParameters": true,
        "options": {},
        "headerParametersJson": "[{\"name\":\"Authorization\",\"value\":\"={{$json.AUTH_TOKEN}}\"}]",
        "bodyParametersJson": "{\"orgId\":\"={{$json.ORG_ID}}\",\"channel\":\"email\",\"to_addr\":\"={{$json.email}}\",\"body\":\"Thanks for reaching out! Here's a quick overview and how to book a call.\"}"
      },
      "id": "email1",
      "name": "Email #1",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4,
      "position": [
        900,
        180
      ]
    },
    {
      "parameters": {
        "intervals": [
          {
            "unit": "hours",
            "value": 24
          }
        ]
      },
      "id": "wait24",
      "name": "Wait 24h",
      "type": "n8n-nodes-base.wait",
      "typeVersion": 1,
      "position": [
        1140,
        180
      ]
    },
    {
      "parameters": {
        "requestMethod": "POST",
        "url": "={{$json.API_BASE_URL}}/messages/outbound",
        "jsonParameters": true,
        "options": {},
        "headerParametersJson": "[{\"name\":\"Authorization\",\"value\":\"={{$json.AUTH_TOKEN}}\"}]",
        "bodyParametersJson": "{\"orgId\":\"={{$json.ORG_ID}}\",\"channel\":\"sms\",\"to_addr\":\"={{$json.phone}}\",\"body\":\"Quick question: do you prefer mornings or afternoons for a quick consult? Reply M or A.\"}"
      },
      "id": "sms1",
      "name": "SMS #1",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4,
      "position": [
        1380,
        180
      ]
    }
  ],
  "connections": {
    "Webhook (New Lead)": {
      "main": [
        [
          {
            "node": "Set ENV",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set ENV": {
      "main": [
        [
          {
            "node": "Create/Upsert Contact",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create/Upsert Contact": {
      "main": [
        [
          {
            "node": "Wait 5m",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait 5m": {
      "main": [
        [
          {
            "node": "Email #1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Email #1": {
      "main": [
        [
          {
            "node": "Wait 24h",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait 24h": {
      "main": [
        [
          {
            "node": "SMS #1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {},
  "staticData": null
}