{
  "name": "Verify Outbound Leads with MailVeri from Apollo and Clay",
  "nodes": [
    {
      "parameters": {
        "content": "## Verify Outbound Leads with MailVeri from Apollo and Clay\n\n### How it works\n1. Inbound webhook receives prospect contact data from Apollo, Clay, or outreach webhooks.\n2. Extracts and standardizes lead fields including email address, first name, and company name.\n3. Calls MailVeri API for real-time MX, disposable filter, and live SMTP deliverability verification.\n4. Evaluates verification verdict: delivers valid contacts to cold outreach while quarantining invalid or risky mailboxes.\n\n### Setup steps\n- [ ] Double-click the 'Verify Email with MailVeri' node and add your MailVeri API key in the Authorization header.\n- [ ] Configure your lead capture source (Apollo, Clay, or scraping webhook) to send leads to the Inbound Lead webhook.\n- [ ] Connect your CRM or cold outreach sequencer (Instantly, Smartlead, HubSpot) to the 'Route to Outreach Campaign' branch.\n\n### Customization\n- [ ] Adjust the delivery filter to accept other statuses (such as ROLE_ACCOUNT or CATCH_ALL) if your outbound strategy permits.\n- [ ] Add downstream integrations such as Google Sheets, HubSpot, or Slack alerts to the 'Quarantine Risky Lead' branch.",
        "height": 576,
        "width": 480
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [-400, 48],
      "id": "9a1b2c3d-4e5f-4a1b-8c2d-3e4f5a6b7c8d",
      "name": "Sticky Note"
    },
    {
      "parameters": {
        "content": "## Receive and prepare lead\n\nReceives inbound prospect contacts via webhook and normalizes lead attributes.",
        "height": 304,
        "width": 384,
        "color": 7
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [160, 144],
      "id": "1a2b3c4d-5e6f-4a1b-8c2d-3e4f5a6b7c8e",
      "name": "Sticky Note1"
    },
    {
      "parameters": {
        "content": "## Verify email deliverability\n\nCalls MailVeri REST API to perform real-time MX, disposable, and live SMTP verification.",
        "height": 304,
        "width": 256,
        "color": 7
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [576, 144],
      "id": "2b3c4d5e-6f7a-4b2c-9d3e-4f5a6b7c8d9f",
      "name": "Sticky Note2"
    },
    {
      "parameters": {
        "content": "## Route by verification status\n\nRoutes valid contacts to outreach campaigns while suppressing invalid or risky mailboxes.",
        "height": 496,
        "width": 464,
        "color": 7
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [864, 48],
      "id": "3c4d5e6f-7a8b-4c3d-ae4f-5a6b7c8d9e0a",
      "name": "Sticky Note3"
    },
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "lead-ingest",
        "options": {}
      },
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2,
      "position": [220, 280],
      "id": "1d8e6a2b-635b-4c57-a9a3-5c2f30b91e01",
      "name": "Inbound Lead Trigger"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "email_assign",
              "name": "email",
              "value": "={{ $json.body.email || $json.body.mail || $json.query.email || '' }}",
              "type": "string"
            },
            {
              "id": "first_name_assign",
              "name": "first_name",
              "value": "={{ $json.body.first_name || $json.body.firstName || '' }}",
              "type": "string"
            },
            {
              "id": "company_assign",
              "name": "company",
              "value": "={{ $json.body.company || $json.body.company_name || '' }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [400, 280],
      "id": "2e9f7b3c-746c-5d68-b0b4-6d3a41c02f12",
      "name": "Set Lead Attributes"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.mailveri.com/v1/verify-mail/",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer YOUR_MAILVERI_API_KEY"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"email\": \"{{ $json.email }}\"\n}",
        "options": {
          "timeout": 10000
        }
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [640, 280],
      "id": "3f0a8c4d-857d-6e79-c1c5-7e4b52d13a23",
      "name": "Verify Email with MailVeri"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "status_check",
              "leftValue": "={{ $json.status }}",
              "rightValue": "VALID",
              "operator": {
                "type": "string",
                "operation": "equals"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [920, 280],
      "id": "4a1b9d5e-968e-7f80-d2d6-8f5c63e24b34",
      "name": "If Email Is Valid"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "status_log",
              "name": "delivery_action",
              "value": "ROUTE_TO_CAMPAIGN",
              "type": "string"
            },
            {
              "id": "verified_email",
              "name": "clean_email",
              "value": "={{ $('Set Lead Attributes').item.json.email }}",
              "type": "string"
            },
            {
              "id": "lead_status",
              "name": "verification_verdict",
              "value": "DELIVERABLE",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [1180, 180],
      "id": "5b2c0e6f-079f-8a91-e3e7-9a6d74f35c45",
      "name": "Route to Outreach Campaign"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "suppress_action",
              "name": "delivery_action",
              "value": "SUPPRESS_TO_AVOID_BOUNCE",
              "type": "string"
            },
            {
              "id": "risky_email",
              "name": "rejected_email",
              "value": "={{ $('Set Lead Attributes').item.json.email }}",
              "type": "string"
            },
            {
              "id": "rejection_reason",
              "name": "reason",
              "value": "={{ $json.status || 'UNKNOWN' }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [1180, 380],
      "id": "6c3d1f7a-180a-9b02-f4f8-0b7e85a46d56",
      "name": "Quarantine Risky Lead"
    }
  ],
  "connections": {
    "Inbound Lead Trigger": {
      "main": [
        [
          {
            "node": "Set Lead Attributes",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Lead Attributes": {
      "main": [
        [
          {
            "node": "Verify Email with MailVeri",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Verify Email with MailVeri": {
      "main": [
        [
          {
            "node": "If Email Is Valid",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If Email Is Valid": {
      "main": [
        [
          {
            "node": "Route to Outreach Campaign",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Quarantine Risky Lead",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  }
}
