{
  "name": "Check email addresses at sign-up with ListVetted",
  "nodes": [
    {
      "parameters": {
        "content": "## Check email addresses at sign-up with ListVetted\n\nReceives an email address on a webhook, verifies it with the ListVetted email verification API and answers straight away: HTTP 200 for deliverable addresses, HTTP 422 for invalid ones (typos, disposable domains, mailboxes that do not exist).\n\n**Who it is for:** anyone with a sign-up form, landing page or app who wants to stop bad addresses before they reach the database or the CRM.\n\n**How it works:** 1) webhook receives the email 2) ListVetted checks it 3) invalid addresses get a 422 reply, all others a 200 reply with the result.",
        "height": 320,
        "width": 440
      },
      "id": "a1",
      "name": "Overview note",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -80,
        -60
      ]
    },
    {
      "parameters": {
        "content": "## Setup (about 5 minutes)\n\n1. Create a free account at listvetted.com and create an API key (250 free credits).\n2. In n8n create a **Header Auth** credential: Name `X-API-Key`, Value = your key. Select it in the **Check email** node.\n3. Open the **Receive email** node, copy the Production URL and activate the workflow.\n4. Send a POST request with a JSON body such as `{\"email\": \"jane@example.com\"}` from your form or app.\n\n**Reply:** `{ \"email\", \"status\", \"reason\", \"accepted\" }`. Status is valid, risky, invalid or unknown. Unknown results are not charged. Change the rule in **Is invalid?** if you also want to block risky addresses.",
        "height": 400,
        "width": 440
      },
      "id": "a2",
      "name": "Setup note",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -80,
        280
      ]
    },
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "verify-email-signup",
        "responseMode": "responseNode",
        "options": {}
      },
      "id": "b1",
      "name": "Receive email",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2,
      "position": [
        420,
        100
      ],
      "webhookId": "4c1f6a52-7d3e-4b88-9a2f-6e0b1d5c7a11"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.listvetted.com/v1/check",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={{ { \"email\": $json.body.email } }}",
        "options": {
          "timeout": 60000
        }
      },
      "id": "b2",
      "name": "Check email",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        640,
        100
      ]
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "loose"
          },
          "conditions": [
            {
              "id": "c1",
              "leftValue": "={{ $json.status }}",
              "rightValue": "invalid",
              "operator": {
                "type": "string",
                "operation": "equals"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "id": "b3",
      "name": "Is invalid?",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        860,
        100
      ]
    },
    {
      "parameters": {
        "respondWith": "json",
        "responseBody": "={{ { \"email\": $('Receive email').item.json.body.email, \"status\": $json.status, \"reason\": $json.explanation, \"accepted\": false } }}",
        "options": {
          "responseCode": 422
        }
      },
      "id": "b4",
      "name": "Reject invalid address",
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1.1,
      "position": [
        1080,
        0
      ]
    },
    {
      "parameters": {
        "respondWith": "json",
        "responseBody": "={{ { \"email\": $('Receive email').item.json.body.email, \"status\": $json.status, \"reason\": $json.explanation, \"accepted\": true } }}",
        "options": {
          "responseCode": 200
        }
      },
      "id": "b5",
      "name": "Accept address",
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1.1,
      "position": [
        1080,
        200
      ]
    }
  ],
  "connections": {
    "Receive email": {
      "main": [
        [
          {
            "node": "Check email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check email": {
      "main": [
        [
          {
            "node": "Is invalid?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Is invalid?": {
      "main": [
        [
          {
            "node": "Reject invalid address",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Accept address",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  }
}