All posts

Verify New HubSpot Contacts Automatically With a Workflow

··8 min read

To verify new HubSpot contacts automatically, build a contact workflow that calls an email verification API, writes the result to a contact property, and branches on it. HubSpot gives you two ways to make the call: the Send a webhook action, which needs no code, and the Custom code action. HubSpot lists both under Data Hub Professional and Enterprise. Valid contacts continue to your nurture or sales handoff. Risky contacts go to review. Invalid contacts stay in the CRM but out of your sends.

This guide covers the properties to create, both setups with SimpleVerifier's API as the example, how HubSpot retries, and what to do if you do not have Data Hub.

Why verify inside the workflow

A bad address that enters HubSpot causes problems before anyone looks at it. Welcome emails bounce. Lead scoring counts a contact that cannot be reached. Sales sequences start on an address that will never reply. Every bounce counts toward your bounce rate.

Verifying at entry stops that. It also gives you a property to filter on later, so every list, report and send can exclude unreachable contacts. Our guide to cleaning bounced and invalid contacts in HubSpot covers the cleanup side. This guide prevents the mess in the first place.

Step 1: Create the properties

Create three contact properties. HubSpot's properties guide explains how.

Property Type Values
Email verification status Dropdown select valid, risky, invalid, unknown
Email verification reason Single-line text The API's reason, for example "Accepts all addresses"
Email verified on Date picker The date of the check

The "unknown" option is for checks that could not complete, for example a timeout. Without it, a failed check looks the same as a contact that was never checked.

Step 2: Set the enrollment trigger

Create a contact-based workflow. Enroll contacts when they are created and the email property is known. HubSpot's enrollment triggers guide covers the options.

Turn on re-enrollment when the email property changes, if your plan allows it. A contact who corrects a typo in their email should be checked again.

Option A: the Send a webhook action (no code)

HubSpot's webhook guide describes the setup. Add an action, choose Send a webhook under Data ops, and fill it in:

Setting Value
Method GET
Webhook URL https://simpleverifier.com/api/v1/verify
Authentication type API key
API key name Authorization
API key location Request header
API key value A secret containing Bearer sv_live_...
Query parameters Key email, value: the contact's Email property

HubSpot's guide says a GET webhook sends properties as query parameters, and that the API key option can store the key as a secret in a request header. The key is not shown in test requests.

Test and choose the outputs

Expand Test action and click Test with a sample contact. HubSpot shows the request and the response. The response looks like this:

{
  "email": "jane@company.com",
  "status": "valid",
  "reason": "Mailbox exists",
  "mailbox_checked": true
}

Select status and reason as output fields. HubSpot's guide warns that output fields must appear in every response, or a later action that uses them will fail. status and reason are present on every successful SimpleVerifier response. The API docs list every status and reason.

Write the result to the contact

Add an Edit record action after the webhook. HubSpot's workflow actions guide notes that Edit record can copy values from earlier workflow actions. Set:

  • Email verification status = the webhook's status output.
  • Email verification reason = the webhook's reason output.
  • Email verified on = the date the action runs.

How HubSpot retries the webhook

HubSpot retries failed webhooks for up to three days, starting one minute after the failure, with gaps of up to eight hours. It does not retry 4xx responses, except 429, where it respects the Retry-After header. For SimpleVerifier, that means:

  • 503 (service briefly unavailable): retried automatically.
  • 429 (over 120 calls a minute on one key): retried automatically.
  • 401 or 402 (bad key or inactive subscription): not retried. Fix the key or plan.

If you import many contacts at once, the workflow can fire hundreds of webhooks in a burst. HubSpot's webhook guide describes an optional rate limit setting, off by default, that caps executions per second, minute or hour. Set it to 100 per minute to stay under the API's limit with room to spare.

Option B: the Custom code action

Custom code gives you control over the timeout and the fallback value. HubSpot's custom code documentation sets the limits: code runs on Node.js or Python (beta), must finish within 20 seconds, and can use up to 128 MB of memory. Secrets are available as environment variables.

Add the API key as a secret named SIMPLEVERIFIER_KEY, include the Email property, and use:

const axios = require("axios");

exports.main = async (event, callback) => {
  const email = (event.inputFields.email || "").trim().toLowerCase();
  if (!email) {
    return callback({ outputFields: { status: "unknown", reason: "No email" } });
  }

  try {
    const res = await axios.get("https://simpleverifier.com/api/v1/verify", {
      params: { email },
      headers: { Authorization: `Bearer ${process.env.SIMPLEVERIFIER_KEY}` },
      timeout: 18000,
    });
    callback({ outputFields: { status: res.data.status, reason: res.data.reason } });
  } catch (err) {
    const code = err.response?.status;
    if (code === 429 || (code >= 500 && code < 600)) throw err;
    callback({ outputFields: { status: "unknown", reason: err.code === "ECONNABORTED" ? "Timed out" : `HTTP ${code ?? "error"}` } });
  }
};

Define two string outputs, status and reason, and copy them into the properties with Edit record, as in Option A.

Why the 18-second timeout

A live mailbox check talks to the recipient's mail server. Our API docs recommend about 30 seconds for slow servers. HubSpot stops custom code at 20 seconds. Setting the HTTP timeout to 18 seconds lets the code write "unknown" and exit cleanly, instead of being cut off with no result. You can re-check unknown contacts later in bulk.

