{
  "name": "Newsletter signup flow with Email Verification API, Gmail & Google Sheets tracking",
  "nodes": [
    {
      "id": "a949eca7-950b-4d16-9015-50844e411833",
      "name": "Webhook - Newsletter Signup",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -944,
        336
      ]
    },
    {
      "id": "f05fbb8b-b55a-4386-99a3-e603b344a445",
      "name": "Sticky Note - Webhook Info",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1040,
        96
      ],
      "parameters": {
        "width": 320,
        "height": 392,
        "content": "## 🎯 WORKFLOW START\n\n**Expected Payload**:\n```json\n{\n  \"name\": \"John Doe\",\n  \"email\": \"john@example.com\",\n  \"source\": \"website_footer\"\n}\n```"
      }
    },
    {
      "id": "1a7ac1eb-2a43-4ace-86e7-1c88c1e97ac5",
      "name": "Check Data Completeness",
      "type": "n8n-nodes-base.if",
      "position": [
        -608,
        336
      ]
    },
    {
      "id": "be02be23-fbf5-4d2c-a5f5-52d0c88511b3",
      "name": "Sticky Note - Data Validation",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -688,
        96
      ],
      "parameters": {
        "width": 300,
        "height": 384,
        "content": "## ✅ DATA VALIDATION\n\n**Purpose**: Ensure required fields exist\n\n**Checks**:\n- Email is not empty\n- Name is not empty\n\n**TRUE**: Continue to email verification\n**FALSE**: Log incomplete submission"
      }
    },
    {
      "id": "97593e4d-ee1b-452e-8e15-e6aad3ff8c90",
      "name": "Log Incomplete Submissions",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -416,
        544
      ]
    },
    {
      "id": "5804f33e-ef20-4aa9-89ad-0f12f207f08e",
      "name": "Sticky Note - Log Invalid",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -464,
        528
      ],
      "parameters": {
        "width": 280,
        "height": 396,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n## 📝 LOG INVALID DATA\n\n**Sheet**: Invalid_Submissions\n**Data Logged**:\n- Timestamp\n- Name (or N/A)\n- Email (or N/A)\n- Reason: \"Incomplete data\""
      }
    },
    {
      "id": "6404d655-cebb-4bbb-8f4b-cc875b431c3a",
      "name": "Sticky Note - Email Verification",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -368,
        -96
      ],
      "parameters": {
        "width": 300,
        "height": 468,
        "content": "## 🔍 EMAIL VERIFICATION\n\n**What it checks**:\n- Email format validity\n- Domain existence\n- MX records\n- Disposable email detection\n- Deliverability score\n\n**Output**: \n- valid: true/false\n- domain info"
      }
    },
    {
      "id": "e6ced67a-7615-4cf6-8cbf-d6a299116046",
      "name": "Check Email Validity",
      "type": "n8n-nodes-base.if",
      "position": [
        16,
        224
      ]
    },
    {
      "id": "0c120ee2-e65e-4971-86dc-3dc8955eb188",
      "name": "Sticky Note - Conditional Logic",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -48,
        -32
      ],
      "parameters": {
        "width": 280,
        "height": 396,
        "content": "## ⚡CONDITIONAL ROUTING\n\n**Decision Point**: Is email valid?\n\n**Conditions**:\n- valid = true\n\n**TRUE**: Send welcome email\n**FALSE**: Handle invalid email"
      }
    },
    {
      "id": "6f87b084-7f15-496c-b992-8685d1fde0bb",
      "name": "Generate Welcome Email HTML",
      "type": "n8n-nodes-base.code",
      "position": [
        368,
        80
      ]
    },
    {
      "id": "744d258d-a4ee-495e-96e1-661f13641b2f",
      "name": "Sticky Note - HTML Generation",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        272,
        -192
      ],
      "parameters": {
        "width": 300,
        "height": 432,
        "content": "## 📧 EMAIL GENERATION\n\n**Purpose**: Create personalized HTML email\n\n**Features**:\n- Dynamic first name insertion\n- Branded styling\n- Confirmation link\n- Unsubscribe link\n- Mobile responsive\n"
      }
    },
    {
      "id": "dec5e4b1-6105-447f-996a-4c9f5504987b",
      "name": "Send Welcome Email",
      "type": "n8n-nodes-base.gmail",
      "position": [
        704,
        80
      ]
    },
    {
      "id": "524fa2bb-2948-4099-9d2f-9f54f8ae34e3",
      "name": "Sticky Note - Send Email",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        608,
        -112
      ],
      "parameters": {
        "width": 280,
        "height": 348,
        "content": "## ✉️ SEND EMAIL\n\n**Configuration**:\n- To: Subscriber email\n- Subject: Personalized\n- Type: HTML\n- From: Your Brand Team"
      }
    },
    {
      "id": "2be68c46-ea97-4c34-bd80-4731e09f0733",
      "name": "Prepare Invalid Email Message",
      "type": "n8n-nodes-base.code",
      "position": [
        368,
        464
      ]
    },
    {
      "id": "1d73e003-a440-45a2-98a4-702d13c01cee",
      "name": "Sticky Note - Invalid Handler",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        288,
        448
      ],
      "parameters": {
        "width": 252,
        "height": 416,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n## ⚠️ INVALID EMAIL HANDLER\n\n**Actions**:\nLog to invalid emails sheet\n\n**Reason could be**:\n- Typo in email\n- Non-existent domain\n- Disposable email"
      }
    },
    {
      "id": "f46e0115-189d-4610-9b6b-87341d2da9cc",
      "name": "Log Invalid Emails",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        720,
        464
      ]
    },
    {
      "id": "498591a2-335e-4f0b-b483-6fccec485c24",
      "name": "Sticky Note - Log Invalid Emails",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        608,
        432
      ],
      "parameters": {
        "width": 312,
        "height": 444,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n## 📊 LOG INVALID EMAILS\n\n**Sheet**: Invalid_Emails\n\n**Data Logged**:\n- Timestamp\n- Name\n- Email\n- Reason\n- Technical Reason\n- Verification score\n- Domain info"
      }
    },
    {
      "id": "895f6d8e-9384-4282-a0dd-ad75426f5ea5",
      "name": "Format Master Log Entry",
      "type": "n8n-nodes-base.code",
      "position": [
        1088,
        464
      ]
    },
    {
      "id": "e1879abf-698d-44c9-ba00-5de202926f72",
      "name": "Sticky Note - Format",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1008,
        448
      ],
      "parameters": {
        "width": 260,
        "height": 424,
        "content": "\n\n\n\n\n\n\n\n\n\n## 🔄 FORMAT DATA\n\n**Purpose**: Prepare data for master log\n\n**Standardizes**:\n- Timestamp format\n- Email Verifications\n- name\n- Source tracking\n\n**Clean output** for analytics"
      }
    },
    {
      "id": "cbf72a80-50ae-4fd4-9149-5cc3599bceb6",
      "name": "Log to Master Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1424,
        464
      ]
    },
    {
      "id": "9a2aff71-9890-4acb-9339-a4ed98728239",
      "name": "Sticky Note - Master Log",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1328,
        448
      ],
      "parameters": {
        "width": 312,
        "height": 444,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n## 📈 MASTER LOG\n\n**Sheet**: Master_Log\n\n**All Data**:\n- Complete audit trail\n- Valid & invalid entries\n- Verification scores\n- Email send status\n- Source tracking\n\n**Use for**: Analytics &"
      }
    },
    {
      "id": "492eb16c-3ac4-4b07-8309-44e6e4b317c7",
      "name": "Sticky Note - CREDENTIALS SETUP",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1440,
        16
      ],
      "parameters": {
        "width": 380,
        "height": 472,
        "content": "## 🔐 CREDENTIALS SETUP REQUIRED\n\n**You need to configure these credentials:**\n\n1. **Google Sheets OAuth2**\n   - Type: Google Sheets OAuth2 API\n\n2. **Gmail OAuth2**\n   - Type: Gmail OAuth2 API\n\n3. **Ve"
      }
    },
    {
      "id": "a39a0a10-82f7-4f37-bbb0-bee8855cc3ee",
      "name": "Sticky Note - Workflow Summary",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1408,
        -384
      ],
      "parameters": {
        "width": 340,
        "height": 376,
        "content": "## 📋 WORKFLOW SUMMARY\n\n**Flow Path**:\n1. Webhook receives signup ➜\n2. Validate data completeness ➜\n3. Verify email with Verifi ➜\n4. Route based on validity ➜\n5. Send welcome (valid) OR log error (inva"
      }
    },
    {
      "id": "35ae866d-4f51-4751-8703-6a018c72fb2b",
      "name": "Verifi Email",
      "type": "n8n-nodes-verifiemail.verifiEmail",
      "position": [
        -288,
        224
      ]
    }
  ],
  "connections": {
    "Verifi Email": {
      "main": [
        [
          {
            "node": "Check Email Validity",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Log Invalid Emails": {
      "main": [
        [
          {
            "node": "Format Master Log Entry",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Welcome Email": {
      "main": [
        []
      ]
    },
    "Check Email Validity": {
      "main": [
        [
          {
            "node": "Generate Welcome Email HTML",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Prepare Invalid Email Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Data Completeness": {
      "main": [
        [
          {
            "node": "Verifi Email",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Log Incomplete Submissions",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Master Log Entry": {
      "main": [
        [
          {
            "node": "Log to Master Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Welcome Email HTML": {
      "main": [
        [
          {
            "node": "Send Welcome Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook - Newsletter Signup": {
      "main": [
        [
          {
            "node": "Check Data Completeness",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Invalid Email Message": {
      "main": [
        [
          {
            "node": "Log Invalid Emails",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}