{
  "nodes": [
    {
      "id": "6a06b03c-27d8-4256-8f54-ac614fec00b2",
      "name": "Google Sheets Trigger",
      "type": "n8n-nodes-base.googleSheetsTrigger",
      "position": [
        -544,
        96
      ],
      "parameters": {
        "event": "rowAdded",
        "options": {},
        "pollTimes": {
          "item": [
            {
              "mode": "everyMinute"
            }
          ]
        },
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/14tsPplI_YOUR_AWS_SECRET_KEY_HERE#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "14tsPplI_HG0K1IuRjFNsAIxqewmFrxfb10JRy15Urg4",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/14tsPplI_YOUR_AWS_SECRET_KEY_HERE?usp=drivesdk",
          "cachedResultName": "Email Validation"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "bd24d486-ff8a-483f-9123-8158e47f2c36",
      "name": "Email Validation API",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        96,
        96
      ],
      "parameters": {
        "url": "=https://api.emailvalidation.io/v1/info?apikey={{api_key}}&email={{ $json.Email }}",
        "options": {},
        "sendBody": true,
        "sendHeaders": true,
        "bodyParameters": {
          "parameters": [
            {}
          ]
        },
        "headerParameters": {
          "parameters": [
            {}
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "1296f145-1589-4df5-a648-8d24266adb9a",
      "name": "Filter Empty Cells",
      "type": "n8n-nodes-base.filter",
      "position": [
        -320,
        96
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "55afbbbe-0c07-412d-aae3-eceb061d1b92",
              "operator": {
                "type": "string",
                "operation": "notEmpty",
                "singleValue": true
              },
              "leftValue": "={{ $json.Email }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "d8cb2bf4-babb-4a80-a051-35cc37ac7479",
      "name": "Take Email Only",
      "type": "n8n-nodes-base.set",
      "position": [
        -112,
        96
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "26020ce1-c307-4c9d-9c47-f66efda1b57e",
              "name": "Email",
              "type": "string",
              "value": "={{ $json.Email }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "95f7fc3a-32c1-4dff-85f7-e9d36a2808fe",
      "name": "Take Email and Validation Status",
      "type": "n8n-nodes-base.set",
      "position": [
        272,
        96
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "ba35033d-05fc-4b05-9a08-c55662f956c3",
              "name": "status",
              "type": "string",
              "value": "={{ $json.state }}"
            },
            {
              "id": "abab1589-c81b-4d1f-80c5-83dc156a45e0",
              "name": "email",
              "type": "string",
              "value": "={{ $json.email }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "6feaf204-bdc8-48f8-a427-8a16afd63688",
      "name": "Update the Sheets with Validation Status",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        464,
        96
      ],
      "parameters": {
        "columns": {
          "value": {
            "Email": "={{ $json.email }}",
            "Deliverability ": "={{ $json.status }}"
          },
          "schema": [
            {
              "id": "Name ",
              "type": "string",
              "display": true,
              "removed": true,
              "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": "Deliverability ",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Deliverability ",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Linkedin URL",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Linkedin URL",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Company ",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Company ",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "row_number",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": true,
              "required": false,
              "displayName": "row_number",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "Email"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "update",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/14tsPplI_YOUR_AWS_SECRET_KEY_HERE#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "14tsPplI_HG0K1IuRjFNsAIxqewmFrxfb10JRy15Urg4",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/14tsPplI_YOUR_AWS_SECRET_KEY_HERE?usp=drivesdk",
          "cachedResultName": "Email Validation"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.6
    },
    {
      "id": "40b08848-691d-4082-ad80-cf2d2d45c39e",
      "name": "Alternative - Hunter for Email Validation",
      "type": "n8n-nodes-base.hunter",
      "position": [
        96,
        -80
      ],
      "parameters": {
        "email": "={{ $json.Email }}",
        "operation": "emailVerifier"
      },
      "typeVersion": 1
    },
    {
      "id": "43b4b741-3db0-48c6-b99b-8f1bf6b5d76b",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -672,
        -176
      ],
      "parameters": {
        "width": 1456,
        "height": 464,
        "content": "## Instructions\n1. Take email and other data from the google sheets. \n2. If new row added the trigger will trigger the workflow automatically\n3. Setup Sheets credentails \n4. Setup Email Validation or Hunter Credentials \n5. Tadah! You are all good."
      },
      "typeVersion": 1
    }
  ],
  "connections": {
    "Take Email Only": {
      "main": [
        [
          {
            "node": "Email Validation API",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter Empty Cells": {
      "main": [
        [
          {
            "node": "Take Email Only",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Email Validation API": {
      "main": [
        [
          {
            "node": "Take Email and Validation Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets Trigger": {
      "main": [
        [
          {
            "node": "Filter Empty Cells",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Take Email and Validation Status": {
      "main": [
        [
          {
            "node": "Update the Sheets with Validation Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}