gads_create_image_extension
Google Ads write medium risk
Part of the Ad Extensions Agent.
What it does
Link an EXISTING image asset either to a Performance Max ASSET GROUP (asset_group_resource_name; AssetGroupAssetService) as MARKETING_IMAGE (default), SQUARE_MARKETING_IMAGE, LOGO or LANDSCAPE_LOGO, or at customer / campaign / ad_group scope (scope + scope_id; CustomerAsset / CampaignAsset / AdGroupAsset) as AD_IMAGE (the Search image extension; campaign or ad_group scope, the default there), BUSINESS_LOGO (customer or campaign scope; the default at customer scope) or LOGO / LANDSCAPE_LOGO (campaign scope: a Performance Max campaign with brand guidelines links its logos there, not in an asset group). Any other type at a scope is refused before Google sees it. Upload the image first via gads_upload_image_asset. Returns the created link resource_name. The preview echoes the exact link operation; Google validates the asset's type, aspect ratio and eligibility at validate_only time. Flow: preview (validate_only=true to catch aspect/spec/eligibility errors) -> diff (asset name, dimensions, scope) -> approval -> execute -> 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 attach an approved image to Search ads (image extension: AD_IMAGE at campaign or ad_group scope), a business logo (BUSINESS_LOGO at customer or campaign scope), a logo / landscape logo to a Performance Max campaign with brand guidelines (LOGO / LANDSCAPE_LOGO at campaign scope), or a marketing image / logo to a Performance Max asset group. First upload via gads_upload_image_asset, confirm the asset is approved and meets 1.91:1 / 1:1 specs, then link at the appropriate scope.
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
customer_id | string | yes | 10-digit CID; strip dashes. |
asset_group_resource_name | string | no | PMax asset group (customers/{cid}/assetGroups/{id}). Use this OR scope + scope_id. |
image_asset_resource_name | string | yes | Resource name of an existing IMAGE asset (from gads_upload_image_asset). |
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. |
image_type | string | no | Asset group: MARKETING_IMAGE (default) / SQUARE_MARKETING_IMAGE / LOGO / LANDSCAPE_LOGO. Scope: AD_IMAGE (campaign or ad_group; the default there) / BUSINESS_LOGO (customer or campaign; the default at customer) / LOGO / LANDSCAPE_LOGO (campaign, for Performance Max campaigns with brand guidelines). |
scope | string | no | customer | campaign | ad_group — link the image at that scope instead of a PMax asset group. |
scope_id | string | no | Campaign or ad-group id; required when scope is campaign or ad_group. |
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
Image extensions must be relevant, non-misleading, free of overlaid prohibited content, and consistent with the landing page (Misrepresentation). No deepfakes; AI-generated imagery must be disclosed. Image extensions require account eligibility (history/policy compliance).
Reminder
Link only advertiser-owned, approved imagery; account-isolated; nothing retained beyond this request.
Errors
| Error class | Means | What to do | Retry |
|---|---|---|---|
NOT_FOUND | Referenced image asset does not exist. | Upload the image first via gads_upload_image_asset; re-supply the resource name. | no |
ASSET_LINK_ERROR_INVALID_ASSET_TYPE | Referenced asset is not an IMAGE asset. | Provide an IMAGE asset resource; do not link text/video. | no |
IMAGE_ERROR_DIMENSIONS_NOT_ALLOWED | Image aspect ratio/size not valid for image extensions. | Upload a 1.91:1 or 1:1 image meeting specs (min 300x300). | no |
ACCOUNT_NOT_ELIGIBLE | Account not eligible for image extensions (history/policy). | Inform the user; eligibility is account-level and not bypassable. | 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 | Link op failed in bulk. | Return per-op errors. | no |
PLATFORM_UNAVAILABLE | Backend 5xx/INTERNAL. | Retry once after backoff. | yes |
Edge cases
- Asset still pending policy review -> link succeeds but won't serve until approved; surface pending status.
- Account-eligibility gate is account-wide and cannot be worked around.
- Same image linked at multiple scopes -> each link is independent.
- Square-only or landscape-only asset may limit placements; advise providing both ratios.
- validate_only=true creates no link.
- preview TTL expiry -> re-preview.