SCALIX help

← All tools

gads_remove_asset_group_asset

Google Ads write medium risk

Part of the Performance Max Agent.

What it does

Unlink an asset from a PMax asset group (remove the AssetGroupAsset) via AssetGroupAssetService.MutateAssetGroupAssets, without deleting the underlying asset. Returns {success, removed_resource_name, asset_still_in_library:true, field_type, remaining}. Accuracy: remaining counts the group's live links of that field type left after the removal (read before the preview); leaving fewer than the PMax minimum (3 headlines, 2 descriptions, 1 each of long headline / business name / marketing image / square marketing image / logo) carries a warning, and a Google refusal surfaces as a clear error, never a silent break. Flow: preview (validate_only=true) -> diff ('Unlink HEADLINE asset X from group Y; group will have N HEADLINE remaining') -> approval -> execute (partial_failure=true) -> confirm + immutable audit log. Idempotent on already-removed links: success with a note (changed: false) and no preview to approve. 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 remove an underperforming or off-brand asset from a PMax group. Preview the remaining count per field type so the group stays above PMax minimums; never remove to circumvent enforcement.

Inputs

NameTypeRequiredDescription
customer_idstringyes10-digit CID; strip dashes.
asset_group_asset_resource_namestringnoExact AssetGroupAsset linkage resource. Provide this OR asset_group + asset + field_type.
asset_group_resource_namestringnoGroup, used with asset + field_type to resolve.
asset_resource_namestringnoAsset to unlink.
field_typestringnoField-type role for resolution.
validate_onlybooleannoOptional. 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_idstringnoOmit 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

Removing assets changes live cross-channel serving. Do not strip + re-add variants to evade a disapproval (Circumventing Systems = egregious). Apply only the approved removal.

Reminder

The underlying asset is preserved (only the group link is removed); account-isolated.

Errors

Error classMeansWhat to doRetry
ASSET_GROUP_ERROR_BELOW_MIN_ASSETSRemoval would drop the group below the required minimum for that field type.Block; add a replacement first or keep the asset.no
INVALID_ARGUMENTInsufficient identifiers to resolve the linkage.Supply the linkage resource or group+asset+field_type.no
NOT_FOUNDNo such link in the group (an already-removed link returns success, changed: false).List the group's assets with gads_get_asset_group (assets_by_field_type) and re-call with the exact asset + field_type.no
TOKEN_REVOKEDToken revoked/expired.Set needs_reauth; prompt reconnect.no
RESOURCE_EXHAUSTEDQuota/QPS exceeded (HTTP 429).Backoff 5/10/20s cap 60s, retry once.yes
PARTIAL_FAILURESome removals failed in bulk.Return per-op errors.no
PLATFORM_UNAVAILABLEBackend 5xx/INTERNAL.Retry once after backoff.yes

Edge cases

  • Underlying asset never deleted — only the group link.
  • Removing below the PMax minimum for its field type -> warning naming the remaining count; a Google refusal surfaces as a clear error.
  • Already-removed link -> idempotent success.
  • Removing the last LOGO/BUSINESS_NAME (non-brand-guidelines groups) blocks serving; warn.
  • validate_only=true removes nothing; preview TTL expiry -> re-preview.