{
  "updatedAt": "2026-03-26T04:42:46.037Z",
  "createdAt": "2026-03-26T04:42:46.037Z",
  "id": "INP4nhXEYoLppWI0",
  "name": "NC Post-Purchase Delivery",
  "description": null,
  "active": false,
  "isArchived": false,
  "nodes": [
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "nc-post-purchase",
        "responseMode": "onReceived",
        "responseData": "allEntries",
        "options": {}
      },
      "id": "b1b2c3d4-0001-4000-8000-000000000001",
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2,
      "position": [
        220,
        300
      ],
      "webhookId": "nc-post-purchase"
    },
    {
      "parameters": {
        "jsCode": "const contact = $input.first().json;\nconst firstName = contact.first_name || 'Friend';\nconst email = contact.email;\nconst product = contact.product || 'guide';\nconst isBundle = product === 'bundle';\n\nconst heroImg = 'https://raw.githubusercontent.com/simon123life-del/nurse-charles-website/main/Hero%20Grid.png';\n\nconst bundleSection = isBundle ? `<div style=\"margin:20px 0;padding:16px 20px;background:rgba(96,247,250,0.08);border-left:3px solid #43797d;border-radius:0 8px 8px 0;\">\n<p style=\"margin:0 0 8px;color:#60f7fa;font-size:14px;text-transform:uppercase;letter-spacing:0.5px;font-weight:600;\">Inner Circle Access</p>\n<p style=\"margin:0;color:#e2e8f0;font-size:15px;line-height:1.6;\">You also unlocked the <strong style=\"color:#60f7fa;\">Inner Circle</strong>. This is our private community where I host live Q&As, accountability check-ins, and you connect with others who are on the same journey. Check your inbox for a separate invite with your login details.</p>\n</div>` : '';\n\nconst subject = `Your Smoke-Free Guide Is Here, ${firstName}`;\n\nconst html = `<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n<meta charset=\"UTF-8\">\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n<title>${subject}</title>\n</head>\n<body style=\"margin:0;padding:0;background-color:#0B0F1A;font-family:'Helvetica Neue',Arial,sans-serif;\">\n<table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" style=\"background-color:#0B0F1A;\">\n<tr><td align=\"center\" style=\"padding:20px 10px;\">\n<table role=\"presentation\" width=\"600\" cellpadding=\"0\" cellspacing=\"0\" style=\"background-color:#111827;border-radius:12px;overflow:hidden;\">\n<!-- Hero -->\n<tr><td style=\"position:relative;\">\n<img src=\"${heroImg}\" alt=\"Nurse Charles\" width=\"600\" style=\"display:block;width:100%;height:auto;\" />\n</td></tr>\n<!-- Body -->\n<tr><td style=\"padding:32px 40px;\">\n<p style=\"margin:0 0 8px;color:#60f7fa;font-size:14px;text-transform:uppercase;letter-spacing:0.5px;font-weight:600;\">Purchase Confirmed</p>\n<h1 style=\"margin:0 0 16px;color:#60f7fa;font-size:26px;font-weight:700;line-height:1.3;\">Thank You for Investing in Yourself, ${firstName}</h1>\n<p style=\"margin:0 0 16px;color:#e2e8f0;font-size:16px;line-height:1.6;\">You just made a decision that most people talk about but never follow through on. That says something about you.</p>\n<p style=\"margin:0 0 16px;color:#e2e8f0;font-size:16px;line-height:1.6;\">Your Smoke-Free Guide is ready. Click below to download it right now.</p>\n<table role=\"presentation\" cellpadding=\"0\" cellspacing=\"0\" style=\"margin:24px 0;\"><tr><td style=\"background-color:#43797d;border-radius:8px;padding:14px 28px;\"><a href=\"https://nursecharlesmedia.com/guide/download\" style=\"color:#ffffff;text-decoration:none;font-size:16px;font-weight:600;display:inline-block;\">Download Your Guide</a></td></tr></table>\n<div style=\"margin:20px 0;padding:16px 20px;background:rgba(96,247,250,0.08);border-left:3px solid #43797d;border-radius:0 8px 8px 0;\">\n<p style=\"margin:0 0 8px;color:#60f7fa;font-size:14px;text-transform:uppercase;letter-spacing:0.5px;font-weight:600;\">What's Inside</p>\n<p style=\"margin:0;color:#e2e8f0;font-size:15px;line-height:1.6;\"><strong>The full science</strong> of nicotine addiction, broken down so it clicks.<br/><strong>The complete 5-step replacement protocol</strong> with examples.<br/><strong>Trigger identification worksheets</strong> so you know exactly what to plan for.<br/><strong>Recovery tracking</strong> so you can see your body healing in real time.<br/><strong>The long-term framework</strong> for staying smoke-free permanently.</p>\n</div>\n${bundleSection}\n<p style=\"margin:0 0 16px;color:#e2e8f0;font-size:16px;line-height:1.6;\"><strong style=\"color:#60f7fa;\">Your lungs start healing in 72 hours.</strong> That clock starts the moment you put down the cigarette. You have the roadmap now. Let's go.</p>\n</td></tr>\n<!-- Signature -->\n<tr><td style=\"padding:0 40px 24px;\">\n<table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\"><tr><td style=\"border-top:1px solid rgba(255,255,255,0.1);padding-top:20px;\">\n<p style=\"margin:0;color:#60f7fa;font-size:16px;font-weight:600;\">Nurse Charles</p>\n<p style=\"margin:4px 0 0;color:#64748b;font-size:13px;\">Charles Folsom Jr., MSHA, BSN, RN</p>\n</td></tr></table>\n</td></tr>\n<!-- Footer -->\n<tr><td style=\"background-color:#0B0F1A;padding:24px 40px;text-align:center;\">\n<p style=\"margin:0 0 12px;\">\n<a href=\"https://www.tiktok.com/@nursecharlesmedia\" style=\"color:#64748b;text-decoration:none;margin:0 8px;font-size:13px;\">TikTok</a>\n<a href=\"https://www.instagram.com/nursecharlesmedia\" style=\"color:#64748b;text-decoration:none;margin:0 8px;font-size:13px;\">Instagram</a>\n<a href=\"https://www.youtube.com/@nursecharlesmedia\" style=\"color:#64748b;text-decoration:none;margin:0 8px;font-size:13px;\">YouTube</a>\n</p>\n<p style=\"margin:0;color:#64748b;font-size:11px;\">&copy; 2026 Nurse Charles Media. All rights reserved.</p>\n</td></tr>\n</table>\n</td></tr>\n</table>\n</body>\n</html>`;\n\nreturn [{ json: { to_email: email, subject: subject, html: html, first_name: firstName, product: product } }];"
      },
      "id": "b1b2c3d4-0001-4000-8000-000000000002",
      "name": "Generate Confirmation Email",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        440,
        300
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.resend.com/emails",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer re_MGzbun88_N9BQXp9dCQTqA9pTjfv91cJV"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"from\": \"Nurse Charles <charles@mail.nursecharlesmedia.com>\",\n  \"to\": [\"{{ $json.to_email }}\"],\n  \"reply_to\": \"partnerships@nursecharlesmedia.com\",\n  \"subject\": \"{{ $json.subject }}\",\n  \"html\": {{ JSON.stringify($json.html) }}\n}",
        "options": {}
      },
      "id": "b1b2c3d4-0001-4000-8000-000000000003",
      "name": "Send Email via Resend",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        660,
        300
      ]
    },
    {
      "parameters": {},
      "id": "b1b2c3d4-0001-4000-8000-000000000004",
      "name": "Done",
      "type": "n8n-nodes-base.noOp",
      "typeVersion": 1,
      "position": [
        880,
        300
      ]
    }
  ],
  "connections": {
    "Webhook": {
      "main": [
        [
          {
            "node": "Generate Confirmation Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Confirmation Email": {
      "main": [
        [
          {
            "node": "Send Email via Resend",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Email via Resend": {
      "main": [
        [
          {
            "node": "Done",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1",
    "callerPolicy": "workflowsFromSameOwner",
    "availableInMCP": false
  },
  "staticData": null,
  "meta": null,
  "pinData": null,
  "versionId": "4a239441-e53e-4105-adc5-d67543696d75",
  "activeVersionId": null,
  "versionCounter": 7,
  "triggerCount": 1,
  "shared": [
    {
      "updatedAt": "2026-03-26T04:42:46.039Z",
      "createdAt": "2026-03-26T04:42:46.039Z",
      "role": "workflow:owner",
      "workflowId": "INP4nhXEYoLppWI0",
      "projectId": "91dLj8Hg37i136qG",
      "project": {
        "updatedAt": "2026-03-22T06:53:28.112Z",
        "createdAt": "2026-02-12T18:32:53.056Z",
        "id": "91dLj8Hg37i136qG",
        "name": "Bryce Folsom <bfolsom@emersonnorth.com>",
        "type": "personal",
        "icon": null,
        "description": null,
        "creatorId": "17d3676f-3e74-4586-8363-5c1f4d237ed7"
      }
    }
  ],
  "tags": [],
  "activeVersion": null
}