getaero-io/gtm-eng-skills / skills/deepline-ads-audiences
deepline-ads-audiences
VerifiedUse this skill when building, enriching, auditing, or uploading B2B paid ads audiences to Google Customer Match, Meta/Facebook Custom Audiences, or LinkedIn Matched 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', 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.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 37.6 KB |
| plays/audit-no-double-hash.play.ts | script | 3.1 KB |
| plays/build-contactout-hash-pool.play.ts | script | 9.7 KB |
| plays/build-hash-only-audience.play.ts | script | 7.0 KB |
| plays/enrich-audience-waterfall.play.ts | script | 16.7 KB |
| plays/evaluate-leadmagic-personal-email.play.ts | script | 3.7 KB |
| plays/evaluate-personal-email-provider.play.ts | script | 13.8 KB |
| plays/report-google-coverage-lift.play.ts | script | 8.6 KB |
| plays/shared/audience-hash.ts | script | 10.8 KB |
| plays/upload-facebook-google-hash-only-audience.play.ts | script | 5.4 KB |
| plays/upload-google-hash-only-audience.play.ts | script | 3.3 KB |
| recipes/enrich-and-upload-facebook-google.md | markdown | 6.9 KB |
| recipes/max-coverage-audience.md | markdown | 11.3 KB |
| recipes/sample-abm-segment-example.md | markdown | 4.9 KB |
| shared/audience-basics.md | markdown | 4.5 KB |
| shared/contactout-hash-pool.md | markdown | 7.9 KB |
| shared/meta-connection.md | markdown | 3.7 KB |
| shared/upload-failure-modes.md | markdown | 9.3 KB |
| skill-metadata.json | config | 3.3 KB |
plays/upload-google-hash-only-audience.play.ts
View on GitHubimport deepline from 'deepline';
import { prepareHashOnlyUploadRows } from './shared/audience-hash';
type HashOnlyRow = {
email_sha256?: string;
email?: string;
};
export const config = {
compatibility: { authoringContract: 'explicit-freshness' },
name: 'ads-audience-upload-google-hash-only',
description:
'Create a Google Customer Match audience, upload hash-only rows, and read the resulting status back.',
};
export default async function (input: {
file: string;
account_id: string;
audience_name: string;
login_account_id?: string;
description?: string;
validate_only?: boolean;
}) {
const sourceDataset = await deepline.csv<HashOnlyRow>(input.file);
const sourceRows = (await sourceDataset.materialize()) as HashOnlyRow[];
const { rows, audit } = prepareHashOnlyUploadRows(sourceRows);
if (
rows.length === 0 ||
audit.malformedHashes > 0 ||
audit.duplicateHashes > 0 ||
audit.rawEmailFieldsPresent
) {
throw new Error(
JSON.stringify({
message: 'Hash-only audience payload did not pass validation.',
audit,
}),
);
}
const createResult = await deepline.tools.execute({
staleAfterSeconds: 0,
id: 'create_google_audience',
tool: 'google_ads_audiences_create_audience',
input: {
account_id: input.account_id,
// Only send login_account_id when the caller supplied one; the tool
// rejects an explicit undefined, and it is only needed for MCC access.
...(input.login_account_id
? { login_account_id: input.login_account_id }
: {}),
name: input.audience_name,
membership_life_span_days: 540,
membership_status: 'OPEN',
upload_key_types: ['CONTACT_ID'],
validate_only: input.validate_only === true,
},
description: 'Create a Google Customer Match audience.',
});
const audienceId = String(
(createResult as { data?: { audience?: { id?: unknown } } }).data?.audience
?.id ?? '',
);
if (!audienceId) {
throw new Error('Google audience create did not return an audience id.');
}
const syncResult = await deepline.tools.execute({
staleAfterSeconds: 0,
id: 'sync_google_audience_members',
tool: 'google_ads_audiences_sync_audience_members',
input: {
account_id: input.account_id,
...(input.login_account_id
? { login_account_id: input.login_account_id }
: {}),
audience_id: audienceId,
mode: 'append',
rows,
consent: {
ad_user_data: 'GRANTED',
ad_personalization: 'GRANTED',
},
encoding: 'HEX',
validate_only: input.validate_only === true,
terms_of_service_accepted: true,
},
description: 'Upload hash-only audience members to Google.',
});
const statusResult = await deepline.tools.execute({
staleAfterSeconds: 0,
id: 'get_google_audience_status',
tool: 'google_ads_audiences_get_audience_status',
input: {
account_id: input.account_id,
...(input.login_account_id
? { login_account_id: input.login_account_id }
: {}),
audience_id: audienceId,
},
description: 'Read back Google audience status after upload.',
});
return {
audience_id: audienceId,
uploaded_rows: rows.length,
audit,
create_result: createResult,
sync_result: syncResult,
status_result: statusResult,
};
}
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |