Integrations · CRM
Check sender emails on Front contacts
Check the email address of whoever writes in to Front, and mark the contact when the address cannot receive mail, so your team sees it before it replies. A small receiver you host answers a webhook of your own Front app on each inbound message: it reads the conversation's contact through Front's API, checks the address the message came from with our API and writes the answer into five custom fields of the contact. With a contact list of your choice, it also adds a contact whose answer is a status you flag (by default only invalid) to that list.
It flags and never blocks: Front has no step that refuses a message, so the message is in the inbox either way.
It is TypeScript with no dependencies, under the MIT licence. Download email-validation-front.zip. It holds worker.ts (the receiver as a Cloudflare Worker), email-validation-front.ts and core.ts (the receiver itself), verify.ts (a free check of your setup) and LICENSE. Its SHA-256 is 6a1ba90f8cb8fa48dee1537a61791f668f26e5a8200291a23dfc7e86985d3075 (shasum -a 256 email-validation-front.zip). It is not in Front's App Store.
What you need
- A Front company admin: only an admin can create custom fields, API tokens and apps.
- A Cloudflare account and Cloudflare's
wranglercommand (npx wrangler), on a computer with Node 22.18 or later (it also runsverify.ts). On your own server, any host withfetchand Web Crypto runs the receiver. - An API key of ours from the API keys page with the permission Validate addresses, and a daily credit cap that limits what a busy day can spend.
Set it up
Custom fields. In Front, click the gear icon, go to company settings, choose Custom fields and the Contacts tab, and click Create contact custom field. Create five, each of type Text (Front's API calls that type
string), with these exact names:EV email status,EV email reason,EV email checked at,EV email hashandEV email listed. The receiver writes exactly these names, so type them as shown.Contacts for new senders. The receiver checks a sender only when Front has a contact for them. By default Front creates contacts only for people you write to (For sent message). In company settings, choose Preferences, open Contacts, set Automatically create contact to Always and click Save. We recommend Always because it keeps the contacts Front creates for people you write to and adds one for each new sender; For received message replaces the default, so people you write to would no longer get a contact. With Always, every sender gets a contact, spam included.
A Front API token. In Settings, choose Developers, the API Tokens tab, and click Create API token. Give it the feature Access resources, the namespace Shared resources (all shared workspaces) and the read and write permissions: the receiver reads conversations and contacts and writes contacts. Keep it only in the receiver's secrets.
A Front app. In Settings, choose Company, then Developers, and click Create app. Open its Settings tab and copy the App secret: the receiver checks the signature of every webhook delivery with it.
Deploy the receiver from the unzipped folder. Set
FRONT_TRY_ADDRESSfirst, to an address of your own (see Try it): until you delete it, only mail from that one address is checked.cd email-validation-front npx wrangler deploy worker.ts --name ev-front --compatibility-date 2026-10-01 npx wrangler secret put FRONT_TRY_ADDRESS --name ev-front # first: your own address, for the try npx wrangler secret put EV_API_KEY --name ev-front # our API key npx wrangler secret put FRONT_API_TOKEN --name ev-front # the Front API token npx wrangler secret put FRONT_APP_SECRET --name ev-front # the app's App secret npx wrangler secret list --name ev-frontwrangler deployprints the Worker's address, such ashttps://ev-front.<your subdomain>.workers.dev. The last command must list all four names,FRONT_TRY_ADDRESSamong them; do not go on to step 7 until it does. AFRONT_TRY_ADDRESSleft blank (Enter at the prompt) is refused: the Worker answers every request with HTTP 500 until you set it again, and nothing is checked.Check it for free. In the same folder, run
verify.tswith the app secret and the API token (eachreadwaits for you to paste the value, which is not shown and stays out of your shell history):read -rs FRONT_APP_SECRET && export FRONT_APP_SECRET read -rs FRONT_API_TOKEN && export FRONT_API_TOKEN node verify.ts https://ev-front.<your subdomain>.workers.devOn your computer it signs test deliveries the way Front does and runs them through the receiver: one signed with another secret must be refused, Front's URL check must be answered, and a test message for a conversation that does not exist must reach Front with your token and come back "not found". Then it asks your Worker to answer a signed URL check, which shows the Worker has the same app secret. It never calls our API, so it costs nothing. Every line must start with
ok; the last one says0 credits used.The webhook. First run
npx wrangler secret list --name ev-frontonce more: ifFRONT_TRY_ADDRESSis not listed, set it (step 5) before you go on, or every sender is checked. In your app, open the Features tab, click Add feature and then Webhook. Enter the Worker's address as the Webhook URL, choose the event Inbound messages (inbound_received) under Subscribed events, and save. Front checks the address with a signed request before it saves: the Worker answers it, and nothing is checked or paid for.
On your own server, put email-validation-front.ts and core.ts side by side and create the receiver once, at module level, for example as a Next.js route handler:
export const POST = createFrontHook({
apiKey: process.env.EV_API_KEY, // our API key
frontToken: process.env.FRONT_API_TOKEN, // the Front API token, never ours
signingSecret: process.env.FRONT_APP_SECRET,
onlyAddress: process.env.FRONT_TRY_ADDRESS, // the try: only your own address; unset it to check everyone
waitUntil: after, // from next/server: the check finishes after Front has its answer
});Settings
| Variable | Value |
|---|---|
EV_API_KEY | Required. Our API key with Validate addresses. |
FRONT_API_TOKEN | Required. The Front API token. |
FRONT_APP_SECRET | Required. Your Front app's App secret (its Settings tab). |
FRONT_TRY_ADDRESS | For the one-address try (1 credit): only conversations from this one address are checked. Set but blank, it is refused (HTTP 500). Delete it to check everyone. |
FRONT_LIST_ID | A contact list for flagged contacts: its id, which starts with grp_. Without it, only the custom fields are written. |
EV_FLAG | The statuses that add a contact to the list, separated by commas: invalid, disposable, catch_all, unknown. Default invalid. |
EV_REGION | eu to check addresses in the EU (EU data residency), with the same key. |
FRONT_COMPANY_IDS | Only deliveries for these Front companies (cmp_ ids, separated by commas) are acted on. |
These settings are needed on every request, so they live in the Worker's secrets. A missing EV_API_KEY, FRONT_API_TOKEN or FRONT_APP_SECRET, or a wrong value of any setting, fails every request with HTTP 500, and the Worker's logs name the setting (never a key, a token or an address). Front then cannot save the webhook. To find a contact list's id, list your lists through Front's API:
curl -H "Authorization: Bearer $FRONT_API_TOKEN" https://api2.frontapp.com/contact_listsWhat it writes
On each inbound message, the receiver reads the conversation, its contact and the address the message came from. It checks that address once and writes, into the contact's custom fields:
EV email status: our status, one ofvalid,invalid,catch_all,unknownordisposable(what each means);EV email reason: the reason, such asno_mailbox;EV email checked at: when it was checked (ISO 8601, UTC);EV email hash: a fingerprint of the address, never the address. The next message from the same address finds it and starts nothing, so each address is checked once;EV email listed:yeswhile the receiver has put the contact on your list, else empty.
Front's PATCH /contacts/{id} erases the custom fields it is not sent, so the receiver reads the contact right before it writes and sends back all of its other custom fields as they are, with ours. Nothing else of the contact is changed, and nothing is ever sent to the sender. A contact your team put on the list itself is never taken off it; the receiver removes only a listing it made, when a corrected address is no longer flagged.
unknown answers that mean our check ran out of time or failed (timeout, internal_error) are never written, so the next message checks again.
Try it
The first try checks exactly one address: your own. It costs 1 credit (or nothing if your address comes back unknown), and the result shows on your own contact in Front.
- Keep
FRONT_TRY_ADDRESSset to your address (setup step 5). Use a personal mailbox that is not connected to Front and is not a teammate's address, so the mail arrives as an inbound message. - In a terminal, watch the Worker's log:
npx wrangler tail ev-front. - Send one mail from that mailbox to your Front inbox. Within a minute the log shows one line with your conversation,
"outcome":"allowed"(or"flagged") and the status, and your contact in Front shows the five fields. Every other message that arrives during the try logs"error":"other_address": it is not checked and costs nothing. - Send a second mail from the same address. Its line must say
"outcome":"already_checked", and it costs nothing. If it checks again, or a line for any other address showsallowedorflagged, stop: runnpx wrangler secret delete EV_API_KEY --name ev-front(the Worker then answers every delivery with HTTP 500 and checks nothing), or delete the Front API token (see End access), and contact us. - To check everyone who writes in, delete the try setting:
npx wrangler secret delete FRONT_TRY_ADDRESS --name ev-front.
We have not yet tried this on a real Front account. Front's docs leave these open: whether the webhook is signed with the app secret or with a token from the webhook's setup (their page names both), the exact shape of a delivery (the receiver reads the conversation's id in both shapes Front's pages show), and whether a contact holding custom fields of other types (a number, a date, a teammate) takes their values back unchanged. If step 3 shows no line at all, open your app's Webhook feature and check that it is enabled; a line with "ignored" names why a delivery started nothing (no_conversation: a delivery shape the receiver does not read; tell us). If the line shows no_address, Front has no contact for your address (setup step 2).
When something fails
It fails open: every check it cannot make leaves the contact as it is. The log line of each conversation names why in error:
platform_call_refused: Front refused the token (HTTP 401 or 403) or a write. A custom field with a missing or misspelled name is refused too.platform_call_failed: no answer from Front, or a Front error.platform_rate_limited: Front's rate limit outlasted the wait (below).contact_gone: the conversation or the contact no longer exists.no_address: the conversation has no contact or no email address.other_address: a try is on (FRONT_TRY_ADDRESS).no_custom_fields: Front's answer for the contact held no custom fields, so nothing is written (a write without them would erase your team's fields).- Our API's errors keep their code, for example
unauthorized(a wrongEV_API_KEY),insufficient_credits(buy credits),key_daily_cap(the key's daily cap is reached) orforbidden(the key lacks Validate addresses, the account is on hold, or it allows only EU checks: setEV_REGIONtoeu).timeoutandconnection_errormean our API did not answer in time.
The Worker answers Front at once and checks after the answer, because Front waits 5 seconds for each delivery. A delivery without Front's signature, signed with another secret, or more than 5 minutes old is answered 401 and nothing is read.
Front disables a failing webhook. Front retries a delivery up to three times when it gets an error or no answer in 5 seconds. If the last retry fails, Front disables the webhook, stops sending events and emails the admin who created the app. To turn it back on, fix the cause (often a missing setting: HTTP 500), open your app's Webhook feature and click Update: Front checks the address again. Front does not resend the messages it missed, so their senders are checked on their next message.
Rate limits. Front allows a company 50 to 200 API requests a minute, by plan (Starter 50, Professional 100, Enterprise 200), shared with your company's other API tokens and its Zapier connection (integrations installed from Front's App Store do not count). A message from a new address takes four reads and one or two writes; one from an address already checked takes two reads. When Front answers 429, the receiver waits as long as its Retry-After asks, up to 20 seconds, for up to three tries in all. Past that the contact is left as it is, and the answer, already paid for, is kept in memory, so the next message writes it without a new check. A conversation's Front calls stop 22 seconds after its work starts, so the work ends inside the 30 seconds Cloudflare gives it.
What it costs
Each check costs at most 1 credit, like any validation request. unknown results, errors and malformed addresses are free, and an address the receiver has already written is not checked again. Credits come in one-time packs, from $0.15 per 1,000 with the 50,000,000-credit pack (smaller packs cost more per credit), and new accounts get 500 free credits (100 when you sign up with a free email provider such as Gmail, Outlook or Yahoo, another personal mailbox such as a paid one like Fastmail or one from your internet provider, or an address from a relay or alias service).
Privacy
The receiver takes only the conversation id from Front's delivery, never an address, and reads the conversation and the contact from https://api2.frontapp.com. It sends only the sender's address, in the body of a POST to https://api.email-validation.org (or https://api-eu.email-validation.org), never in a URL, and nothing else from the conversation. Front's custom fields get the status, the reason, the time and a fingerprint, never the address. Our key goes only to our API and the Front token only to Front's API; redirects are never followed, and nothing is logged with an address, a key or a token.
End access
The Worker holds your Front API token, which reads and writes your contacts. Deleting the unzipped folder alone ends nothing: the Worker keeps running with its secrets. To end its access:
Remove the webhook in your app (Settings → Company → Developers, your app, the Features tab), or the app itself. Front's docs do not describe deleting a feature or an app, and we have not tried it on a real account; if you find no delete button there, ask Front's support.
Delete the API token: Settings → Developers → API Tokens, click the token, then Delete. Front stops every request with it at once, and it cannot be undone. This alone ends the receiver's access to Front.
Delete the Worker and its secrets. On the computer you deployed from, run:
npx wrangler delete --name ev-frontOn your own server, remove the receiver and its settings.
Revoke our key on the API keys page.
The five custom fields and their values stay on your contacts. To remove them, open company settings → Custom fields → Contacts and delete them there (not yet tried on a real Front account).