{
  "id": "bvYcq5zrLPePpJPm",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Verify leads email address with Anymail Finder",
  "tags": [],
  "nodes": [
    {
      "id": "b440f1f9-ec22-4958-bf05-e1d65f277951",
      "name": "Manual Trigger",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -704,
        -448
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "5094115d-4649-4d28-847d-541e3b4b1494",
      "name": "Get Leads",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -496,
        -448
      ],
      "parameters": {
        "options": {},
        "filtersUI": {
          "values": [
            {
              "lookupColumn": "VERIFY"
            }
          ]
        },
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/108sjf89zpKRyZbGq9MjcNFQOezP4hi97SJ_uAkXc8WI/edit#gid=0",
          "cachedResultName": "Foglio1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "108sjf89zpKRyZbGq9MjcNFQOezP4hi97SJ_uAkXc8WI",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/108sjf89zpKRyZbGq9MjcNFQOezP4hi97SJ_uAkXc8WI/edit?usp=drivesdk",
          "cachedResultName": "Verify leads email"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "3cde3dfb-91dc-4863-ad0f-aedd7078cd18",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -288,
        -448
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "311399e5-d190-4e72-9968-c9c2ec88fbe1",
      "name": "Update email status",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        320,
        -448
      ],
      "parameters": {
        "columns": {
          "value": {
            "VERIFY": "={{ $json.email_status }}",
            "row_number": "={{ $('Loop Over Items').item.json.row_number }}"
          },
          "schema": [
            {
              "id": "COMPANY NAME",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "COMPANY NAME",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "EMAIL ",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "EMAIL ",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "VERIFY",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "VERIFY",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "row_number",
              "type": "number",
              "display": true,
              "removed": false,
              "readOnly": true,
              "required": false,
              "displayName": "row_number",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "row_number"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "update",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/108sjf89zpKRyZbGq9MjcNFQOezP4hi97SJ_uAkXc8WI/edit#gid=0",
          "cachedResultName": "Foglio1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "108sjf89zpKRyZbGq9MjcNFQOezP4hi97SJ_uAkXc8WI",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/108sjf89zpKRyZbGq9MjcNFQOezP4hi97SJ_uAkXc8WI/edit?usp=drivesdk",
          "cachedResultName": "Verify leads email"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "6c24bae6-fb01-4071-ba23-b5613a9a6c7b",
      "name": "Check email status",
      "type": "n8n-nodes-base.httpRequest",
      "notes": "This node sends the request to Anymailfinder.\nMake sure you've connected your API key in the credentials (HTTP Header Auth).",
      "onError": "continueErrorOutput",
      "position": [
        -16,
        -432
      ],
      "parameters": {
        "url": "https://api.anymailfinder.com/v5.1/verify-email",
        "method": "POST",
        "options": {
          "timeout": 180000
        },
        "sendBody": true,
        "authentication": "genericCredentialType",
        "bodyParameters": {
          "parameters": [
            {
              "name": "email",
              "value": "={{ $json[\"EMAIL \"] }}"
            }
          ]
        },
        "genericAuthType": "httpHeaderAuth"
      },
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "7d2a131c-527e-44ac-b4b9-089dcc3245b0",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -704,
        -768
      ],
      "parameters": {
        "width": 608,
        "height": 256,
        "content": "## Verify leads email address with Anymail Finder\nThis workflow automates the **process of validating email addresses** stored in a **Google Sheets file** by using the Anymail Finder API.\n\n- Clone this [sheet](https://docs.google.com/spreadsheets/d/108sjf89zpKRyZbGq9MjcNFQOezP4hi97SJ_uAkXc8WI/edit?usp=sharing)\n- Get your (Anymail Finder)[https://anymailfinder.com] API Key (FREE Trial)\n- In \"Check email status\" node Create a credential named \u201cAnymail Finder\u201d of type HTTP Header Auth. In the \u201cName\u201d field, enter \"Authorization\" and in the \u201cValue\u201d field, enter your Anymail Finder API key (in the format YOUR_API_KEY)"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "b53ba6c5-ac90-42d7-90a9-13b405c13206",
  "connections": {
    "Get Leads": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Manual Trigger": {
      "main": [
        [
          {
            "node": "Get Leads",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "Check email status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check email status": {
      "main": [
        [
          {
            "node": "Update email status",
            "type": "main",
            "index": 0
          }
        ],
        []
      ]
    },
    "Update email status": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}