ContactLintAPIMCPPricingFree toolsCompareGet a key

Home / Integrations / Zapier

Validate Emails in Zapier Zaps With ContactLint

Published 2026-10-18

This guide adds a ContactLint email check to a Zap, between the trigger and the step that saves the contact. Code by Zapier is the recommended option because it can time out after 3 seconds and fail open. A no-code Webhooks by Zapier option is also covered, with its trade-off.

Where the check goes in Zapier

Put the check right after your trigger, such as a new form entry or a new lead, and before any step that creates a contact, adds a subscriber or sends an email. Zapier runs on a server, so your secret key never reaches the browser.

Zapier runs after the form has been submitted, so it cannot show a hint on the form. It decides what happens to the record: save it, hold it, or ask the person to fix it. To show "Did you mean ...?" on the form itself, add the widget and keep this Zap as the backstop.

Option 1: Code by Zapier (recommended)

  1. Get a free secret key at /signup.
  2. Add an action step: Code by Zapier, event Run JavaScript.
  3. Under Input Data, add email mapped to the email field from your trigger, and key set to your secret key. Zapier has no environment variables for code steps, so anyone who can edit the Zap can see this value. Limit who can edit it.
  4. Paste this code:
const email = (inputData.email || '').trim();
const out = { action: 'accept', message: '', suggestion: '', verdict: '', reason: '' };
if (!email) return out;

const controller = new AbortController();
const timer = setTimeout(() => controller.abort(), 3000);
try {
  const res = await fetch('https://contactlint.com/v1/email/validate', {
    method: 'POST',
    headers: { 'Authorization': 'Bearer ' + inputData.key, 'content-type': 'application/json' },
    body: JSON.stringify({ email }),
    signal: controller.signal,
  });
  if (res.ok) {
    const { result } = await res.json();
    out.verdict = result.verdict;
    out.reason = result.reason || '';
    if (result.verdict === 'invalid') {
      out.action = 'reject';
      out.message = 'That email address cannot receive mail.';
    } else if (result.did_you_mean) {
      out.action = 'suggest';
      out.suggestion = result.did_you_mean;
      out.message = 'Did you mean ' + result.did_you_mean + '?';
    } else if (result.disposable) {
      out.action = 'reject';
      out.message = 'Please use a permanent email address.';
    }
  }
  // Non-200 (401, 402, 429): action stays 'accept' (fail open)
} catch (e) {
  // Timeout or network error: fail open
} finally {
  clearTimeout(timer);
}
return out;

The step returns flat fields (action, message, suggestion, verdict, reason) that later steps can map directly.

Option 2: Webhooks by Zapier POST

If you prefer no code, add an action step: Webhooks by Zapier, event POST. Webhooks by Zapier may depend on your plan, so check your plan. Set:

The response fields, including the result's verdict, reason, did_you_mean and disposable, become available to later steps. The trade-off: this step has no 3 second timeout setting, and an error response such as 402 makes the step fail. That stops the Zap run unless you have set up error handling, which may also depend on your plan. In other words, it does not fail open by default. For signups, use Code by Zapier.

Handling each verdict and did_you_mean

Branch on the action field with Paths by Zapier (check your plan) or with Filter by Zapier steps.

Testing it

In the Code by Zapier step, temporarily set the email input to each test address and click Test step:

Then map the email back to your trigger field and turn the Zap on.

Limits

Questions

Should I use Code by Zapier or Webhooks by Zapier?

Use Code by Zapier for signups and leads. It times out after 3 seconds and accepts the address if ContactLint does not answer. A Webhooks by Zapier POST has no timeout setting, and an error response stops the Zap run unless you have error handling set up.

Can Zapier show a Did you mean message on my form?

No. Zapier runs after the form is submitted. Add the ContactLint widget with a cl_pub_ publishable key to show the hint on the form, and keep the Zap as the server-side backstop.

Is it safe to put my secret key in the Zap?

It stays on Zapier's servers and never reaches the browser, but anyone who can edit the Zap can see it. Limit edit access to people you trust with the key.

Other integrations

Get a free API key. 100 checks per month, no card required. Or try a live check first.