{
  "name": "SimpleVerifier: verify leads, keep action = send, add to Instantly",
  "nodes": [
    {
      "id": "n1000001-0000-4000-8000-000000000001",
      "name": "Run manually",
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        240,
        300
      ],
      "parameters": {}
    },
    {
      "id": "n1000001-0000-4000-8000-000000000002",
      "name": "Read leads",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        460,
        300
      ],
      "parameters": {
        "operation": "getAll",
        "documentId": {
          "__rl": true,
          "value": "YOUR_GOOGLE_SHEET_ID",
          "mode": "id"
        },
        "sheetName": {
          "__rl": true,
          "value": "Leads",
          "mode": "name"
        },
        "options": {}
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "REPLACE_ME",
          "name": "Google Sheets account"
        }
      }
    },
    {
      "id": "n1000001-0000-4000-8000-000000000003",
      "name": "SimpleVerifier verify",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        680,
        300
      ],
      "retryOnFail": true,
      "maxTries": 3,
      "waitBetweenTries": 5000,
      "parameters": {
        "method": "POST",
        "url": "https://simpleverifier.com/api/v1/verify",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={{ JSON.stringify({ email: $json.email }) }}",
        "options": {
          "timeout": 40000,
          "batching": {
            "batch": {
              "batchSize": 1,
              "batchInterval": 600
            }
          },
          "response": {
            "response": {
              "neverError": true
            }
          }
        }
      },
      "credentials": {
        "httpHeaderAuth": {
          "id": "REPLACE_ME",
          "name": "SimpleVerifier API key"
        }
      }
    },
    {
      "id": "n1000001-0000-4000-8000-000000000004",
      "name": "Keep action = send",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        900,
        300
      ],
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "c1a2b3c4-0001-4000-8000-000000000001",
              "leftValue": "={{ $json.action }}",
              "rightValue": "send",
              "operator": {
                "type": "string",
                "operation": "equals"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      }
    },
    {
      "id": "n1000001-0000-4000-8000-000000000005",
      "name": "Add lead to Instantly",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        1120,
        200
      ],
      "parameters": {
        "method": "POST",
        "url": "https://api.instantly.ai/api/v2/leads",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={{ JSON.stringify({\n  campaign: \"YOUR_INSTANTLY_CAMPAIGN_ID\",\n  email: $json.email,\n  first_name: $('Read leads').item.json.first_name,\n  last_name: $('Read leads').item.json.last_name,\n  company_name: $('Read leads').item.json.company\n}) }}",
        "options": {
          "batching": {
            "batch": {
              "batchSize": 1,
              "batchInterval": 300
            }
          }
        }
      },
      "credentials": {
        "httpHeaderAuth": {
          "id": "REPLACE_ME",
          "name": "Instantly API key"
        }
      }
    },
    {
      "id": "n1000001-0000-4000-8000-000000000006",
      "name": "Skip the rest",
      "type": "n8n-nodes-base.noOp",
      "typeVersion": 1,
      "position": [
        1120,
        420
      ],
      "parameters": {}
    },
    {
      "id": "n1000001-0000-4000-8000-000000000007",
      "name": "Read me",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        240,
        40
      ],
      "parameters": {
        "content": "## SimpleVerifier to Instantly\nSheet columns needed: email, first_name, last_name, company.\n1. Create two Header Auth credentials: Name Authorization, Value Bearer followed by your key. One for SimpleVerifier (key from simpleverifier.com/api-keys), one for Instantly.\n2. Set your Sheet ID and the Instantly campaign ID.\n3. Run on 10 rows first. Only rows with action = send reach Instantly. Rows that go to Skip are risky, retry_later or do_not_send. If every row skips, open the verify node output: a 401 or 402 body says why.",
        "height": 240,
        "width": 360
      }
    }
  ],
  "connections": {
    "Run manually": {
      "main": [
        [
          {
            "node": "Read leads",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read leads": {
      "main": [
        [
          {
            "node": "SimpleVerifier verify",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "SimpleVerifier verify": {
      "main": [
        [
          {
            "node": "Keep action = send",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Keep action = send": {
      "main": [
        [
          {
            "node": "Add lead to Instantly",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Skip the rest",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "pinData": {},
  "meta": {
    "templateCredsSetupCompleted": false
  }
}