Retries

HubSpot's documentation says that when a call fails with a rate-limit error, or a 429 or 5xx error from axios or HubSpot's client library, it retries for up to three days, but only if your code rethrows the error. That is what the throw err line does. Every other error is written as "unknown" so the workflow continues.

Step 3: Branch on the result

Add a branch based on one property or action output, on Email verification status:

Status Branch action
valid Continue: nurture, lead rotation or sales handoff
risky Notify the owner or route to review; keep out of automated cold sequences
invalid Keep out of sends; set marketing contact status to non-marketing if you pay per marketing contact
unknown Delay, then re-check, or leave for the next bulk check

For risky contacts, the reason matters. "Accepts all addresses" means a catch-all domain: many are real people, but the mailbox cannot be confirmed. Our guide to catch-all domains explains how to handle them. "Role-based address" means a team inbox such as info@. See role addresses.

For invalid contacts, HubSpot's actions list includes Set marketing contact status, which needs Marketing Hub Professional or Enterprise. HubSpot's marketing contacts guide says you "only pay for the contacts you want to market to", and that a contact set as marketing stays marketing at least until the next update date. Setting unreachable contacts to non-marketing can take them out of that count after that date. Check your own contract's update date before relying on it.

Worked example: a demo request form

A SaaS company's demo form creates contacts in HubSpot. The workflow runs on create:

  1. Contact jane@company.com is created. The webhook returns status: valid, reason: Mailbox exists. Properties are set. The contact continues to lead rotation.
  2. Contact info@smallagency.com is created. The result is risky, Role-based address. The owner gets a task to call instead.
  3. Contact j.smiht@company.com is created, with a typo in the name. The result is invalid, Mailbox not found. The contact is kept, marked non-marketing, and a task asks the rep to confirm the address by phone.

Without the workflow, all three would have received the same automated follow-up, and one would have bounced.

Use the property everywhere

The status property is only useful if the rest of HubSpot reads it. Once the workflow runs, add it to three places:

  • Send filters. Exclude contacts whose status is invalid from every marketing email and sequence. Exclude risky contacts from automated cold outreach.
  • Lists and segments. Build an "unreachable" segment from invalid and unknown contacts. Review it monthly; some unknowns can be re-checked.
  • Reports. Chart status by original source. If one form, event or list vendor produces a high share of invalid contacts, you can fix the source instead of cleaning up after it.

The date property helps with the last step too. A contact checked a year ago and never emailed since should be re-checked before a campaign. Our re-verification cadence guide sets out when.

Without Data Hub Professional

Both actions need Data Hub Professional or Enterprise. Without it, you still have options:

  • Zapier, Make or n8n. Trigger on new HubSpot contacts, call the API, and update the contact. Our guides to Zapier and Make and n8n show the flows.
  • Scheduled bulk checks. Export contacts created since the last check, verify the file, and import the status column. Our HubSpot export guide covers the export.
  • Verify at the form. If the form lives on your own site, call the API from your server before submitting to HubSpot.

Verifying the contacts you already have

A workflow handles new contacts. For the existing database, a bulk check is faster. Export, verify the file, and import the results into the same three properties, so old and new contacts can be filtered the same way. At 120 calls a minute, sending 50,000 existing contacts through a workflow would take about seven hours, compared with a single CSV upload.

What it costs

SimpleVerifier's API is included in the Pro plan at $29.99 a month, with unlimited email verification and no per-call credits. The Email + Phone plan at $49.99 a month adds live phone carrier lookups. For an occasional bulk check of exported contacts, pay-as-you-go packs cost $9 for 2,500 or $19 for 10,000 verifications by CSV upload, and credits never expire. See pricing.

The short version

Create status, reason and date properties. Trigger a contact workflow on create. Call the verification API with Send a webhook (GET, email as a query parameter, key as a secret in the Authorization header) or with Custom code (18-second timeout, rethrow 429 and 5xx). Write the result with Edit record, branch on status, and keep invalid contacts in the CRM but out of your sends. Without Data Hub, use an automation tool or scheduled bulk checks.

Common questions

Can HubSpot verify email addresses automatically?

HubSpot workflows can call an external email verification API when a contact is created, using the Send a webhook action or a Custom code action, both listed by HubSpot under Data Hub Professional and Enterprise. The result is written to a contact property and used to branch the workflow.

Which is better for verification in HubSpot: webhook or custom code?

Use Send a webhook if you want no code: a GET request with the email as a query parameter and the response fields used in later actions. Use Custom code if you need control over timeouts, retries and fallback values, within HubSpot's 20-second runtime limit.

What happens if the verification API is down when the workflow runs?

HubSpot retries failed webhook actions for up to three days, starting one minute after the failure. It does not retry 4xx errors except 429. Custom code actions are retried the same way for rate-limit and 5xx errors when your code rethrows the error.

Should I delete contacts whose email comes back invalid?

No. Keep the record, mark it, and keep it out of email sends. The contact may have a phone number, an owner or deal history worth keeping. Deleting also makes it easier for the same bad address to be imported again.

How do I verify contacts already in HubSpot?

Export them, verify the file in bulk, and import the result into the status property. Workflows are for new contacts as they arrive; a bulk check is faster and cheaper for a database you already have.

Verify unlimited addresses for $29.99/month

Real SMTP mailbox checks. No credits, no per-email fees.

Get Started