gads_create_combined_audience
Google Ads write medium risk
Part of the Google Ads Audience Agent.
What it does
Create a combined audience (AudienceService) that unions/intersects existing user lists with optional exclusions. include_user_list_ids become inclusion AudienceSegments; exclude_user_list_ids become an AudienceExclusionDimension. WRITE with preview->approve->commit: preview runs mutate validate_only=true (validates list references and segment shape, no creation), returns a diff (name, # included lists, # excluded lists) + preview_id; commit — the same call plus that preview_id, made after the user approves in a later message — runs it for real and writes an audit entry. Returns {audience_id, resource_name, include_lists, exclude_lists}. No metrics produced here. Note: a combined Audience resource is distinct from a CustomAudience and from a UserList; it references existing lists by resource_name. PREVIEW SEMANTICS: the first call (no preview_id) is sent to the Google Ads API in validation mode — field, enum, policy and permission errors surface AT PREVIEW, nothing is changed, and the response returns a preview_id. To apply, show the preview to the user, get their approval, and re-call with that preview_id and IDENTICAL arguments within 30 minutes; changed arguments or an expired token fail closed to a fresh preview.
When to use it
Use to assemble a single targetable audience from multiple existing lists (e.g., all-purchasers minus recent-converters). Preview validate_only first, confirm the include/exclude list names with the user, then commit.
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
customer_id | string | yes | 10-digit CID; strip dashes. Tenant-scoped server-side. |
name | string | yes | Combined audience name; unique in account. |
include_user_list_ids | array | no | User list IDs to include (numeric strings). Converted to customers/{cid}/userLists/{id}. At least one of include/exclude must be non-empty (an inclusion is required to serve). |
exclude_user_list_ids | array | no | User list IDs whose members are excluded. |
description | string | no | Optional description. |
manager_id | string | no | Optional MCC login-customer-id. |
validate_only | boolean | no | Optional. true forces another preview even with a preview_id; false is DEPRECATED and no longer commits — only a valid preview_id applies the write. |
preview_id | string | no | Omit it to preview: nothing is applied, and the call returns a preview_id bound to this exact request. Pass it only after the user approves that preview in a later message, with the same arguments (leave out validate_only, and add any confirmation flag the preview names). Single-use, expires in 30 minutes; changed arguments need a fresh preview. |
Safeguards
A change in two steps. The first call previews and changes nothing; Claude shows you the preview and applies it only after you approve, within 30 minutes and with the same arguments. Every applied change goes to the audit log. How changes are approved.
Policy
Combined audiences may only union/exclude lists the account legitimately owns or was granted under valid customer-data terms; do not assemble audiences that re-identify individuals or target protected classes. Anti-discrimination rules apply if the linked campaign is employment/housing/education/credit — inclusions and exclusions must not proxy protected attributes.
Reminder
Only combine lists this account owns under valid customer-data terms; never use exclusions to proxy a protected attribute.
Errors
| Error class | Means | What to do | Retry |
|---|---|---|---|
VALIDATION_ERROR | Neither include nor exclude lists provided, or no inclusion source supplied (exclude-only is invalid). | Provide at least one include list; verify IDs via gads_list_user_lists. | no |
INVALID_ARGUMENT | Google rejected the audience composition (e.g., incompatible segment, removed/orphaned list reference). | Surface the exact platform message from the validate_only preview; fix the offending list reference. | no |
TOKEN_REVOKED | OAuth token expired/revoked. | Refresh and retry once; else prompt reconnect (needs_reauth). | yes |
CUSTOMER_NOT_FOUND | Customer ID not found/accessible by this connection. | Verify the CID is within the authorized accounts. | no |
PERMISSION_DENIED | No account access or out-of-bearer-scope write. | Confirm access and write scope; else refuse. | no |
RESOURCE_EXHAUSTED | Rate/quota exceeded (HTTP 429). | Backoff 5/10/20s cap 60s, honoring retryDelay, then retry. | yes |
INTERNAL_ERROR | Transient Google server error (5xx). | Retry after short backoff. | yes |
Edge cases
- A referenced list that was REMOVED/orphaned causes INVALID_ARGUMENT in preview — re-list lists and drop the dead reference.
- include + exclude overlapping fully -> audience may be near-empty; warn the user.
- Exclude provided with no include is invalid (VALIDATION_ERROR); require at least one inclusion source.
- Preview creates nothing; do not report success until commit.
- preview_id TTL expiry -> re-preview.
- Combined audiences below the network minimum (~300 estimated members) won't serve on some networks — note expected reach is unknown at creation.