{
  "id": "ZpBq3hj2ttjm4OOI",
  "name": "NeverBounce Automated HubSpot CRM Hygiene Loop",
  "tags": [],
  "nodes": [
    {
      "id": "b0cdb156-7e09-4b78-9f8a-796137f1ef67",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -112,
        64
      ],
      "parameters": {
        "width": 936,
        "height": 1024,
        "content": "## NeverBounce Email Verification: Automated HubSpot CRM Hygiene Loop\nUse this workflow to regularly re-check contacts from HubSpot and notify your team in Slack when risky records are found.\n\n## Flow\nScheduled Trigger -> Get Many Contacts (HubSpot) -> Loop Over Items -> Verify with NeverBounce -> Filter Risky -> Update HubSpot -> Final Slack Report.\n\n## Setup\n1. Set Schedule: Open the 'Run Daily' node to set your preferred check interval (e.g., daily or weekly).\n\n2. Connect HubSpot: In the 'Get many contacts' node, connect your credentials and select the specific list or search criteria for the contacts you want to audit.\n\n3. Neverbounce credentials: In 'Neverbounce: verify an email', select your NeverBounce API key.\n\n4. Configure Flagging: In the 'Hubspot: flag risky contact' node, ensure the 'Lead Status' mapping aligns with your internal HubSpot properties (currently set to mark 'valid' as 'Open' and others as 'Disqualified').\n\n5. Final Report: Connect your Slack credentials in the 'Slack final audit report' node and choose the channel where you want the summary audit sent after the loop finishes.\n\n\n## Video Tutorial:\nWatch the 53-second setup guide above\n@[youtube](NZU8s1cnIJI)"
      },
      "typeVersion": 1
    },
    {
      "id": "5d017875-ec7d-429b-af91-61bd4281905f",
      "name": "Run Daily",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        848,
        224
      ],
      "parameters": {
        "rule": {
          "interval": [
            {}
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "0a216291-9a98-458c-b2fe-95e04b4099f4",
      "name": "Loop Through Contacts",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        1360,
        224
      ],
      "parameters": {
        "options": {
          "reset": false
        }
      },
      "typeVersion": 3
    },
    {
      "id": "44ee9408-85b7-4c63-9af0-6cfd2b99b382",
      "name": "NeverBounce: Verify Email",
      "type": "n8n-nodes-neverbounce-email-verification.nbEmailVerification",
      "position": [
        1776,
        336
      ],
      "parameters": {
        "emailField": "=Email",
        "additionalFields": {}
      },
      "typeVersion": 1
    },
    {
      "id": "378132d8-3d8b-4b77-a1dd-77b019db15fa",
      "name": "Slack final audit report",
      "type": "n8n-nodes-base.slack",
      "position": [
        1568,
        144
      ],
      "parameters": {
        "text": "=NeverBounce CRM Hygiene Report\n\nStatus: Audit Complete \u2705\nAction: We identified and updated  {{ $('Hubspot: flag risky contact').all().length}} risky contacts in HubSpot.\nNote: These records have been flagged as 'Risky' or 'Invalid' to protect your sender reputation.",
        "select": "channel",
        "channelId": {
          "__rl": true,
          "mode": "list",
          "value": "revops-alerts",
          "cachedResultName": "revops-alerts"
        },
        "otherOptions": {}
      },
      "typeVersion": 2.1
    },
    {
      "id": "f579101a-d96d-46f1-a6c8-c13d9ab2bca4",
      "name": "Hubspot: flag risky contact",
      "type": "n8n-nodes-base.hubspot",
      "position": [
        2384,
        352
      ],
      "parameters": {
        "email": "={{ $('NeverBounce: Verify Email').item.json.Email }}",
        "options": {},
        "authentication": "oAuth2",
        "additionalFields": {
          "leadStatus": "=UNQUALIFIED"
        }
      },
      "credentials": {
        "hubspotOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "ce81b807-2e55-4a93-8bae-463c9f431240",
      "name": "Get many contacts",
      "type": "n8n-nodes-base.hubspot",
      "position": [
        1072,
        224
      ],
      "parameters": {
        "operation": "getAll",
        "returnAll": true,
        "authentication": "oAuth2",
        "additionalFields": {}
      },
      "typeVersion": 2.2
    },
    {
      "id": "3c56bb0d-3c35-4ac1-b23f-fe595ccb8f0e",
      "name": "Email Parser",
      "type": "n8n-nodes-base.set",
      "position": [
        1568,
        336
      ],
      "parameters": {
        "mode": "raw",
        "options": {},
        "jsonOutput": "={\n  \"Email\":  {{ $json['identity-profiles'][0].identities[0].value }}\n}"
      },
      "typeVersion": 3.4
    },
    {
      "id": "6f9ce58f-0c3c-452a-8378-df2b209cff86",
      "name": "Status Parser",
      "type": "n8n-nodes-base.set",
      "position": [
        1936,
        336
      ],
      "parameters": {
        "mode": "raw",
        "options": {},
        "jsonOutput": "={\n  \"valid\": {{ $json.verification_result.valid }}\n}"
      },
      "typeVersion": 3.4
    },
    {
      "id": "71e55c27-f747-4713-9a79-2b658540d987",
      "name": "Check if risky",
      "type": "n8n-nodes-base.switch",
      "position": [
        2112,
        336
      ],
      "parameters": {
        "rules": {
          "values": [
            {
              "outputKey": "valid",
              "conditions": {
                "options": {
                  "version": 3,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "6c5e79c8-9476-4751-8fcb-84b85ba52243",
                    "operator": {
                      "type": "boolean",
                      "operation": "true",
                      "singleValue": true
                    },
                    "leftValue": "={{ $json.valid }}",
                    "rightValue": false
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "invalid",
              "conditions": {
                "options": {
                  "version": 3,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "6149fc3a-b2cf-4d2f-a26f-e9cc50ba4aac",
                    "operator": {
                      "type": "boolean",
                      "operation": "false",
                      "singleValue": true
                    },
                    "leftValue": "={{ $json.valid }}",
                    "rightValue": ""
                  }
                ]
              },
              "renameOutput": true
            }
          ]
        },
        "options": {}
      },
      "typeVersion": 3.4
    }
  ],
  "active": false,
  "settings": {
    "binaryMode": "separate",
    "executionOrder": "v1"
  },
  "versionId": "bc6b74ae-9294-4748-8961-97bdd68adbe4",
  "connections": {
    "Run Daily": {
      "main": [
        [
          {
            "node": "Get many contacts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Email Parser": {
      "main": [
        [
          {
            "node": "NeverBounce: Verify Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Status Parser": {
      "main": [
        [
          {
            "node": "Check if risky",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check if risky": {
      "main": [
        [
          {
            "node": "Loop Through Contacts",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Hubspot: flag risky contact",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get many contacts": {
      "main": [
        [
          {
            "node": "Loop Through Contacts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Through Contacts": {
      "main": [
        [
          {
            "node": "Slack final audit report",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Email Parser",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "NeverBounce: Verify Email": {
      "main": [
        [
          {
            "node": "Status Parser",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Hubspot: flag risky contact": {
      "main": [
        [
          {
            "node": "Loop Through Contacts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}