{
  "name": "Generate personalized promo cards with email verification, Gmail & Google Sheets",
  "nodes": [
    {
      "id": "b0df3843-bc98-4a04-b9c5-587df865c8d3",
      "name": "Edit Fields",
      "type": "n8n-nodes-base.set",
      "position": [
        576,
        816
      ]
    },
    {
      "id": "af6b8362-eea0-47fa-a524-d8053150504f",
      "name": "Generate Promo Card Image",
      "type": "n8n-nodes-htmlcsstoimage.htmlCssToImage",
      "position": [
        1504,
        688
      ]
    },
    {
      "id": "9e1bca1c-4f75-47ad-8a7c-9e42b5b7f776",
      "name": "Log Promo Distribution",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2272,
        688
      ]
    },
    {
      "id": "bcea2cef-11a1-4b63-a09f-8726ed5a0aa8",
      "name": "Set Error Data",
      "type": "n8n-nodes-base.set",
      "position": [
        1488,
        1008
      ]
    },
    {
      "id": "7135f609-3571-46c0-ba3d-79d9095109d8",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        64,
        480
      ],
      "parameters": {
        "width": 416,
        "height": 480,
        "content": "## PROMO SIGNUP TRIGGER\n\n- API: Promo code signup webhook\n- Method: POST\n- Response: 200 OK with confirmation\n- Expected JSON:\n  ```json\n  {\n    \"name\": \"John Doe\",\n    \"email\": \"customer@email.com\",\n"
      }
    },
    {
      "id": "5c7ce862-2a12-4348-9d59-2c4aa3463cb4",
      "name": "WEBHOOK",
      "type": "n8n-nodes-base.webhook",
      "position": [
        352,
        816
      ]
    },
    {
      "id": "d5bc4d1a-727d-4a2c-b038-f8f68c8b5573",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        496,
        496
      ],
      "parameters": {
        "width": 272,
        "height": 480,
        "content": "## DATA SANITIZATION\n\n- Purpose: Clean and prepare incoming data\n- Operations:\n  - Trim whitespace from all fields\n  - Set default values for missing data\n  - Add timestamp for tracking\n  - Validate r"
      }
    },
    {
      "id": "32e56db6-94ef-4d63-ba29-c58024a643d3",
      "name": "Validate Email",
      "type": "n8n-nodes-verifiemail.verifiEmail",
      "position": [
        880,
        816
      ]
    },
    {
      "id": "4e0776eb-8e47-4d6b-bfc4-48495480514a",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        800,
        480
      ],
      "parameters": {
        "width": 224,
        "height": 496,
        "content": "## EMAIL VALIDATION\n\n- Purpose: Block disposable/invalid emails\n- Check Types:\n  - Syntax validation\n  - Domain verification\n  - Mailbox existence\n  - Disposable email detection\n- Result: Valid/invali"
      }
    },
    {
      "id": "f6a6612d-7e62-45de-8b02-2b06a848a7f3",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1088,
        528
      ],
      "parameters": {
        "width": 288,
        "height": 416,
        "content": "## VALIDATION GATEWAY\n\n- Purpose: Route based on email validity\n- TRUE Branch: Valid email → Generate card\n- FALSE Branch: Invalid email → Error handling\n- Condition: valid = \"true\" OR \"false\"\n- Preve"
      }
    },
    {
      "id": "25536778-aefe-45e5-81f1-01006ca85aa7",
      "name": "Validation Gateway",
      "type": "n8n-nodes-base.if",
      "position": [
        1152,
        816
      ]
    },
    {
      "id": "75b3e1f0-1a0c-452c-ae8b-24e22d5d0cda",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1408,
        384
      ],
      "parameters": {
        "width": 336,
        "height": 480,
        "content": "## PROMO CARD GENERATION\n\n- Purpose: Create personalized promo cards\n- Service: HTML to Image API\n- Template: Professional gradient design\n- Variables: {{name}}, {{promo_code}}, {{discount_value}}\n- Q"
      }
    },
    {
      "id": "29103362-5f8e-48a8-bcfc-3809cbd69d29",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1776,
        384
      ],
      "parameters": {
        "width": 320,
        "height": 480,
        "content": "## CUSTOMER EMAIL DELIVERY\n\n- Purpose: Send promo card to verified customers\n- To: {{email}} (validated customer)\n- Subject: \"🎉 Your Exclusive {{discount_value}} Discount is Ready!\"\n- Type: HTML with "
      }
    },
    {
      "id": "51f09284-6a75-4f29-9fbc-b98778d7f47f",
      "name": "Success Path",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1904,
        688
      ]
    },
    {
      "id": "f7a274d9-a415-457c-8948-756bd04fead3",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2144,
        352
      ],
      "parameters": {
        "width": 352,
        "height": 496,
        "content": "## ANALYTICS TRACKING\n\n- Purpose: Record all successful distributions\n- Google Sheets columns:\n  - Timestamp\n  - Customer Name\n  - Email Address\n  - Promo Code\n  - Discount Value\n  - Delivery Status\n-"
      }
    },
    {
      "id": "07c54abb-da63-4e5f-9707-ff9193b9a169",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1424,
        992
      ],
      "parameters": {
        "width": 256,
        "height": 464,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n## ERROR LOGGING\n\n- Purpose: Capture failed validation attempts\n- Data Collected:\n  - Invalid email address\n  - Reason for failure\n  - Timestamp\n  - User details (if available)\n- Prevents:"
      }
    },
    {
      "id": "9fb1926d-d407-4272-811c-a116658f482b",
      "name": "Error Path",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1824,
        1008
      ]
    },
    {
      "id": "c61c8af0-85bd-41d7-a310-d56056d2b4d1",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1728,
        992
      ],
      "parameters": {
        "width": 336,
        "height": 416,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n## ADMIN NOTIFICATION\n\n- Purpose: Alert team of invalid attempts\n- To: YOUR_ADMIN_EMAIL_HERE\n- Subject: \"⚠️ Failed Promo Card Generation\"\n- Content: Error details and user information\n- He"
      }
    },
    {
      "id": "80c29be0-1ebe-431b-8c78-3c6c46019418",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -608,
        384
      ],
      "parameters": {
        "width": 592,
        "height": 784,
        "content": "## AUTOMATED PROMO CARD GENERATOR\n\n- Purpose: Generate personalized discount cards with email verification\n\n**Workflow:**  \nWebhook → Email Verification → Card Creation → Email → Sheets Log  \n\n**Highl"
      }
    }
  ],
  "connections": {
    "WEBHOOK": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields": {
      "main": [
        [
          {
            "node": "Validate Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Success Path": {
      "main": [
        [
          {
            "node": "Log Promo Distribution",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Error Data": {
      "main": [
        [
          {
            "node": "Error Path",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Validate Email": {
      "main": [
        [
          {
            "node": "Validation Gateway",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Validation Gateway": {
      "main": [
        [
          {
            "node": "Generate Promo Card Image",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Set Error Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Promo Card Image": {
      "main": [
        [
          {
            "node": "Success Path",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}