Integrations · CRM

Validate your Attio people

Check the email addresses of your Attio people and write each result into four People attributes, so a view can leave out the addresses you should not mail. A script you run on your own computer reads every person record, checks the addresses (up to 50 one by one, more as one bulk list) and writes the results back. It never deletes, merges or changes a person's address. Download it: email-validation-attio.zip holds attio.mjs (the script) and the MIT licence.

What you need

  • A computer with Node 22.18 or later. Nothing to install: the script has no dependencies.
  • An API key of ours from the API keys page with Validate addresses, and the permission Bulk lists (off by default: turn it on when you create the key) for more than 50 people.
  • An Attio access token (Attio offers these on every plan; only a workspace admin can make one): the dropdown beside your workspace name → Workspace settings → Developers → + New access token. Give it read-write access to records (record_permission:read-write) and to object configuration (object_configuration:read-write): the first run creates the four attributes.

Try it free first

Every definite result uses one credit (unknown results, malformed and test addresses are free), so try it on an Attio workspace that holds only test people, never on your real ones. Give one test person the address no_mailbox@sandbox.email-validation.org (sandbox checks are free; that domain receives no mail, so send it nothing), then:

cd email-validation-attio                     # the unzipped folder
export ATTIO_API_KEY=… EV_API_KEY=…
node attio.mjs --dry-run                      # creates nothing, checks nothing, writes nothing: only counts
node attio.mjs                                # creates the four attributes if missing, checks and writes

In Windows PowerShell (5.1 or 7):

cd email-validation-attio                     # the unzipped folder
$env:ATTIO_API_KEY = "…"; $env:EV_API_KEY = "…"
node attio.mjs --dry-run                      # creates nothing, checks nothing, writes nothing: only counts
node attio.mjs                                # creates the four attributes if missing, checks and writes

ATTIO_API_KEY is the access token. The person's ev_status attribute says invalid and ev_reason says no_mailbox. Run it once more: it reports nothing to check, because every result was written. Then delete the test person.

Run it

node attio.mjs --dry-run      # how many people would be checked; free
node attio.mjs                # checks and writes

Up to 50 addresses are checked one by one; more go out as one bulk list. A person is checked by their first address, and one whose address already has a result is skipped (an unknown result is checked again), so a daily run checks only new and changed addresses. If a run stops, run the same command again from the same folder: it resumes the same bulk list and never pays twice (within the 30 days a list is kept). The state file (.ev-attio-<workspace id>.json) lives in that folder. It prints ids and counts, never an address or a token.

Options:

  • --region eu: checked in the EU, lists and results kept there, with the same key.
  • --revalidate: check again addresses that already have a result.
  • --rate N: Attio requests a second (default 5, at most 20). Attio allows 100 reads and 25 writes a second; the script waits what Attio asks, up to a minute per wait; if Attio still refuses, it stops and the same command resumes.
  • --state FILE: a state file of your own choosing.

Exit codes: 0 done; 1 a write failed or the run stopped (run it again: nothing is paid twice); 2 wrong options; 75 the bulk list was still being checked when the script stopped waiting (run it again later to collect it).

What it writes

Four People attributes of type Text, single value, created by the first run when they are missing (an admin can create them in Attio first, with exactly these slugs):

AttributeHolds
ev_statusvalid, invalid, catch_all, unknown or disposable
ev_reasonthe reason, for example no_mailbox or accepted
ev_checked_atwhen it was checked
ev_address_hasha hash of the address the result belongs to, so a changed address is checked again

An attribute with one of these slugs that is not a single-value text attribute, or that is archived, stops the run before anything is checked: rename or remove it. Spam traps and complainers are valid with a warning reason: see what each status means. Each result is written by record id, and only while the person still holds the address that was checked; the write names only these four attributes, so the person's other attributes and addresses stay as they are. A result that could not be written is kept in a file next to the state file and written by the next run without a new check.

A People view filtered on ev_status is invalid or disposable finds the people to leave out of your mailings.

End the access

Delete the access token in Attio (Workspace settings → Developers) and our key on the API keys page. The four attributes stay on your people until you delete them in Attio.

More on Attio

Updated · Maintained by: Email Validation LLC

Need help? Contact support, or ask the help chat. Something wrong or missing on this page? Tell us