Hashed email audience for Meta and Google Ads
Turn the user's own customer list into a SHA-256 hashed audience file for Meta or Google Ads. Verify the emails first so dead addresses do not drag down the match rate, then hash them on the user's machine with npx ravn audience. Nothing is uploaded by Ravn; the user uploads the finished file to the ad platform themselves.
One command.
Installs into ~/.claude/skills for Claude Code. In Claude, upload the downloaded file under Settings → Capabilities → Skills.
npx ravn skill install hashed-email-audience
When to use
- The user wants a customer match or custom audience from their own customer, subscriber or lead list.
- They need the file in the exact hashed format each platform expects.
- Not for buying audiences. Ravn does not supply ad audiences or mobile ad IDs; this only prepares a list the user already has.
Before you start
- Check the connection:
npx ravn whoami(free). Hashing itself needs no lookups. - Costs: the optional verification step is 1 lookup per unique address.
- Confirm the user has the right to use this list for advertising (for example, it is their own customers and their privacy notice covers it).
- Ask which platform:
metaorgoogle. Make one file per platform.
Steps
- Remove anyone who opted out of marketing or asked to be deleted. Do this before anything else.
- Verify the list so only real addresses are hashed. Dry run, sample, full:
npx ravn enrich customers.csv --tool validate_email --column Email --dry-run npx ravn enrich customers.csv --tool validate_email --column Email --limit 10 --out sample.csv npx ravn enrich customers.csv --tool validate_email --column Email --out verified.csv
- Keep rows where
rw_verdictisvalid. Also keepriskyrows that are only catch-all (rw_catch_alltrue and notrw_disposable); a catch-all mailbox may still belong to a real customer and the ad platform simply will not match it if not. Dropinvalid, disposable andunknownrows. Save asaudience-input.csvwith theEmailcolumn intact. - Build the hashed file for Meta:
npx ravn audience audience-input.csv --column Email --format meta
The output has one column with the header email. Each value is the SHA-256 hex hash of the address after trimming spaces and lowercasing. 5. Or build it for Google:
npx ravn audience audience-input.csv --column Email --format google
The output has the header Email. Each address is trimmed and lowercased, and for gmail.com and googlemail.com the dots before the @ are also removed, then it is SHA-256 hashed. 6. Check the result: the row count should match the kept rows (minus any duplicates), and every value should be a 64-character hex string. Read the command's output for the path of the file it wrote. 7. Tell the user to upload the file in the ad platform's audience or customer list screen, and to delete local copies they no longer need.
Output
verified.csv: the original columns plusrw_status(ok,not_found,error,dropped),rw_verdict,rw_risk_score,rw_reason,rw_catch_all,rw_disposable.- The hashed audience file: Meta with a single
emailcolumn, or Google with a singleEmailcolumn, one SHA-256 hex hash per row. No plain-text addresses. - A summary: rows in, opted out removed, dropped by verification, hashed rows out.
Rules
- Only hash lists the user has the right to use for advertising. Never build audiences of people who opted out. See /privacy#optout.
- Hashing runs locally. Do not paste the plain-text list or the hashes into chat or any other service.
- Hashing is not anonymisation. Treat the hashed file as personal data.
- No FCRA uses: never target or exclude people for credit, employment, insurance or housing decisions.
- On a 429
fair_use_exhaustedduring verification, stop and tell the human.
Example prompt
Make me a Meta custom audience file from our customer list (customers.csv, column "Email"). Clean out the dead addresses first. I'll upload it myself.
More skills
Install them all with npx ravn skill install --all.