Skip to content
Back to skills

Deepline Ads Audiences

ASecurity

Use this skill when building, enriching, auditing, or uploading B2B paid ads audiences to Google Customer Match, Meta/Facebook Custom Audiences, LinkedIn Matched Audiences, Reddit Ads customer lists, or X (Twitter) Ads custom audiences. Triggers on phrases like '/deepline-ads-audience', '/deepline-ads-audiences', 'upload this audience', 'create custom audiences', 'personal email hashes', 'increase Facebook match rate', 'Google ads audience', 'Meta audience', 'FB audience', 'Reddit audience', ...

  • 90 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added August 31, 2026
ai-agentsrustgoshellbashgitapi

Works with

  • cli
  • api

Security analysis

A96/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro scans all 18 files and shows the line behind each finding

Scanned December 2, 2026

npx -y skills add getaero-io/gtm-eng-skills --skill deepline-ads-audiences --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Deepline Ads Audiences?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Deepline Ads Audiences
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/getaero-io-deepline-ads-audiences/badge)](https://www.skillsdirectory.com/skills/getaero-io-deepline-ads-audiences)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: deepline-ads-audiences
description: "Use this skill when building, enriching, auditing, or uploading B2B paid ads audiences to Google Customer Match, Meta/Facebook Custom Audiences, LinkedIn Matched Audiences, Reddit Ads customer lists, or X (Twitter) Ads custom audiences. Triggers on phrases like '/deepline-ads-audience', '/deepline-ads-audiences', 'upload this audience', 'create custom audiences', 'personal email hashes', 'increase Facebook match rate', 'Google ads audience', 'Meta audience', 'FB audience', 'Reddit audience', 'X audience', 'Twitter audience', or any workflow that turns CRM/customer/contact data into paid ads upload lists. Skip for outbound prospecting sequences, cold email, or pure campaign copywriting."
---

# Deepline Ads Audiences

## Quick Start

```bash
npm install -g deepline
deepline -h
```

## CLI resolution

Run `deepline` when it is available. If the shell reports that command is missing, use `<workspace-root>/.deepline/runtime/bin/deepline` (or the npm-created `.cmd` shim on Windows). If neither exists, follow `https://code.deepline.com/INSTALL.md` to set up Deepline.

Build high-quality ABM paid ads audiences from first-party customer or prospect lists. This skill is for paid ads audience upload and evaluation, not outbound.

Names in this skill are starting hints. Run `deepline search "contact list -> ad platform custom audience"` and `deepline describe <tool_id>` before running, because tool names and input shapes can change. Tool search takes a task: one sentence stating the input you have -> the result you need, not keywords.

## Before You Start

Match the request to a row in the decision matrix and read the linked file before acting. This skill is not for cold outbound, sequencing, or copywriting: personal emails here are used to improve paid ads matching, not to contact people directly.

## Decision Matrix

| User says                                                                                                                                                   | Do this                                                                      | Read                                                      |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | --------------------------------------------------------- |
| "max coverage", "highest match rate", "maximum match rate", "keep increasing coverage", "get to 75% coverage", exhaust LinkedIn/personal-email/hash options | Run the explicit max-coverage ladder with budget gates.                      | `recipes/max-coverage-audience.md`                        |
| `/deepline-ads-audience`, "enrich and upload to FB/Google"                                                                                                  | Run the full paid ads audience recipe.                                       | `recipes/enrich-and-upload-facebook-google.md`            |
| "sample ABM segment", "do the example workflow"                                                                                                             | Follow the reusable high-priority ABM segment recipe.                        | `recipes/sample-abm-segment-example.md`                   |
| "LinkedIn URLs to an audience", "I have a list of LinkedIn profiles"                                                                                        | Run the maintained prebuilt; it runs the waterfall below and uploads.        | `deepline plays check prebuilt/linkedin-to-ads-audience`  |
| "use ContactOut hashes", "hashed identifiers", "LinkedIn URLs to hashes"                                                                                    | Layer 2 of the waterfall: batch the LimaData misses, forward `unmatched`.    | `shared/contactout-hash-pool.md`                          |
| "what is a hash", "why is my match rate low", first-time user                                                                                               | Explain the mechanic before quoting a plan.                                  | `shared/audience-basics.md`                               |
| encoded/internal-identifier LinkedIn URLs (`/in/ACwAA…`), "API rejected my LinkedIn URLs", "convert LinkedIn URLs"                                          | Normalize `person_linkedin_url` before upload: drop encoded, recover vanity. | Step 4 → "Normalize LinkedIn URLs" (this file)            |
| "Make sure hashes are not double hashed"                                                                                                                    | Run the no-double-hash audit play before upload.                             | `plays/audit-no-double-hash.play.ts`                      |
| "enrich this list", "buy personal emails/hashes", "run the ladder"                                                                                          | Run the waterfall. Each layer only sees rows still missing a hash.           | `plays/enrich-audience-waterfall.play.ts`                 |
| "Compare enriched versus unenriched"                                                                                                                        | Build both hash-only datasets and report lift.                               | `plays/enrich-audience-waterfall.play.ts`                 |
| "include phone numbers", "add phones"                                                                                                                       | Hash phones twice: `+digits` for Google, digits for Meta.                    | `shared/upload-failure-modes.md`                          |
| "what was the match rate", "did it match"                                                                                                                   | Read `contactIdInfo.matchRatePercentage`, not the range enum.                | `shared/upload-failure-modes.md`                          |
| "put it in a sheet", "customer will upload"                                                                                                                 | Publish the validated file to Sheets; verify by row count.                   | `shared/upload-failure-modes.md`                          |
| "connect Meta", "Meta not connected", "(#100)", "business_management"                                                                                       | Connect Meta with a system user token; Meta login is not offered.            | `shared/meta-connection.md`                               |
| "upload keeps failing", "422", "audience is locked"                                                                                                         | Meta locks on write. Send the audience in one call.                          | `shared/upload-failure-modes.md`                          |
| "Upload to Google"                                                                                                                                          | Validate hash-only rows, create Google audience, sync, readback.             | `plays/upload-google-hash-only-audience.play.ts`          |
| "Upload to Facebook and Google", "upload to FB/Google", "Meta + GAds"                                                                                       | Validate once, then upload to Google and Meta.                               | `plays/upload-facebook-google-hash-only-audience.play.ts` |

## Default Workflow

1. Confirm rights, use case, and geography.
2. Discover uploadable ad accounts.
3. Build baseline and enriched audience objects.
4. Validate identifiers and expected match-rate lift.
5. Create separate platform audiences.
6. Upload rows.
7. Check status and report IDs, uploaded counts, invalid rows, and current build state.

## Ask about suppression before targeting

Ask explicitly for the suppression list: the people who should never see the ad (current customers, closed-lost accounts, active opportunities, employees, recent converters). Users rarely volunteer it, and a list that was never built or silently failed to sync spends budget on people who already bought.

- When unsure whether someone belongs on it, include them. An extra suppressed person costs a few unserved impressions; a missing one costs real money and can annoy a customer.
- Enrich it with the same ladder. Suppression matches on the same identifiers as targeting, so a work-email-only suppression list suppresses almost nobody.

## Expect different lift per platform

Set this expectation before spending: Meta gains the most from personal-email enrichment, because people register there with personal addresses. Google gains less, since a Workspace address is already a Google account and often matches from the baseline. A modest Google result is the expected shape, not a failed run.

Reddit and X match on email only. Phone, name, address and LinkedIn fields are ignored and rows without an email come back as invalid, so personal-email hashes are the only lever there. Neither platform supports `mode: "replace"`: use `append` into a new audience, and `remove` to take people out.

## Explain the shape before you spend

Before running the ladder, state the mechanic in one or two sentences so the user can judge the plan rather than approve it blindly:

> Ad platforms can only match people on identifiers those people gave the platform. Your CRM holds work emails; almost nobody signs up to Meta with a work address. These layers buy the personal identifiers that do match, cheapest first.

Say what each layer costs in Deepline credits and what it is expected to add, then ask for approval before the first paid layer. Point first-time users, or anyone who asks, to `shared/audience-basics.md` for what a hash is and why it is safe to send.

## Coverage Modes

Choose the coverage mode before spending credits and record it in the run notes. Never silently downgrade a `max_coverage` request to `cost_effective`: if a provider or credential is unavailable, report the gap and continue with the next approved provider rather than stopping early.

| Mode             | Use when                                                                        | Waterfall                                                                                                                                                                         | Stop condition                                                                                                                                |
| ---------------- | ------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| `cost_effective` | User asks for the default, low-cost, or first-pass enrichment.                  | Work-email baseline → the identifier waterfall below (LimaData → ContactOut hashed identifiers → Aviato → ContactOut phones), each layer only on rows every earlier layer missed. | Stop after the waterfall, report contacts still missing an identifier, then ask before expanded fallback.                                     |
| `max_coverage`   | User asks for highest match rate, max coverage, or to keep increasing coverage. | Work-email baseline → phone hashes already present → LinkedIn repair → the identifier waterfall → raw personal-email waterfall → platform upload variants.                        | Stop when no approved provider remains, budget cap is hit, marginal lift is below threshold, or rights/geo constraints block more enrichment. |

## Shareable Plays

`plays/` holds copyable play templates. Use them when the user asks for a repeatable or shareable workflow, not just a one-off CLI run. Run a play file with `deepline run ./plays/<play>.play.ts --input '{...}'` from this skill's folder. If `deepline run --help` reports an unknown command, ask the user to update the Deepline CLI (https://code.deepline.com/INSTALL.md) before continuing.

| Play                                                      | Purpose                                                                                                                                                                               | Input                                                                                                                                                                     |
| --------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `plays/build-hash-only-audience.play.ts`                  | Build baseline and enriched hash-only datasets from source CSV rows. Raw emails are normalized and hashed once. Provider hashes pass through as lowercase hex.                        | `{ "file": "input.csv" }`                                                                                                                                                 |
| `plays/audit-no-double-hash.play.ts`                      | Verify the final upload payload is hash-only, deduped, populated, includes provider hashes as-is, and does not contain hash-of-hash mistakes.                                         | `{ "payloadFile": "upload.csv", "providerHashFile": "source.csv", "providerHashColumns": ["aviato_hash", "limadata_hash"] }`                                              |
| `plays/enrich-audience-waterfall.play.ts`                 | Run the identifier waterfall on a contact CSV and return per-row hashes, the email hash pool, and per-platform phone hash pools, with attempts and hits per layer.                    | `{ "file": "contacts.csv" }`                                                                                                                                              |
| `plays/build-contactout-hash-pool.play.ts`                | Batch LinkedIn URLs through ContactOut hashed identifiers into a deduped hash pool. Reports matched profiles, net-new hashes, and the `unmatched` profiles to send to the next layer. | `{ "file": "contacts.csv", "limit": 100 }`                                                                                                                                |
| `plays/upload-google-hash-only-audience.play.ts`          | Create a Google Customer Match list, upload hash-only rows, and read status back.                                                                                                     | `{ "file": "upload.csv", "account_id": "1234567890", "audience_name": "Segment enriched 2026-06-09" }`                                                                    |
| `plays/upload-facebook-google-hash-only-audience.play.ts` | Upload the same validated hash-only rows to Google and an existing Meta/Facebook Custom Audience.                                                                                     | `{ "file": "upload.csv", "google_account_id": "1234567890", "meta_ad_account_id": "act_123", "meta_audience_id": "456", "audience_name": "Segment enriched 2026-06-09" }` |
| `plays/report-google-coverage-lift.play.ts`               | After Google match rates populate, calculate coverage lift, estimated matched identifiers, spend efficiency, and a follow-up note.                                                    | Full shape in the example below.                                                                                                                                          |

Recommended sequence: build, audit, upload (Google, or Facebook and Google), then the coverage report. Before using an upload play, run account discovery from Step 2 and confirm the selected Google Ads account name and ID with the user. Run `check` before `run` for each play and pass the input from the table. The build play returns two datasets, `baseline_rows` and `enriched_rows`; its two `--csv-out` flags write each to its own CSV in the same run. The audit's `providerHashFile` is any CSV holding the provider hash columns, such as the build's source CSV.

```bash
deepline plays check ./plays/build-hash-only-audience.play.ts
deepline run ./plays/build-hash-only-audience.play.ts --input '{"file":"source.csv"}' --csv-out baseline_rows=baseline_hash_only.csv --csv-out enriched_rows=enriched_hash_only.csv

deepline plays check ./plays/audit-no-double-hash.play.ts
deepline run ./plays/audit-no-double-hash.play.ts --input '{"payloadFile":"enriched_hash_only.csv","providerHashFile":"source.csv","providerHashColumns":["aviato_hash","limadata_hash"]}'

deepline plays check ./plays/upload-google-hash-only-audience.play.ts
deepline run ./plays/upload-google-hash-only-audience.play.ts --input '{"file":"enriched_hash_only.csv","account_id":"1234567890","audience_name":"ABM enriched hash-only 2026-06-09"}'

deepline plays check ./plays/upload-facebook-google-hash-only-audience.play.ts
deepline run ./plays/upload-facebook-google-hash-only-audience.play.ts --input '{"file":"enriched_hash_only.csv","audience_name":"ABM enriched hash-only 2026-06-09","google_account_id":"1234567890","meta_ad_account_id":"act_123","meta_audience_id":"456"}'

deepline plays check ./plays/report-google-coverage-lift.play.ts
deepline run ./plays/report-google-coverage-lift.play.ts --input '{"account_name":"Customer Google Ads","account_id":"1234567890","segment_name":"High-priority target-account audience","source_rows":20000,"baseline":{"label":"L1 work hash-only","audience_id":"1111111111","match_rate_pct":23,"uploaded_rows":13935},"comparisons":[{"label":"L2 Lima+Aviato hash-only","audience_id":"2222222222","match_rate_pct":35,"uploaded_rows":18386,"deepline_spend_usd":51.47},{"label":"L3 all hashes only","audience_id":"3333333333","match_rate_pct":43,"uploaded_rows":24787},{"label":"L4 all hashes + details","audience_id":"4444444444","match_rate_pct":42,"uploaded_rows":24787},{"label":"L5 LeadMagic top100 fallback","audience_id":"5555555555","match_rate_pct":44,"uploaded_rows":17016},{"label":"L6 GTM LinkedIn + Lima/Aviato","audience_id":"6666666666","match_rate_pct":45,"uploaded_rows":17064}],"spend":{"low_cost_hash_usd":51.47,"contact_fallback_usd":218.37,"total_usd":269.84},"recommendation_label":"L6 GTM LinkedIn + Lima/Aviato"}'
```

## Step 1: Confirm Rights

Ask for explicit confirmation when the source data belongs to a customer org or third party. The minimum confirmation is:

- The source list can be used for paid ads audience creation.
- Any enrichment identifiers can be used for paid ads matching.
- The requested platforms are allowed for this use case.
- Geography is in scope. Default to US-only when personal identifiers are being enriched unless the user specifies otherwise and confirms compliance.

## Step 2: Discover Uploadable Accounts

Run account discovery before every live upload. Do not guess account IDs from prior context, app IDs, or UI labels: a wrong guess creates audiences in the wrong account or fails after enrichment spend has already happened.

1. Search for live account tools:

```bash
deepline search "connected ad platform logins -> ad account IDs"
deepline tools grep audience
```

2. If a platform exposes a direct account discovery tool or endpoint, use it first. Record account name, account ID, platform, permission status, and whether customer list upload is supported.

   Meta uses the new token-based connection: the customer's long-lived system-user access token is stored in Dashboard → Integrations → Meta Audiences and is used server-side for discovery and writes. Call `meta_audiences_list_ad_accounts` to discover live accounts through that saved token and confirm the account by `name`. Use a row with `enabled: true`; `is_default: true` marks the workspace default, and `custom_audience_terms_accepted: false` means creation will fail until someone accepts Meta's terms. Then either pass that row's `id` as `ad_account_id`, or omit `ad_account_id` to use the workspace default and read the account the call used back from `data.ad_account_id` in the create, list, status, or sync response. Never put the Meta token in CLI input or chat, and never grep old runs, CSVs, or notes for Meta account IDs: they can belong to customers.

```bash
deepline run meta_audiences_list_ad_accounts --input '{}'
```

3. If no direct discovery tool is exposed, ask the user for the account ID and name, then validate it before upload:

```bash
deepline run google_ads_audiences_list_audiences --input '{"account_id":"1234567890","page_size":10}'
deepline run meta_audiences_list_audiences --input '{"ad_account_id":"1234567890"}'
deepline run linkedin_ads_audiences_list_audiences --input '{"account_id":"urn:li:sponsoredAccount:123456789"}'
deepline run reddit_ads_audiences_list_audiences --input '{"account_id":"a2_abc123"}'
deepline run x_ads_audiences_list_audiences --input '{"account_id":"18ce54d4x5t"}'
```

4. Show the discovered choices back to the user as `Account Name (Account ID)`, grouped by platform. If there is more than one plausible account, ask which one to use before creating audiences.

5. Keep the selected account IDs in the run notes and final answer. A Meta app ID is not an ad account ID; never substitute one for the other. Meta upload IDs look like `act_123...` or a numeric ad account ID that Deepline can prefix.

## Step 3: Build Baseline and Enriched Objects

Create two separate objects when evaluating lift:

- `unenriched`: first-party source identifiers only, usually work email plus name, company, country, postal code, and LinkedIn URL context.
- `enriched`: source identifiers plus paid-ads-safe enrichment from the identifier waterfall below.

Run this as a waterfall, not a fan-out: every layer runs only on rows every earlier layer missed. A fan-out pays several providers for one identifier and still reads as healthy, because every call returns 200. `plays/enrich-audience-waterfall.play.ts` enforces the skipping and reports attempted and hits per layer. For a plain list of LinkedIn URLs, prefer the maintained prebuilt `prebuilt/linkedin-to-ads-audience`, which runs the same order and uploads; use the skill play when rows need custom handling.

Identifier waterfall for a row with a LinkedIn URL, cheapest per covered person first:

1. LimaData `limadata_find_audience_identifiers` (`{ linkedin_url }`), per row, hashed personal emails. Extract only 64-character SHA-256 hashes from `hashed_emails[].normalized_hash`.
2. ContactOut `contactout_get_hashed_email_identifiers`, batches of 5 to 100 over the LimaData misses. Billed per matched profile, free on a miss. The hashes come back as an unattributed pool that is uploaded alongside the rows, but the `unmatched` list names exactly which profiles missed, so only those go on.
3. Aviato `aviato_pull_email_hash` (`{ linkedinURL }`), per row, hashes in `hashedEmails[]`. Billed per request, hit or miss, at a low rate.
4. ContactOut `contactout_linkedin_contact_info` with `{ profile, email_type: 'none', include_phone: true }`, per row, phones only. Personal emails from this endpoint are not net-new: they are the addresses layer 2 already returned as hashes. Billed only when a phone comes back. Hash each phone twice: Google `sha256('+' + digits)`, Meta `sha256(digits)`, digits including the country code. LinkedIn audiences match emails only, so a phone-only row reaches Google and Meta but not LinkedIn.

Measured on a 100-profile customer sample: LimaData covered 67, ContactOut hashes 12 more, and Aviato plus ContactOut phones brought it to 95, at about 36 Deepline credits per 100 profiles. Quote current prices from `deepline describe <tool_id>`, not these figures.

LimaData's batch endpoint `limadata_batch_ad_audiences` found 65 of the same 100, slightly fewer than per-row, and returns richer rows: phone, name and geo hashes beside the email hashes (42 of its 65 matches carried a phone hash). It adds identifiers per matched person, not more people. Offer it when a customer wants more identifiers per person; it is not the default.

A row with only a work email gets the layers that accept an email (LimaData with `work_email`, Aviato with `email`). The ContactOut layers need a LinkedIn URL.

### ContactOut hashed identifiers (quick reference)

- Bill and report from `matches_found`, never the hash-list length; one matched profile can return several hashes.
- A zero-match batch returns HTTP 404 `No hashed emails found`, which is a normal empty result and is not billed: every profile in it missed.
- ContactOut can reject a whole batch over one URL it dislikes. Treat that provider-side failure as every profile in the batch missed and forward them; a Deepline-side failure (credits, auth) should stop the run.
- A partial `matches_found` with no `unmatched` list cannot say who missed. Forward none of that batch and count it as missing.
- Merge the hashes into the audience-level hash pool, not per-row `email_sha256` cells.
- Read `shared/contactout-hash-pool.md` before planning or running a pass.

### A work email is not a personal hash

Scope the waterfall on whether a row has a usable personal identifier, not on whether it has any email. A work email is the L0 baseline, so a work-email-only contact must run through every layer. A corporate address in a `personal_email` column is still a work email: check the domain, not the column name, or that contact is wrongly exempted from enrichment.

### Order the ladder by cost per covered person

Price per call is the wrong comparison, because providers bill differently on a miss:

- Per call, hit or miss (LimaData, Aviato): every attempted row costs the same.
- Per result or match (ContactOut, LeadMagic): misses are free.

Compare price divided by hit rate on the rows that reach the layer. That is why LimaData goes first (cheap and covers most of a list), ContactOut hashes second (free on a miss, and the batch tells you who missed), Aviato third (cheap per request), and ContactOut phones last (dearer per hit, so it only sees the thin remainder).

Stop after the waterfall by default. Report attempted rows, row hits, unique hashes added, contacts still missing an identifier, and Deepline spend. Then ask whether the user wants to spend more on broader raw personal-email providers, quoting the current per-contact cost from `deepline describe <tool_id>` rather than a remembered figure.

Only run the expanded coverage pass after explicit approval. In that pass, try providers such as LeadMagic, Wiza, Datagma, Crustdata, Prospeo, FullEnrich, PDL, or Deepline native personal-email waterfalls on rows still missing an identifier. Normalize and SHA-256 hash raw personal emails exactly once, record provider-level lift and Deepline spend, and keep the default upload payload hash-only.

For native waterfall outputs, include only provider-specific fields that are confirmed personal-email responses, such as `first_personal_email`, `personal_email`, `personal_emails[]`, or Wiza email values where `email_type` is personal. Do not include an untyped final scalar just because it contains an email address; it can be a work email.

For `max_coverage`, the user has approved the goal but not unlimited spend. Ask for or infer a budget cap before any paid fallback past the hash layer, then run the expanded pass until the cap or marginal-lift stop condition is reached.

The ContactOut phone layer is the one phone purchase in the default waterfall: it runs only on rows every email layer missed and bills only on a hit. Buying phones for rows that already have an email, or from dearer phone providers, stays opt-in. Those cost considerably more per contact than hashed emails and can consume most of a test budget, so add them only when the user asks, as a second identifier alongside email.

Keep row lineage in both objects, so lift can be evaluated without losing the source list: `external_id`, `source_row_number`, `person_linkedin_url`, `company_name`, `company_domain`, `provider_used`, `identifier_type`.

### LinkedIn URL Backfill for Audience Enrichment

When LinkedIn URLs are needed before personal-email/hash enrichment, use a query ladder instead of one exact-company query. Discover an available people-search or public-search API and inspect its contract.

Normalize noisy company names before searching, for example `RTX Corporation` → `RTX`, `L3Harris (formerly Aerojet Rocketdyne)` → `L3Harris`, `Airbus EMEA` → `Airbus`, and `NASA - National Aeronautics and Space Administration` → `NASA` plus a secondary long-form alias.

The first Serper query should use those cleaned account/LinkedIn company aliases. Use the two follow-up queries only after the first pass misses:

```text
"{{full_name}}" ("{{account_name}}" OR "{{linkedin_company_name}}") site:linkedin.com/in -inurl:dir -inurl:pub
"{{full_name}}" "{{title}}" "{{linkedin_company_name}}" site:linkedin.com/in -inurl:dir -inurl:pub
"{{full_name}}" "{{account_name}}" site:linkedin.com/in -inurl:dir -inurl:pub
```

Do not make quoted domain (`"{{domain}}"`) the first query. It helps occasional rows but lowers recall and causes more provider failures.

Validate candidates before using them:

1. Keep only `linkedin.com/in/` URLs and strip query params/trailing slashes.
2. Compare the supplied and profile names. For non-exact names, use Jev through `ai_evaluate` to judge nickname, spelling and credential variants; retain the probability and require independent employer or other identity corroboration. A shared initial or a name substring alone does not validate identity.
3. Use company/title evidence as supporting evidence, not as identity proof.
4. For ambiguous candidates, validate first name, last name, current company, and headline against an authorized source or user-provided export before merging. If the evidence is insufficient, leave the identity unresolved.

## Step 4: Validate Identifiers

Before upload, remove empty strings and malformed hashes from the payload. Deepline platform validators reject empty `email` fields and non-64-character `email_sha256` values.

Valid upload row fields: `email`, `email_sha256`, `phone`, `phone_sha256`, `first_name`, `last_name`, `country_code`, `postal_code`, `company_name`, `title`, `company_domain`, `person_linkedin_url`, `external_id`.

Prefer `email_sha256` when a provider returns a paid-ads-ready hash. Provider hashes must pass through exactly as lowercase 64-character hex. Do not double-hash provider hashes. When a provider returns raw personal email: trim whitespace, lowercase it, validate it with a normal email pattern, hash it with SHA-256 exactly once per form (`emailHashes()` adds the Google canonical Gmail form), and upload only `email_sha256` unless the user explicitly asked to upload raw email fields.

### Standard upload file shape

Use one shape for every run, so the audit, the Sheets export and both platform uploads read the same file:

```
email,phone_google,phone_meta
```

- `email` holds 64-character lowercase SHA-256 digests, or nothing. A raw Gmail address produces two digests: Google matches the canonical form (dots and `+tag` removed from the local part), Meta matches the literal form. `emailHashes()` in `plays/shared/audience-hash.ts` returns both; never hash a Gmail address once and send it to both platforms.
- `phone_google` is SHA-256 of `+<digits>` (E.164 with the plus) and `phone_meta` is SHA-256 of `<digits>`. The platforms hash different strings for the same number, so one phone digest cannot serve both. `phoneHashes()` returns the pair.
- Every row carries at least one populated identifier. Drop rows with none. Blank cells are deliberate: a ContactOut-pool row has no phone, a phone-only row has no email.
- No name, country or zip columns unless all four are known for the row. Google uses names only when first name, last name, country and zip are all present; a pre-hashed file must then hash the names too (lowercase, trimmed) and leave country and zip plain. A plain-text name beside a hashed email is rejected by the Google uploader ("content doesn't match the column header"), and a repair step that re-hashes the file risks hashing the email column twice, which uploads cleanly and matches nothing.
- Keep a parallel `..._lineage.csv` with a `source` column naming the layer that produced each hash.

Before uploading, run `plays/audit-no-double-hash.play.ts`. It asserts that each column holds one identifier type, that no identifier column holds plain text, that any address block is complete, and that no value is the SHA-256 of another value in the file. Each of those failures uploads cleanly and matches nothing. → Read `shared/upload-failure-modes.md`.

### Normalize LinkedIn URLs (drop encoded internal-identifier URLs)

The Ad Audiences APIs (batch and live) accept only **vanity** LinkedIn URLs, `linkedin.com/in/<username>`. **Encoded internal-identifier** URLs, where the slug is an opaque member-identity token such as `https://www.linkedin.com/in/ACwAAA3jFR0B90FE7rqSIhnof5R9h57ZrfgYR7w`, come from Sales Navigator exports and some enrichment providers. The endpoint tolerates them today but **will return `400` for that input soon**, so treat an encoded URL as invalid `person_linkedin_url` before upload.

Handle every `person_linkedin_url` cell:

1. **Detect encoded**: the slug after `/in/` starts with `ACwAA` / `ACoAA`, or is a long single-token Base64URL-ish string (~30+ chars of `[A-Za-z0-9_-]` with no hyphenated name and no digits-as-suffix).
2. **Do not upload it as-is.** Drop the encoded value from `person_linkedin_url` for that row so the platform validator does not reject the whole payload.
3. **Recover the vanity URL when the row still needs LinkedIn coverage**: run the LinkedIn URL Backfill ladder from Step 3 (native `person-to-linkedin`, then the Serper name + company query) to resolve the real `linkedin.com/in/<username>`.
4. **Keep vanity URLs**: strip query params and trailing slashes, lowercase the host, and upload.

Before live upload, write a small audit with:

- source row count
- valid baseline work-email count
- per provider: row hits, hashes seen, unique hashes added
- invalid hash rows
- whether any raw `email` field remains in the upload payload
- LinkedIn URLs: encoded (dropped), recovered to vanity, already valid

## Step 5: Create and Upload

Create one audience per platform per object, named so the account UI makes the test clear: `<customer or segment> enriched <date>` and `<customer or segment> unenriched <date>`. Then upload each object separately. Current starting hints:

```bash
deepline run google_ads_audiences_create_audience --input '{"account_id":"1234567890","name":"Example enriched hash-only","membership_life_span_days":540,"upload_key_types":["CONTACT_ID"]}'
deepline run google_ads_audiences_sync_audience_members --input '{"account_id":"1234567890","audience_id":"1111111111","mode":"append","terms_of_service_accepted":true,"consent":{"ad_user_data":"GRANTED","ad_personalization":"GRANTED"},"rows":[{"email_sha256":"973dfe463ec85785f5f95af5ba3906eedb2d931c24e69824a89ea65dba4e813b"}]}'

deepline run meta_audiences_create_audience --input '{"ad_account_id":"1234567890","name":"Example enriched hash-only","customer_file_source":"BOTH_USER_AND_PARTNER_PROVIDED"}'
deepline run meta_audiences_sync_audience_members --input '{"ad_account_id":"1234567890","audience_id":"1111111111","mode":"replace","rows":[{"email_sha256":"973dfe463ec85785f5f95af5ba3906eedb2d931c24e69824a89ea65dba4e813b"}]}'

deepline run linkedin_ads_audiences_create_audience --input '{"account_id":"urn:li:sponsoredAccount:123456789","name":"Example enriched hash-only","audience_kind":"contacts"}'
deepline run linkedin_ads_audiences_sync_audience_members --input '{"account_id":"urn:li:sponsoredAccount:123456789","audience_id":"1111111111","mode":"replace","rows":[{"email_sha256":"973dfe463ec85785f5f95af5ba3906eedb2d931c24e69824a89ea65dba4e813b"}]}'

deepline run reddit_ads_audiences_create_audience --input '{"account_id":"a2_abc123","name":"Example enriched hash-only"}'
deepline run reddit_ads_audiences_sync_audience_members --input '{"account_id":"a2_abc123","audience_id":"1111111111","mode":"append","rows":[{"email_sha256":"973dfe463ec85785f5f95af5ba3906eedb2d931c24e69824a89ea65dba4e813b"}]}'

deepline run x_ads_audiences_create_audience --input '{"account_id":"18ce54d4x5t","name":"Example enriched hash-only"}'
deepline run x_ads_audiences_sync_audience_members --input '{"account_id":"18ce54d4x5t","audience_id":"1nmth","mode":"append","rows":[{"email_sha256":"973dfe463ec85785f5f95af5ba3906eedb2d931c24e69824a89ea65dba4e813b"}]}'
```

Use `append` for Google when uploading into a newly created empty audience if `replace` returns provider-side Data Manager payload errors. Report that clearly because it indicates connector behavior that should be fixed.

### Upload the whole audience in one call

Meta locks an audience on write and rejects later writes with HTTP 422 until ingestion finishes, so a batched loop leaves the audience holding part of the list. Send every row in one `sync_audience_members` call. To upload a validated CSV, run the upload play: it maps the file and sends every row in one call. To call `meta_audiences_sync_audience_members` directly, write one JSON object with `ad_account_id`, `audience_id`, `mode` and `rows` to `sync.json`, each row holding only the valid fields from Step 4, and run `deepline run meta_audiences_sync_audience_members --input-file sync.json`. A real audience inline exceeds the shell argument limit.

Omit blank string fields rather than sending `""`; the schema declares `minLength: 1` and an empty value fails the whole batch. → Read `shared/upload-failure-modes.md`.

## Step 6: Verify and Report

Read Google's match rate from `data.audience.match_rate_percentage` in the status response, which Deepline copies from Google's `contactIdInfo.matchRatePercentage`. The `match_rate_range` enum beside it often stays unset, so reading the enum alone reports `null` for an audience with a real rate. Never render `null` as 0%. Meta exposes no per-audience match rate. Reddit reports a matched-size range (`size_range_lower`, `size_range_upper`) and becomes targetable at 1,000; X reports `audience_size` and `targetable`, which turns true at 100 matched users. Both match for hours (Reddit up to about 36, X up to about 48), so an early `PENDING`, `PROCESSING`, or Reddit's `NOT_ENOUGH_MATCHES_ERROR` with a 0-0 size is not a failure. Read `match_state` on Reddit and X instead of interpreting raw statuses: `matching` means check again in a few hours, `ready` means targetable, `unknown` means read `match_state_detail`, and `too_small` means the size the platform last published is under its floor. On X that published size can lag an update by up to about 48 hours, so after an upload in that window treat `too_small` as "not yet over the floor" and check again before adding people. After an upload, report the state the readback actually returned, and say whether the audience is new or an existing one you updated. When it is `matching`, or a recent upload's `too_small`, give the time to check back and stop: do not poll every few minutes or re-send the list. If a response has no `match_state` (an older server), report the raw `status`, size range or `audience_size`, and `targetable` it returned instead.

`uploaded_count` and `invalid_count` describe whether rows parsed, not whether people matched. Report acceptance and match rate separately. → Read `shared/upload-failure-modes.md`.

Run status checks after upload:

```bash
deepline run google_ads_audiences_get_audience_status --input '{"account_id":"1234567890","audience_id":"1111111111"}' --fields data.audience.match_rate_percentage,data.audience.match_rate_range,data.audience.membership_status
deepline run meta_audiences_get_audience_status --input '{"ad_account_id":"1234567890","audience_id":"1111111111"}'
deepline run linkedin_ads_audiences_get_audience_status --input '{"account_id":"urn:li:sponsoredAccount:123456789","audience_id":"1111111111"}'
deepline run reddit_ads_audiences_get_audience_status --input '{"audience_id":"1111111111"}'
deepline run x_ads_audiences_get_audience_status --input '{"account_id":"18ce54d4x5t","audience_id":"1nmth"}'
```

Final answer format:

- Platform and account name plus ID.
- Audience name and audience ID.
- Object type: enriched or unenriched.
- Uploaded count and invalid count.
- Request IDs or session IDs.
- Current status. Note that match size and match-rate ranges may stay null while platforms process the audience. For Meta, `approximate_count_is_minimum_bucket: true` means Meta is showing its 1,000-person floor: report "under about 1,000, not yet measurable", not 1,000 matched people.

If upload fails, report the provider error category and request ID. Do not say the audience worked unless create, sync, and readback status all succeeded.

### Google Coverage Follow-Up Reporting

After Google match rates populate, run `plays/report-google-coverage-lift.play.ts` from the same match-rate readback that listed the Google account name and ID, rather than calculating by hand. It calculates percentage-point and relative lift versus baseline, estimated and incremental matched identifiers, Deepline spend and blended cost per incremental matched identifier when spend is provided, and a ready-to-send follow-up note.

Use anonymized or customer-approved values in customer-facing follow-up notes. Keep account IDs, audience IDs, match rates, spend, and provider-layer labels tied to the current run artifact rather than copying old example values. Do not expose provider-side unit costs in customer-facing messages. Report Deepline spend only.

## Reading guide

| If you're about to…                                                 | Read                                           |
| ------------------------------------------------------------------- | ---------------------------------------------- |
| Explain hashing, match rate, or platform rules to a first-time user | `shared/audience-basics.md`                    |
| Plan or run a ContactOut hashed-identifier pass                     | `shared/contactout-hash-pool.md`               |
| Enrich and upload to Meta and Google end to end                     | `recipes/enrich-and-upload-facebook-google.md` |
| Push a list as far as the budget allows                             | `recipes/max-coverage-audience.md`             |
| Follow the worked ABM example                                       | `recipes/sample-abm-segment-example.md`        |

Files in this skill

  • SKILL.md37.7 KB
  • plays/audit-no-double-hash.play.ts2.8 KB
  • plays/build-contactout-hash-pool.play.ts9.7 KB
  • plays/build-hash-only-audience.play.ts5.6 KB
  • plays/enrich-audience-waterfall.play.ts16.5 KB
  • plays/evaluate-leadmagic-personal-email.play.ts3.4 KB
  • plays/evaluate-personal-email-provider.play.ts13.5 KB
  • plays/report-google-coverage-lift.play.ts8.7 KB
  • plays/shared/audience-hash.ts5.2 KB
  • plays/upload-facebook-google-hash-only-audience.play.ts5.4 KB
  • plays/upload-google-hash-only-audience.play.ts3.4 KB
  • recipes/enrich-and-upload-facebook-google.md7 KB
  • recipes/max-coverage-audience.md11 KB
  • recipes/sample-abm-segment-example.md5 KB
  • shared/audience-basics.md4.5 KB
  • shared/contactout-hash-pool.md6.5 KB
  • shared/upload-failure-modes.md6.7 KB
  • skill-metadata.json3.3 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.