{
  "name": "Patient pre-registration system with email verification & QR health cards using Google Drive",
  "nodes": [
    {
      "id": "2f91d899-694a-44da-852a-0512536b9b23",
      "name": "Webhook Trigger",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -768,
        384
      ]
    },
    {
      "id": "3d40b91e-1254-4a36-b103-f985c0d9895d",
      "name": "Validate Input Data",
      "type": "n8n-nodes-base.code",
      "position": [
        -560,
        384
      ]
    },
    {
      "id": "aa616b7f-4d48-4254-b0e1-bb875d9fd3f8",
      "name": "Check Email Valid",
      "type": "n8n-nodes-base.if",
      "position": [
        -112,
        384
      ]
    },
    {
      "id": "20ce83eb-f542-4be2-b39d-614c7d3cf2a7",
      "name": "Generate QR Code",
      "type": "n8n-nodes-base.code",
      "position": [
        256,
        224
      ]
    },
    {
      "id": "eef2eaf3-bf1d-447d-a94e-b4e63f33f061",
      "name": "Build Health Card HTML",
      "type": "n8n-nodes-base.code",
      "position": [
        448,
        224
      ]
    },
    {
      "id": "0e4b60f6-05f8-464b-8c0b-8f8914d7187f",
      "name": "Download PNG Binary",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        912,
        224
      ]
    },
    {
      "id": "e47dfc72-f44c-40ba-9d9e-ddd0d04b496f",
      "name": "Upload PNG to Drive",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        1216,
        224
      ]
    },
    {
      "id": "6e3a7d51-6a71-461c-bcc1-0ae809df2a4f",
      "name": "Email Health Card to Patient",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1680,
        0
      ]
    },
    {
      "id": "1d873484-7910-4bb4-ac54-272e59b47d1e",
      "name": "Notify Reception Team",
      "type": "n8n-nodes-base.slack",
      "position": [
        1680,
        224
      ]
    },
    {
      "id": "f40c352d-cea8-4a68-80f5-37a887607035",
      "name": "Log to Patient Database",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1696,
        448
      ]
    },
    {
      "id": "5080bad8-26d2-494f-be09-ec8aaf3ef40b",
      "name": "Respond to Webhook",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        2016,
        224
      ]
    },
    {
      "id": "924cf82b-8ca4-4dc3-a7a6-e8fe594980b7",
      "name": "Stop and Error",
      "type": "n8n-nodes-base.stopAndError",
      "position": [
        272,
        576
      ]
    },
    {
      "id": "8757e513-b95f-4ed7-ae9a-70c3d3bcc203",
      "name": "Verifi Email",
      "type": "n8n-nodes-verifiemail.verifiEmail",
      "position": [
        -352,
        384
      ]
    },
    {
      "id": "d9d1b4ef-ed96-46f2-b565-92a016dcee27",
      "name": "HTML/CSS to Image",
      "type": "n8n-nodes-htmlcsstoimage.htmlCssToImage",
      "position": [
        704,
        224
      ]
    },
    {
      "id": "22dd2a05-108e-44aa-93b3-3f5cf3179f41",
      "name": "Sticky Note - Main Overview",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1280,
        112
      ],
      "parameters": {
        "width": 420,
        "height": 684,
        "content": "## 🏥 Patient Pre-Check-in Health Card Workflow\n\n### How it works\nThis workflow automates the complete patient pre-check-in process. When a patient submits their information via a web form, the workflo"
      }
    },
    {
      "id": "1564f9d0-c620-4695-8465-e274aeb581d9",
      "name": "Sticky Note - Input",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -816,
        128
      ],
      "parameters": {
        "width": 376,
        "height": 408,
        "content": "## 📥 Section 1: Data Input & Validation\n\nReceives patient form data via POST webhook, validates all required fields (name, email, appointment date/time), cleans and formats the data, generates a uniqu"
      }
    },
    {
      "id": "816c5d4a-eb69-4cc9-aedb-b7304b3900dc",
      "name": "Sticky Note - Verification",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -368,
        192
      ],
      "parameters": {
        "width": 432,
        "height": 360,
        "content": "## 🔍 Section 2: Email Verification\n\nVerifies patient email address using VerifiEmail API to ensure deliverability. If verification fails (valid = false), workflow stops and sends error notification to"
      }
    },
    {
      "id": "55655ae3-ee67-4f53-b094-5abb993ca022",
      "name": "Sticky Note - Generation",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        224,
        48
      ],
      "parameters": {
        "width": 824,
        "height": 328,
        "content": "## 🎨 Section 3: Health Card Generation\n\nGenerates professional health card with patient details. Creates verification URL and QR code using free QR Server API. Builds responsive HTML card with gradien"
      }
    },
    {
      "id": "bb079b7e-c946-4486-bc15-8bd2280898b3",
      "name": "Sticky Note - Storage",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1088,
        -16
      ],
      "parameters": {
        "width": 360,
        "height": 392,
        "content": "## 📁 Section 4: Google Drive Storage\n\nUploads the generated PNG health card to Google Drive in the \"Patients record\" folder. File is named using patient ID (e.g., PAT-1762965729048-E5BPPW4T4_health_ca"
      }
    },
    {
      "id": "881bced5-eca7-43b1-bcb4-65f9b8c017e4",
      "name": "Sticky Note - Delivery",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1584,
        -256
      ],
      "parameters": {
        "width": 648,
        "height": 888,
        "content": "## 📧 Section 5: Delivery & Notifications\n\nFinal parallel processing:\n(1) Emails health card to patient with PNG attachment, appointment details, Drive link, and check-in instructions \n\n(2) Sends Slack"
      }
    }
  ],
  "connections": {
    "Verifi Email": {
      "main": [
        [
          {
            "node": "Check Email Valid",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook Trigger": {
      "main": [
        [
          {
            "node": "Validate Input Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate QR Code": {
      "main": [
        [
          {
            "node": "Build Health Card HTML",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Email Valid": {
      "main": [
        [
          {
            "node": "Generate QR Code",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Stop and Error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTML/CSS to Image": {
      "main": [
        [
          {
            "node": "Download PNG Binary",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download PNG Binary": {
      "main": [
        [
          {
            "node": "Upload PNG to Drive",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload PNG to Drive": {
      "main": [
        [
          {
            "node": "Log to Patient Database",
            "type": "main",
            "index": 0
          },
          {
            "node": "Notify Reception Team",
            "type": "main",
            "index": 0
          },
          {
            "node": "Email Health Card to Patient",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Validate Input Data": {
      "main": [
        [
          {
            "node": "Verifi Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Notify Reception Team": {
      "main": [
        [
          {
            "node": "Respond to Webhook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build Health Card HTML": {
      "main": [
        [
          {
            "node": "HTML/CSS to Image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Log to Patient Database": {
      "main": [
        [
          {
            "node": "Respond to Webhook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Email Health Card to Patient": {
      "main": [
        [
          {
            "node": "Respond to Webhook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}