Integrations · CRM
Validate emails of new Follow Up Boss leads
Check the addresses of every new Follow Up Boss lead. Follow Up Boss calls a small receiver of yours each time a person is created (a lead from your website, a portal or a person added by hand); the receiver reads that person, checks their addresses with your API key, tells you which ones cannot receive mail and, if you want, tags the person in Follow Up Boss so your agents see it before they email.
Download it: email-validation-follow-up-boss.zip holds email-validation-follow-up-boss.mjs (one JavaScript module) and the MIT licence.
What you need
- An API key of ours from the API keys page with Validate addresses (on by default). Keep it on your server, never in a page.
- A server that Follow Up Boss can reach over HTTPS, in anything with
fetch(Node 22 or later, Bun, Deno, Cloudflare Workers). Copyemail-validation-follow-up-boss.mjsnext to its code. - The Follow Up Boss account owner's API key (Admin, then API): only the account owner can register webhooks, and an owner's key can read every person. An agent's key reads only the agent's own leads.
- A registered system: Follow Up Boss asks every API user to register one (its name goes in
X-System, its key inX-System-Key), and signs each webhook delivery with that system key. Register at apps.followupboss.com/system-registration.
The receiver
Make the receiver once per process and hand it each request to the webhook URL. A Cloudflare Worker:
import { createFollowUpBossHook } from './email-validation-follow-up-boss.mjs';
let hook;
export default {
fetch(request, env, ctx) {
hook ??= createFollowUpBossHook({
apiKey: env.EV_API_KEY,
fubApiKey: env.FUB_API_KEY,
system: env.FUB_SYSTEM, // your registered system's name
systemKey: env.FUB_SYSTEM_KEY, // and its key
tag: 'email-invalid', // only to tag
onResult: (r) => {
// r.personId, r.emails (each with where, status, reason, blocked), r.blocked, r.tagged
},
});
return hook.handle(request, ctx);
},
};Follow Up Boss waits 10 seconds for an answer, so let the receiver answer first and work afterwards:
- Cloudflare Workers: pass
ctx, as above. Workers keep that work alive for 30 seconds after the answer. - Vercel: pass
{ waitUntil }, imported from@vercel/functions. - A Node server that keeps running: turn your framework's request into a web
Request(Node 22 has one built in), pass{ waitUntil() {} }and send theResponseback; the work goes on in the process.
Without a second argument the receiver answers only when every person of the delivery is done, which can take longer than Follow Up Boss waits. It reads four people at a time and starts no person later than 25 seconds after the delivery arrived (timeLimitMs); a person it did not start is reported with lookupError set to time_limit.
Register the webhook
Follow Up Boss has no screen for webhooks: register one with its API, once, with the account owner's key and your system's name. Put your receiver's HTTPS address in url:
curl https://api.followupboss.com/v1/webhooks \
-u "$FUB_API_KEY:" \
-H "X-System: $FUB_SYSTEM" \
-H "X-System-Key: $FUB_SYSTEM_KEY" \
-H "Content-Type: application/json" \
-d '{"event": "peopleCreated", "url": "https://hooks.example.com/fub"}'$auth = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes("$($env:FUB_API_KEY):"))
Invoke-RestMethod -Method Post -Uri 'https://api.followupboss.com/v1/webhooks' `
-Headers @{ Authorization = "Basic $auth"; 'X-System' = $env:FUB_SYSTEM; 'X-System-Key' = $env:FUB_SYSTEM_KEY } `
-ContentType 'application/json; charset=utf-8' `
-Body '{"event": "peopleCreated", "url": "https://hooks.example.com/fub"}'The answer holds the webhook's id and its status, Active. To remove it later, list your webhooks with GET /v1/webhooks and delete it with DELETE /v1/webhooks/{id}, with the same headers. Follow Up Boss allows two webhooks per event for each system.
What it does
- A delivery holds person ids only. For each one (at most 50 per delivery) the receiver reads the person from Follow Up Boss's API, never from the address the delivery names, and checks every address in the person's emails (20 at most), each address once.
onResultgets one result per person:personId,emails(each address withwhere,status,reason,action,did_you_mean,blockedand, when it got no answer,error),blocked,lookupError(a person it could not read),taggedandtagError.- Tags only when you ask. Without
tag, nothing in Follow Up Boss changes. With it, a person with a blocked address gets that tag, merged into their tags (mergeTags), so their other tags stay. - Every other event is answered 200 and ignored, the person updates and new tags included, so the receiver's own tag never starts another check.
Try it free first
Check one of our free test addresses with the receiver's own check, without Follow Up Boss:
const result = await hook.check('no_mailbox@sandbox.email-validation.org');
console.log(result.status, result.blocked); // invalid trueChecks of our test addresses are free. Never send an email to them, or to any address you made up: it would bounce.
How it decides
- What is blocked.
invalidby default.block: ['invalid', 'disposable']also blocks disposable addresses, andcatch_allcan be added too.validandunknownare never blocked: act on theactionof avalidresult if you want to (spam traps and known complainers arevalidwith the actionremove). - It fails open. A timeout (6 seconds per check by default,
timeoutMs), a network error, a rate limit, no credits or any error answer leaves that address unchecked (errorsays why), never blocked, and the person is not tagged. Nothing is retried; after a rate limit the receiver sends nothing until our API'sRetry-Afterhas passed. A missing key, system or system key throws when you make the receiver. - Answers are remembered. A verdict is kept for the process's life (10,000 addresses by default,
memoMaxEntries); anunknownor a failed check is asked again. - Credits. Each check uses one credit (
unknownresults, malformed and sandbox addresses are free).region: 'eu'checks in the EU, athttps://api-eu.email-validation.org. - What it answers Follow Up Boss. 401 for a delivery whose
FUB-Signaturedoes not match your system key, 405 for anything but POST, 413 for a body over 64 KB, 400 for a signed body that is not JSON, else 200. It never answers 406 or 410, the two answers that make Follow Up Boss delete a webhook. An error thrown by youronResultis caught. - Our key goes only to our API; the Follow Up Boss key and the system key only to Follow Up Boss's API. Redirects are never followed, and the receiver logs nothing.
Test it first
The receiver follows Follow Up Boss's webhooks guide and API reference and has not run against a real Follow Up Boss account. Follow Up Boss offers a free trial: add one person by hand with the test address above and watch onResult before you rely on it.