Data and spreadsheets
BigQuery integration
Two BigQuery remote functions return the status of each address, or its reason, action and suggested correction as JSON, from a plain query. Behind them is a small Cloud Run function in your own Google Cloud project, with the key in Secret Manager.
Read the full setup guideGet an API key
- Setup guide
- One zip: the Cloud Run function and the SQL
SELECT email, `PROJECT_ID.DATASET_ID.validate_email`(email) AS status
FROM `PROJECT_ID.DATASET_ID.customers`;At a glance.
- Status
- Setup guide. Not listed on a marketplace yet: you set it up yourself in a few steps, below and in the full guide.
- For
- Data teams who keep customer or lead addresses in BigQuery and want each one’s status in a table they can join, filter and send on.
- You need
- A Google Cloud project with BigQuery, Cloud Run and Secret Manager, the
gcloudandbqtools, and an API key made for it, with a daily credit cap, used only for this function. - Costs
- 1 credit = 1 validated address, as with any API request. Free: unknown results, API errors, malformed addresses and test addresses on sandbox.email-validation.org.
- Full guide
- Read the full setup guide
Typical uses.
Clean a customer table
Check each distinct address once (BigQuery may resend a batch, so usually once) into a results table, then join to it from every query, view or dashboard that needs the status.
Check new addresses on a schedule
Run the check-once script as a scheduled query: it picks only addresses with no status yet, so each run spends credits on new rows only (usually once each).
Filter what you send on
Keep addresses that cannot receive mail and throwaway inboxes out of the audiences you export to other tools.
Set it up. 4 steps.
The short version of the full setup guide, which stays the reference when a step does not match what you see.
Download the zip and make a key
Download the zip from the guide, create an API key with only Validate addresses and a daily credit cap, and put it in Secret Manager.
Deploy the function
Run
gcloud run deploywith--source=functionand authentication required, so only callers you allow can reach it.Connect BigQuery
Create a BigQuery connection and give only its service account the Cloud Run Invoker role on the function.
Create the functions and check once
Run
sql/create_functions.sql, whose last statement checks free test addresses, thensql/check_new_addresses.sqlto fill the results table.
Good to know.
It has not run in a real Google Cloud project yet: it was built from Google’s documentation and tested against stand-ins.
Every non-NULL row a query passes to the functions is checked each time the query runs; the same address twice in one batch is checked once. BigQuery never caches a remote function’s results, so a view or a dashboard tile that calls them checks again on every read.
A row that could not be checked gets NULL and an error code in the details, never an invented status. A refused key fails the query with a message that never contains the key.
The function logs counts, statuses and error codes only: never an address, the key or the BigQuery user who ran the query.
Set
EV_REGION=euon the function for our EU host: the same key works on both.
Connect BigQuery.
Test it on our sandbox addresses for free, then on your own contacts.
Updated · Maintained by: Email Validation LLC