gads_add_asset_group_asset
Google Ads write medium risk
Part of the Performance Max Agent.
What it does
Link an existing asset to a PMax asset group with a specific field_type (HEADLINE, LONG_HEADLINE, DESCRIPTION, MARKETING_IMAGE, SQUARE_MARKETING_IMAGE, PORTRAIT_MARKETING_IMAGE, LOGO, LANDSCAPE_LOGO, YOUTUBE_VIDEO, BUSINESS_NAME, CALL_TO_ACTION_SELECTION) via AssetGroupAssetService.MutateAssetGroupAssets. Supports chaining create-asset + link in one request with temp negative resource names. Returns {asset_group_asset_resource_name, field_type, asset_resource_name}. Preview checks the current per-field_type count against the PMax maximums (15 HEADLINE / 5 LONG_HEADLINE / 5 DESCRIPTION / 20 MARKETING_IMAGE / 20 SQUARE_MARKETING_IMAGE / 5 PORTRAIT / 5 LOGO / 5 LANDSCAPE_LOGO / 5 YOUTUBE_VIDEO) and rejects over-limit links naming the count; preview also reads campaign.brand_guidelines_enabled and redirects BUSINESS_NAME/LOGO/LANDSCAPE_LOGO to the CampaignAsset path when it is on. Critically: with brand_guidelines_enabled, BUSINESS_NAME/LOGO/LANDSCAPE_LOGO CANNOT be added here — they must be CampaignAsset; the tool detects this and redirects. Flow: preview (validate_only=true) -> diff (asset, field_type, target group) -> approval -> execute (partial_failure=true) -> confirm + immutable audit log. 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. validate_only=true forces another preview; validate_only=false alone never commits.
When to use it
Use to populate a PMax asset group toward serving eligibility (reach >=3 headlines, >=2 descriptions, required images, logo, business name). Confirm char limits and field_type before linking. If brand guidelines are enabled, route business name/logo to CampaignAsset instead.
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
customer_id | string | yes | 10-digit CID; strip dashes. |
asset_group_resource_name | string | yes | Target PMax asset group. |
asset_resource_name | string | no | Existing Asset resource name to link. Provide exactly ONE of this or inline_text (inline_text creates a text asset in the same atomic request; text field types only, char-checked). |
field_type | string | yes | Enum role of the asset in the group; enum-normalized (HEADLINE/DESCRIPTION/MARKETING_IMAGE/LOGO/YOUTUBE_VIDEO/...). |
inline_text | string | no | If creating a text asset inline: the text (validated to the field_type's char limit). |
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
Linked assets serve across all Google channels; text must meet editorial standards and images/videos must be policy-compliant and landing-page-consistent (Misrepresentation). AI-generated creative must be disclosed; no deepfakes.
Reminder
Link only advertiser-owned, approved assets; account-isolated; nothing retained beyond this request.
Errors
| Error class | Means | What to do | Retry |
|---|---|---|---|
ASSET_LINK_ERROR_INVALID_FIELD_TYPE | Asset type does not match the requested field_type (e.g., linking a video as HEADLINE). | Use a compatible asset/field_type pair. | no |
FIELD_TYPE_NOT_ALLOWED_AT_ASSET_GROUP_LEVEL | BUSINESS_NAME/LOGO/LANDSCAPE_LOGO disallowed because brand_guidelines_enabled. | Link these as CampaignAsset at campaign level instead. | no |
INVALID_ARGUMENT | Text exceeds the field_type char limit or asset missing. | Shorten text / supply an asset. | no |
NOT_FOUND | Asset or asset group not found. | Verify resource names. | no |
DUPLICATE_ASSET_IN_ASSET_GROUP | Asset already linked with this field type. | Treat as idempotent; skip. | no |
TOKEN_REVOKED | Token revoked/expired. | Set needs_reauth; prompt reconnect. | no |
RESOURCE_EXHAUSTED | Quota/QPS exceeded (HTTP 429). | Backoff 5/10/20s cap 60s, retry once. | yes |
PARTIAL_FAILURE | Some links failed in a bulk add. | Return per-op errors; report which links succeeded. | no |
PLATFORM_UNAVAILABLE | Backend 5xx/INTERNAL. | Retry once after backoff. | yes |
Edge cases
- brand_guidelines_enabled -> BUSINESS_NAME/LOGO/LANDSCAPE_LOGO rejected here; redirect to CampaignAsset.
- Exceeding max per field type (e.g., >15 headlines, >5 descriptions) -> API error; report the cap.
- Linking the same asset twice with same field_type -> duplicate error; idempotent skip.
- Newly linked asset pending policy review -> won't serve until approved; surface pending.
- Chained create+link in one request uses temp negative resource names.
- validate_only=true links nothing; preview TTL expiry -> re-preview.