{
  "id": "",
  "meta": {
    "templateCredsSetupCompleted": false
  },
  "name": "Newsletter Verification & Welcome Email Workflow",
  "tags": [],
  "nodes": [
    {
      "id": "a949eca7-950b-4d16-9015-50844e411833",
      "name": "Webhook - Newsletter Signup",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -944,
        336
      ],
      "parameters": {
        "path": "newsletter-signup",
        "options": {},
        "httpMethod": "POST",
        "responseMode": "lastNode"
      },
      "typeVersion": 1
    },
    {
      "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": "## \ud83c\udfaf WORKFLOW START\n\n**Expected Payload**:\n```json\n{\n  \"name\": \"John Doe\",\n  \"email\": \"john@example.com\",\n  \"source\": \"website_footer\"\n}\n```"
      },
      "typeVersion": 1
    },
    {
      "id": "1a7ac1eb-2a43-4ace-86e7-1c88c1e97ac5",
      "name": "Check Data Completeness",
      "type": "n8n-nodes-base.if",
      "position": [
        -608,
        336
      ],
      "parameters": {
        "conditions": {
          "number": [],
          "string": [
            {
              "value1": "={{ $json.body.email }}",
              "operation": "isNotEmpty"
            },
            {
              "value1": "={{ $json.body.name }}",
              "operation": "isNotEmpty"
            }
          ],
          "boolean": []
        }
      },
      "typeVersion": 1
    },
    {
      "id": "be02be23-fbf5-4d2c-a5f5-52d0c88511b3",
      "name": "Sticky Note - Data Validation",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -688,
        96
      ],
      "parameters": {
        "color": 4,
        "width": 300,
        "height": 384,
        "content": "## \u2705 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"
      },
      "typeVersion": 1
    },
    {
      "id": "97593e4d-ee1b-452e-8e15-e6aad3ff8c90",
      "name": "Log Incomplete Submissions",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -416,
        544
      ],
      "parameters": {
        "columns": {
          "value": {
            "name": "={{ $json.body.name || 'N/A' }}",
            "email": "={{ $json.body.email || 'N/A' }}",
            "reason": "Incomplete data",
            "timestamp": "={{ $now.toISO() }}"
          },
          "schema": [
            {
              "id": "timestamp",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "timestamp",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "name",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "email",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "email",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "reason",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "reason",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_GOOGLE_SHEETS_SHEET_ID",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEETS_DOCUMENT_ID/edit#gid/YOUR_GOOGLE_SHEETS_SHEET_ID",
          "cachedResultName": "Invalid_Submissions"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_GOOGLE_SHEETS_DOCUMENT_ID",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEETS_DOCUMENT_ID/edit?usp=drivesdk",
          "cachedResultName": "Newsletter_Tracking"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4
    },
    {
      "id": "5804f33e-ef20-4aa9-89ad-0f12f207f08e",
      "name": "Sticky Note - Log Invalid",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -464,
        528
      ],
      "parameters": {
        "color": 7,
        "width": 280,
        "height": 396,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n## \ud83d\udcdd 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\""
      },
      "typeVersion": 1
    },
    {
      "id": "6404d655-cebb-4bbb-8f4b-cc875b431c3a",
      "name": "Sticky Note - Email Verification",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -368,
        -96
      ],
      "parameters": {
        "color": 2,
        "width": 300,
        "height": 468,
        "content": "## \ud83d\udd0d 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"
      },
      "typeVersion": 1
    },
    {
      "id": "e6ced67a-7615-4cf6-8cbf-d6a299116046",
      "name": "Check Email Validity",
      "type": "n8n-nodes-base.if",
      "position": [
        16,
        224
      ],
      "parameters": {
        "conditions": {
          "boolean": [
            {
              "value1": "={{ $json.valid }}",
              "value2": "={{ true }}"
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "0c120ee2-e65e-4971-86dc-3dc8955eb188",
      "name": "Sticky Note - Conditional Logic",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -48,
        -32
      ],
      "parameters": {
        "color": 3,
        "width": 280,
        "height": 396,
        "content": "## \u26a1CONDITIONAL 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"
      },
      "typeVersion": 1
    },
    {
      "id": "6f87b084-7f15-496c-b992-8685d1fde0bb",
      "name": "Generate Welcome Email HTML",
      "type": "n8n-nodes-base.code",
      "position": [
        368,
        80
      ],
      "parameters": {
        "jsCode": "// Generate Welcome Email HTML - Direct Webhook Reference\n// This gets data directly from the webhook node, bypassing any data loss issues\n\nconst items = $input.all();\nconst outputItems = [];\n\nfor (const item of items) {\n  // Get data DIRECTLY from the webhook node (first node in workflow)\n  const webhookData = $('Webhook - Newsletter Signup').first().json.body;\n  \n  // Extract user details\n  const name = webhookData.name;\n  const email = webhookData.email;\n  const source = webhookData.source || 'website';\n  \n  // Get first name for personalization\n  const firstName = name.split(' ')[0];\n  \n  // Build the HTML email\n  const htmlContent = `\n<!DOCTYPE html>\n<html>\n<head>\n  <meta charset=\"UTF-8\">\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n  <style>\n    body { \n      font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;\n      line-height: 1.6; \n      color: #333; \n      margin: 0; \n      padding: 0;\n      background-color: #f4f4f4;\n    }\n    .container { \n      max-width: 600px; \n      margin: 20px auto; \n      background: #ffffff;\n      border-radius: 12px;\n      overflow: hidden;\n      box-shadow: 0 4px 6px rgba(0,0,0,0.1);\n    }\n    .header { \n      background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); \n      color: white; \n      padding: 40px 30px;\n      text-align: center;\n    }\n    .header h1 {\n      margin: 0;\n      font-size: 28px;\n      font-weight: 600;\n    }\n    .content { \n      padding: 40px 30px;\n      background: #ffffff;\n    }\n    .content h2 {\n      color: #333;\n      font-size: 24px;\n      margin-top: 0;\n      margin-bottom: 20px;\n    }\n    .content p {\n      margin: 15px 0;\n      color: #555;\n    }\n    ul { \n      padding-left: 0;\n      list-style: none;\n    }\n    li { \n      margin: 12px 0;\n      padding-left: 30px;\n      position: relative;\n      color: #555;\n    }\n    li:before {\n      content: \"\u2713\";\n      position: absolute;\n      left: 0;\n      color: #667eea;\n      font-weight: bold;\n      font-size: 18px;\n    }\n    .button-container {\n      text-align: center;\n      margin: 30px 0;\n    }\n    .button { \n      display: inline-block; \n      padding: 14px 35px; \n      background: #667eea; \n      color: white !important; \n      text-decoration: none; \n      border-radius: 6px;\n      font-weight: 600;\n      font-size: 16px;\n      transition: background 0.3s ease;\n    }\n    .button:hover {\n      background: #5568d3;\n    }\n    .divider {\n      height: 1px;\n      background: #e0e0e0;\n      margin: 30px 0;\n    }\n    .footer { \n      text-align: center; \n      padding: 30px; \n      color: #999; \n      font-size: 13px;\n      background: #f9f9f9;\n      border-top: 1px solid #e0e0e0;\n    }\n    .footer a {\n      color: #667eea;\n      text-decoration: none;\n    }\n    .footer a:hover {\n      text-decoration: underline;\n    }\n    @media only screen and (max-width: 600px) {\n      .container {\n        margin: 10px;\n        border-radius: 8px;\n      }\n      .header {\n        padding: 30px 20px;\n      }\n      .header h1 {\n        font-size: 24px;\n      }\n      .content {\n        padding: 30px 20px;\n      }\n      .content h2 {\n        font-size: 20px;\n      }\n    }\n  </style>\n</head>\n<body>\n  <div class=\"container\">\n    <div class=\"header\">\n      <h1>\ud83c\udf89 Welcome to Our Newsletter!</h1>\n    </div>\n    \n    <div class=\"content\">\n      <h2>Hi ${firstName}! \ud83d\udc4b</h2>\n      \n      <p>Thank you for joining our newsletter community! We're absolutely thrilled to have you on board.</p>\n      \n      <p><strong>Here's what you can expect from us:</strong></p>\n      <ul>\n        <li><strong>Weekly Insights:</strong> Valuable tips and industry updates delivered to your inbox</li>\n        <li><strong>Exclusive Offers:</strong> Early access to special deals and promotions</li>\n        <li><strong>Free Resources:</strong> Helpful guides, templates, and tools</li>\n        <li><strong>Community Access:</strong> Connect with like-minded individuals</li>\n      </ul>\n      \n      <div class=\"button-container\">\n        <a href=\"https://yourwebsite.com/confirm?email=${encodeURIComponent(email)}&source=${encodeURIComponent(source)}\" class=\"button\">\n          Confirm Your Subscription\n        </a>\n      </div>\n      \n      <div class=\"divider\"></div>\n      \n      <p>Have questions or feedback? Simply hit reply to this email \u2013 we read and respond to every message!</p>\n      \n      <p style=\"margin-top: 30px;\">\n        Best regards,<br>\n        <strong>The Team</strong>\n      </p>\n    </div>\n    \n    <div class=\"footer\">\n      <p>You're receiving this because you subscribed at <strong>yourwebsite.com</strong></p>\n      <p>\n        <a href=\"https://yourwebsite.com/preferences?email=${encodeURIComponent(email)}\">Update Preferences</a> | \n        <a href=\"https://yourwebsite.com/unsubscribe?email=${encodeURIComponent(email)}\">Unsubscribe</a>\n      </p>\n      <p style=\"margin-top: 20px; color: #bbb; font-size: 11px;\">\n        \u00a9 ${new Date().getFullYear()} Your Company Name. All rights reserved.\n      </p>\n    </div>\n  </div>\n</body>\n</html>\n  `;\n  \n  // Return formatted output\n  outputItems.push({\n    json: {\n      // Original webhook data\n      name: name,\n      email: email,\n      source: source,\n      \n      // Email content\n      htmlEmail: htmlContent,\n      subject: `\ud83c\udf89 Welcome to Our Newsletter, ${firstName}!`,\n      \n      // Additional metadata\n      firstName: firstName,\n      generatedAt: new Date().toISOString()\n    }\n  });\n}\n\nreturn outputItems;"
      },
      "typeVersion": 2
    },
    {
      "id": "744d258d-a4ee-495e-96e1-661f13641b2f",
      "name": "Sticky Note - HTML Generation",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        272,
        -192
      ],
      "parameters": {
        "color": 5,
        "width": 300,
        "height": 432,
        "content": "## \ud83d\udce7 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"
      },
      "typeVersion": 1
    },
    {
      "id": "dec5e4b1-6105-447f-996a-4c9f5504987b",
      "name": "Send Welcome Email",
      "type": "n8n-nodes-base.gmail",
      "position": [
        704,
        80
      ],
      "parameters": {
        "sendTo": "={{ $json.email }}",
        "message": "={{ $json.htmlEmail }}",
        "options": {
          "senderName": "Your Brand Team"
        },
        "subject": "={{ $json.subject }}"
      },
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "524fa2bb-2948-4099-9d2f-9f54f8ae34e3",
      "name": "Sticky Note - Send Email",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        608,
        -112
      ],
      "parameters": {
        "color": 6,
        "width": 280,
        "height": 348,
        "content": "## \u2709\ufe0f SEND EMAIL\n\n**Configuration**:\n- To: Subscriber email\n- Subject: Personalized\n- Type: HTML\n- From: Your Brand Team"
      },
      "typeVersion": 1
    },
    {
      "id": "2be68c46-ea97-4c34-bd80-4731e09f0733",
      "name": "Prepare Invalid Email Message",
      "type": "n8n-nodes-base.code",
      "position": [
        368,
        464
      ],
      "parameters": {
        "jsCode": "// Prepare Invalid Email Data - Code Node\n// This handles the Verifi Email API response format\n\nconst items = $input.all();\n\nreturn items.map(item => {\n  // Extract the first item from the array (Verifi returns an array)\n  const emailData = Array.isArray(item.json) ? item.json[0] : item.json;\n  \n  // Determine the specific reason for invalidity\n  let invalidReason = '';\n  let technicalReason = '';\n  \n  if (!emailData.details.validMxRecord) {\n    invalidReason = 'Invalid or non-existent email domain';\n    technicalReason = 'No valid MX records found for the domain';\n  } else if (!emailData.details.rfcCompliant) {\n    invalidReason = 'Email format is not compliant with standards';\n    technicalReason = 'RFC non-compliant email format';\n  } else if (emailData.details.disposable) {\n    invalidReason = 'Disposable/temporary email address detected';\n    technicalReason = 'Disposable email service';\n  } else if (!emailData.details.spoofFree) {\n    invalidReason = 'Potential spoofed or suspicious email';\n    technicalReason = 'Email may be spoofed';\n  } else {\n    invalidReason = 'Email verification failed';\n    technicalReason = 'Unknown verification issue';\n  }\n  \n  // Get original subscriber data (name, email, source)\n  // This assumes the original data is still in the item\n  const originalData = item.json.name ? item.json : \n                       (item.json[0] && item.json[0].name ? item.json[0] : {});\n  \n  return {\n    json: {\n      // Original subscriber information\n      name: originalData.name || 'Subscriber',\n      email: emailData.email,\n      source: originalData.source || 'Unknown',\n      \n      // Verification results\n      valid: false,\n      validMxRecord: emailData.details.validMxRecord,\n      rfcCompliant: emailData.details.rfcCompliant,\n      disposable: emailData.details.disposable,\n      spoofFree: emailData.details.spoofFree,\n      \n      // Domain information\n      domain: emailData.email.split('@')[1] || 'N/A',\n      mxProvider: emailData.details.mx.provider || 'N/A',\n      mxRecords: emailData.details.mx.records.join(', ') || 'None',\n      \n      // Reason messages\n      invalidReason: invalidReason,\n      technicalReason: technicalReason,\n      // Timestamp\n      timestamp: new Date().toISOString()\n    }\n  };\n});"
      },
      "typeVersion": 2
    },
    {
      "id": "1d73e003-a440-45a2-98a4-702d13c01cee",
      "name": "Sticky Note - Invalid Handler",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        288,
        448
      ],
      "parameters": {
        "color": 2,
        "width": 252,
        "height": 416,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n## \u26a0\ufe0f 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"
      },
      "typeVersion": 1
    },
    {
      "id": "f46e0115-189d-4610-9b6b-87341d2da9cc",
      "name": "Log Invalid Emails",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        720,
        464
      ],
      "parameters": {
        "columns": {
          "value": {
            "name": "={{ $json.name }}",
            "email": "={{ $json.email }}",
            "domain": "={{ $json.domain }}",
            "reason": "={{ $json.invalidReason }}",
            "timestamp": "={{ $json.timestamp }}",
            "technical_reason": "={{ $json.technicalReason }}"
          },
          "schema": [
            {
              "id": "timestamp",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "timestamp",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "name",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "email",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "email",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "reason",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "reason",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "technical_reason",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "technical_reason",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "domain",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "domain",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_GOOGLE_SHEETS_SHEET_ID",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEETS_DOCUMENT_ID/edit#gid/YOUR_GOOGLE_SHEETS_SHEET_ID",
          "cachedResultName": "Invalid_Emails"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_GOOGLE_SHEETS_DOCUMENT_ID",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEETS_DOCUMENT_ID/edit?usp=drivesdk",
          "cachedResultName": "Newsletter_Tracking"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4
    },
    {
      "id": "498591a2-335e-4f0b-b483-6fccec485c24",
      "name": "Sticky Note - Log Invalid Emails",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        608,
        432
      ],
      "parameters": {
        "color": 3,
        "width": 312,
        "height": 444,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n## \ud83d\udcca 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"
      },
      "typeVersion": 1
    },
    {
      "id": "895f6d8e-9384-4282-a0dd-ad75426f5ea5",
      "name": "Format Master Log Entry",
      "type": "n8n-nodes-base.code",
      "position": [
        1088,
        464
      ],
      "parameters": {
        "jsCode": "return $input.all().map(item => {\n  // Check if this is from the valid path or invalid path\n  const isValid = item.json.valid === true;\n  \n  return {\n    json: {\n      timestamp: item.json.timestamp || new Date().toISOString(),\n      name: item.json.name,\n      email: item.json.email,\n      verification_result: isValid ? 'Valid' : 'Invalid',\n      verification_score: 'N/A', // Verifi API doesn't provide score\n      email_sent: isValid ? 'Yes' : 'No',\n      source: item.json.source || 'Unknown',\n      disposable: item.json.disposable || false,\n      domain: item.json.domain || 'N/A',\n      valid_mx_record: item.json.validMxRecord !== undefined ? item.json.validMxRecord : 'N/A',\n      rfc_compliant: item.json.rfcCompliant !== undefined ? item.json.rfcCompliant : 'N/A',\n      invalid_reason: item.json.invalidReason || 'N/A'\n    }\n  };\n});"
      },
      "typeVersion": 2
    },
    {
      "id": "e1879abf-698d-44c9-ba00-5de202926f72",
      "name": "Sticky Note - Format",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1008,
        448
      ],
      "parameters": {
        "color": 4,
        "width": 260,
        "height": 424,
        "content": "\n\n\n\n\n\n\n\n\n\n## \ud83d\udd04 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"
      },
      "typeVersion": 1
    },
    {
      "id": "cbf72a80-50ae-4fd4-9149-5cc3599bceb6",
      "name": "Log to Master Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1424,
        464
      ],
      "parameters": {
        "columns": {
          "value": {
            "name": "={{ $json.name }}",
            "email": "={{ $json.email }}",
            "domain": "={{ $json.domain }}",
            "source": "={{ $json.source }}",
            "timestamp": "={{ $json.timestamp }}",
            "disposable": "={{ $json.disposable }}",
            "email_sent": "={{ $json.email_sent }}",
            "verification_score": "={{ $json.verification_score }}",
            "verification_result": "={{ $json.verification_result }}"
          },
          "schema": [
            {
              "id": "timestamp",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "timestamp",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "name",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "email",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "email",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "verification_result",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "verification_result",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "verification_score",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "verification_score",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "email_sent",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "email_sent",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "source",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "source",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "disposable",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "disposable",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "domain",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "domain",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_GOOGLE_SHEETS_SHEET_ID",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEETS_DOCUMENT_ID/edit#gid/YOUR_GOOGLE_SHEETS_SHEET_ID",
          "cachedResultName": "Master_Log"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_GOOGLE_SHEETS_DOCUMENT_ID",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEETS_DOCUMENT_ID/edit?usp=drivesdk",
          "cachedResultName": "Newsletter_Tracking"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4
    },
    {
      "id": "9a2aff71-9890-4acb-9339-a4ed98728239",
      "name": "Sticky Note - Master Log",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1328,
        448
      ],
      "parameters": {
        "color": 5,
        "width": 312,
        "height": 444,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n## \ud83d\udcc8 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 & reporting"
      },
      "typeVersion": 1
    },
    {
      "id": "492eb16c-3ac4-4b07-8309-44e6e4b317c7",
      "name": "Sticky Note - CREDENTIALS SETUP",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1440,
        16
      ],
      "parameters": {
        "color": 4,
        "width": 380,
        "height": 472,
        "content": "## \ud83d\udd10 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. **Verifi Email API**\n   - Type: Verifi Email API\n   - Get key from: https://verifi.email\n\n4. **Update Sheet IDs**\n   - Replace YOUR_SHEET_ID in all Google Sheets nodes\n   - Create sheets: Invalid_Submissions, Invalid_Emails, Master_Log\n"
      },
      "typeVersion": 1
    },
    {
      "id": "a39a0a10-82f7-4f37-bbb0-bee8855cc3ee",
      "name": "Sticky Note - Workflow Summary",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1408,
        -384
      ],
      "parameters": {
        "color": 5,
        "width": 340,
        "height": 376,
        "content": "## \ud83d\udccb WORKFLOW SUMMARY\n\n**Flow Path**:\n1. Webhook receives signup \u279c\n2. Validate data completeness \u279c\n3. Verify email with Verifi \u279c\n4. Route based on validity \u279c\n5. Send welcome (valid) OR log error (invalid) \u279c\n6. Merge & log everything to master sheet\n\n**Error Handling**:\n- Retry enabled on API nodes\n- Invalid data logged separately\n- All results tracked in master log\n"
      },
      "typeVersion": 1
    },
    {
      "id": "35ae866d-4f51-4751-8703-6a018c72fb2b",
      "name": "Verifi Email",
      "type": "n8n-nodes-verifiemail.verifiEmail",
      "position": [
        -288,
        224
      ],
      "parameters": {
        "email": "={{ $json.body.email }}"
      },
      "credentials": {
        "verifiEmailApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "",
  "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
          }
        ]
      ]
    }
  }
}