{
  "name": "Automated referral reward system with email verification and visual coupons",
  "nodes": [
    {
      "id": "fe5b07ff-5797-4250-a69e-49860089cdca",
      "name": "Sticky Note - Setup Credentials",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1552,
        80
      ],
      "parameters": {
        "width": 520,
        "height": 432,
        "content": "## 🔐 SETUP CREDENTIALS REQUIRED\n\n\n1️⃣ **VerifiEmail API Key**\n   - Sign up at: https://verifi.email\n   - Get your API key from dashboard\n\n2️⃣ **HTMLCSStoImage API**\n   - Sign up at: https://htmlcsstoi"
      }
    },
    {
      "id": "716c5cc8-d3fe-41e2-ac10-7c65c509b234",
      "name": "Webhook Trigger",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -880,
        368
      ]
    },
    {
      "id": "302609be-73be-4d33-bd9d-b9fba0077c64",
      "name": "Sticky Note - Webhook",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1008,
        48
      ],
      "parameters": {
        "width": 380,
        "height": 460,
        "content": "## 🎯 WEBHOOK TRIGGER\n\n**Purpose:** Receives referral form submissions from Jotform\n\n**Expected Data:**\n```json\n{\n  \"referrer_name\": \"John Doe\",\n  \"referrer_email\": \"john@example.com\",\n  \"referred_frie"
      }
    },
    {
      "id": "7b2fa8ce-5ed9-4e78-8373-2aa62845fffb",
      "name": "Sticky Note - Email Verification",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -608,
        192
      ],
      "parameters": {
        "width": 204,
        "height": 332,
        "content": "## ✅ EMAIL VERIFICATION\n\n**Purpose:** Validate referrer email to prevent abuse and fake submissions\n"
      }
    },
    {
      "id": "776e1c97-2b01-42c9-ae75-463823f90646",
      "name": "IF Email Valid?",
      "type": "n8n-nodes-base.if",
      "position": [
        -320,
        368
      ]
    },
    {
      "id": "55e8d038-8915-42c1-8ec8-4b90869b2cfc",
      "name": "Sticky Note - Conditional Branch",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -384,
        144
      ],
      "parameters": {
        "width": 316,
        "height": 372,
        "content": "## ⚖️ CONDITIONAL LOGIC\n\n**Condition:**\n- IF `status` equals `valid`\n  → TRUE: Generate reward coupon\n  → FALSE: Send rejection email\n\n**Branches:**\n✅ TRUE → Coupon generation flow\n❌ FALSE → Invalid e"
      }
    },
    {
      "id": "40585967-a862-4c5b-a212-f20b80be4c80",
      "name": "Set Coupon Template",
      "type": "n8n-nodes-base.set",
      "position": [
        80,
        256
      ]
    },
    {
      "id": "fb96cbf0-d51c-426e-b1b8-9d5155a59a32",
      "name": "Sticky Note - Coupon Template",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -48,
        -64
      ],
      "parameters": {
        "width": 380,
        "height": 460,
        "content": "## 🎨 COUPON TEMPLATE CREATION\n\n**Purpose:** Generate personalized HTML coupon card with dynamic data\n\n**Fields Created:**\n1. `html_content` - Complete HTML/CSS coupon card\n2. `referrer_name` - From we"
      }
    },
    {
      "id": "9f826d92-a7ad-4254-9413-574d0e4587f9",
      "name": "Sticky Note - HTML to Image",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        352,
        64
      ],
      "parameters": {
        "width": 204,
        "height": 332,
        "content": "## 🖼️ HTML TO IMAGE CONVERSION\n\n**Purpose:** Convert HTML coupon card into a high-quality PNG image\n\n"
      }
    },
    {
      "id": "1148e573-98e7-41ae-9295-7cf0113a357c",
      "name": "Send Reward Email (Gmail)",
      "type": "n8n-nodes-base.gmail",
      "position": [
        656,
        256
      ]
    },
    {
      "id": "95d7218e-cbb2-4c33-a31b-f7140b764e82",
      "name": "Sticky Note - Reward Email",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        576,
        -16
      ],
      "parameters": {
        "width": 332,
        "height": 444,
        "content": "## 📧 SEND REWARD EMAIL\n\n**Purpose:** Deliver personalized reward email with coupon image to referrer\n\n Coupon is Here!\"\n- **Body:** HTML formatted with:\n  • Personalized greeting\n  • Embedded coupon i"
      }
    },
    {
      "id": "eb052f76-0c33-418a-a6a2-c9a1835e46ab",
      "name": "Log to Google Sheets (Success)",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1008,
        256
      ]
    },
    {
      "id": "f019b026-0714-4523-bd95-0bde43ade8d7",
      "name": "Sticky Note - Log Success",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        928,
        -32
      ],
      "parameters": {
        "width": 380,
        "height": 464,
        "content": "## 📊 LOG TO GOOGLE SHEETS (SUCCESS)\n\n**Purpose:** Track all successful referral rewards for analytics and reporting\n\n**Sheet Name:** Referral_Reward_Tracker\n**Operation:** Append Row\n\n**Sheet Headers "
      }
    },
    {
      "id": "9e8164af-fe19-4170-91ce-fdab6228d09c",
      "name": "Send Invalid Email Notice",
      "type": "n8n-nodes-base.gmail",
      "position": [
        80,
        464
      ]
    },
    {
      "id": "a3492dc2-37c2-41ae-be4e-b92c5990d66d",
      "name": "Sticky Note - Invalid Email Notice",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -16,
        448
      ],
      "parameters": {
        "width": 316,
        "height": 496,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n## ❌ INVALID EMAIL NOTIFICATION\n\n**Purpose:** Inform user their email failed verification\n\n**Email Content:**\n- Polite explanation of verification failure\n- Possible reasons:\n  • Email ty"
      }
    },
    {
      "id": "3435d390-9873-4c19-87a1-c6a5dbb92cbd",
      "name": "Log to Google Sheets (Failed)",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        400,
        464
      ]
    },
    {
      "id": "2c134161-6eb6-4ff0-8fe1-98f92f04f9f4",
      "name": "Sticky Note - Log Failed",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        320,
        448
      ],
      "parameters": {
        "width": 396,
        "height": 576,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n## 📊 LOG TO GOOGLE SHEETS (FAILED)\n\n**Purpose:** Track failed verification attempts for analysis\n\n**Analytics Value:**\n- Identify patterns in failed submissions\n- Track conversion rate ("
      }
    },
    {
      "id": "dfcf248e-bc0c-47f6-b652-cb399892c3a3",
      "name": "Verifi Email",
      "type": "n8n-nodes-verifiemail.verifiEmail",
      "position": [
        -560,
        368
      ]
    },
    {
      "id": "2dc38b0a-115d-4c60-9cbb-177c305b571b",
      "name": "HTML/CSS to Image",
      "type": "n8n-nodes-htmlcsstoimage.htmlCssToImage",
      "position": [
        400,
        256
      ]
    }
  ],
  "connections": {
    "Verifi Email": {
      "main": [
        [
          {
            "node": "IF Email Valid?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "IF Email Valid?": {
      "main": [
        [
          {
            "node": "Set Coupon Template",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Send Invalid Email Notice",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook Trigger": {
      "main": [
        [
          {
            "node": "Verifi Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTML/CSS to Image": {
      "main": [
        [
          {
            "node": "Send Reward Email (Gmail)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Coupon Template": {
      "main": [
        [
          {
            "node": "HTML/CSS to Image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Invalid Email Notice": {
      "main": [
        [
          {
            "node": "Log to Google Sheets (Failed)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Reward Email (Gmail)": {
      "main": [
        [
          {
            "node": "Log to Google Sheets (Success)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}