Integrations · CRM
Validate your Help Scout customers
Check the addresses of your Help Scout customers and write each customer's result into four customer properties, so your team can see in each profile which addresses cannot receive mail. A bulk script you run on your own computer reads every customer, checks the addresses that have no result yet and writes the results back. It never deletes, merges or mails anyone, and it touches no conversation. Download it: email-validation-helpscout.zip holds helpscout.mjs (the bulk script) and the MIT licence. Its SHA-256 is e7e083c59aa6cfd5c06a8620f8c34fa3258d12e54e9f6745fb7ff977a7470ee7 (shasum -a 256 email-validation-helpscout.zip). Nothing is installed in Help Scout, and it is not in Help Scout's App Directory.
What you need
- A computer with Node 22.18 or later. Nothing to install: the script has no dependencies.
- A paid Help Scout plan (Standard, Plus or Pro). Help Scout's Free plan has no API access.
- An app of your own in Help Scout. Open Your Profile → My apps and click Create My App. Help Scout asks for a redirection URL, which this script does not use: any placeholder address will do. The app gives you an App ID and an App Secret. It works only while the user who made it is an active user of the account, and that user's role needs Access API and Access the contacts and companies directory. The first run creates the four customer properties, which only account owners and administrators can do, so make the app as one of them. Keep the App Secret secret: it opens your customers' data.
- An API key of ours from the API keys page with Validate addresses, and also Bulk lists (off by default: turn it on when you create the key) to check more than 50 customers in one run.
Run it
cd email-validation-helpscout # the unzipped folder
export HELPSCOUT_APP_ID=… HELPSCOUT_APP_SECRET=… EV_API_KEY=…
node helpscout.mjs --dry-run # what it would check; creates, spends and writes nothing
node helpscout.mjs # creates the properties if needed, checks and writes the resultsEvery run needs the same three settings, HELPSCOUT_APP_ID, HELPSCOUT_APP_SECRET and EV_API_KEY, also a run started by cron or another scheduler. Add --region eu to every run if you check in the EU. A missing setting stops the run with exit code 2 and its name, before anything is read.
Do the free try on one test customer before the first full run. The script does not ask before it spends: run it with --dry-run first to see how many customers it would check. Up to 50 addresses are checked one by one; more go to one bulk list. Each check uses one credit; unknown results are free, and in a bulk list duplicates and malformed addresses are free too.
A customer with several addresses is checked by the first of them in alphabetical order (Help Scout marks none as the main one); its other addresses are not checked. A customer whose address already has a result (other than unknown) is skipped; --revalidate checks it again. --region eu checks the addresses in the EU (EU data residency), with the same key. --customer ID checks one customer only (see the free try below).
What it writes
| Customer property | Value |
|---|---|
ev_status | valid, invalid, catch_all, unknown or disposable (statuses) |
ev_reason | why, for example accepted, no_mailbox, spamtrap |
ev_checked_at | when the check ran, in UTC |
ev_address_hash | a fingerprint of the address that was checked, so a customer whose address changes is checked again |
The first run creates the four as text contact properties, named as above, when they are missing. You find them in Settings (the gear icon) → Properties, under Contact. Help Scout allows up to 50 contact properties, and these four count towards that limit. If a property with one of these names exists but is not a text property, the run stops before anything is created or paid for.
Read ev_reason too, not only ev_status: spam traps and frequent complainers are valid with the reason spamtrap or complainer, and you should not mail them either.
Each result is written by customer id, only while the customer still holds the address that was checked: a customer whose address changed since the check is not written (the next run checks the new address), and a customer deleted or merged since then is left alone. The write is one PATCH of the customer's properties that names only our four, each with replace. Help Scout's docs say the call changes the properties it names; they do not say in words that it leaves the others alone, so the free try below checks that on your own account. No other part of the customer is changed, and nothing is ever emptied or deleted.
How long it takes
Help Scout limits API calls per minute for each account, shared with your other apps: Standard 200, Plus 400 and Pro 800, where each write counts as two calls. The script sends two calls a second by default, and each written customer takes two (a read right before the write, and the write), so it writes back about 60 customers a minute: 10,000 customers take about 2 hours 50 minutes. That uses about 180 of the Standard plan's 200 a minute, so keep the default on Standard. On Plus or Pro, --rate N sends up to N calls a second (at most 10); keep N × 90 well under your plan's limit to leave room for your other apps. When Help Scout answers its rate limit (HTTP 429), the script waits as long as Help Scout asks and goes on. The check itself runs on our side and is not slowed by Help Scout.
Try it free first
The script has not yet run against a real Help Scout account: this try, and its stop rules, show that it works on yours before it touches your other customers.
- In Help Scout, go to Customers → Contacts and click Create. Add one customer with the address
no_mailbox@sandbox.email-validation.org. If you have a contact property of your own, give it a value on this customer. Test addresses cost nothing, and that domain receives no mail, so start no conversation with it. Its id is the number in the address of the customer's profile page in your browser. If you see no number there, Help Scout's API also creates a customer and answers with its id (Create Customer, theResource-IDheader). - Run
node helpscout.mjs --customer ID --dry-run, with that id forID:--customerreads, checks and writes that one customer only, never your other customers, and keeps its own file,.ev-helpscout-customer-ID.json, apart from a full run's. It must reportwould check: 1. If it reports anything else, stop. Then runnode helpscout.mjs --customer ID. It should exit0, and the customer getsev_statusinvalidandev_reasonno_mailbox, while your own property keeps its value. That shows your own properties stay as they were before you run it on all your customers. - Run
node helpscout.mjs --customer IDagain: it must reportto check: 0. If it reports anything butto check: 0, stop and do not run it on all your customers: the result was not read back, so every run would pay again. Contact us. Then delete the test customer.
Run it again
Run the same command again after any stop (no credits, a closed laptop, Help Scout's rate limit, the bulk list still running): it resumes the same bulk list and never pays twice (within the 30 days a list is kept). Run it from the same folder each time (or pass the same --state FILE): the file it keeps there, .ev-helpscout-<account id>.json, holds the bulk list it is working on, never an address or a key. A result that was paid for but could not be written is kept in a second file there (ids, statuses and fingerprints only) and written by the next run without a new check. When every customer is written, the next run checks only customers without a result (or with unknown), such as new ones, so you can run it on a schedule, for example daily with cron, with the three settings above in the cron line's environment. There is no instant check of each new customer: a daily run gives every new customer a result within a day.
When something fails
Exit codes: 0 done, 1 a write failed or the run stopped (run it again: nothing is paid twice), 2 wrong arguments or a missing setting, 75 the bulk list was still running when the script stopped waiting (run it again later; --wait-minutes N waits longer).
- Help Scout refused the app (HTTP 401): the App ID or App Secret is wrong, or the user who made the app is no longer active.
- Help Scout refused the request (HTTP 403): the app's user lacks a permission above. On the first run it must be an account owner or administrator, to create the properties.
- Not a text property: a property named
ev_status,ev_reason,ev_checked_atorev_address_hashexists with another type. Rename or delete it. - Our API's errors keep their code, for example
insufficient_credits(buy credits and run it again),key_daily_cap(the key's daily cap is reached) orforbidden(the key lacks Bulk lists, needed for more than 50 customers, or your account allows only EU checks: add--region eu).
The script prints customer ids, job ids and counts, never an address or a key. It sends the App Secret and Help Scout's access token only to https://api.helpscout.net and our key only to https://api.email-validation.org (or https://api-eu.email-validation.org).
End access
The script runs only when you start it and keeps nothing in Help Scout but the four customer properties. Deleting the unzipped folder alone does not end its access: the app and its secret still work. To end it:
- Stop any scheduled run (for example remove its cron line), and delete the unzipped folder with its
.ev-helpscout-<account id>.jsonfiles and the free try's.ev-helpscout-customer-IDfiles. - Delete the app in Your Profile → My apps. Help Scout's docs do not describe deleting an app or resetting its secret, and we have not tried it on a real account. If you find no way to do it there, remove or deactivate the user who made the app: its credentials work only for an active, invited user. Or ask Help Scout's support to revoke it. An access token the script got lasts up to two days.
- Revoke our key on the API keys page.
The four customer properties and their values stay. To remove them, open Settings → Properties, choose Contact, select the property and click Delete. Help Scout deletes it at once, with its values, and cannot restore it.