SCALIX help

← All tools

gads_create_responsive_display_ad

Google Ads write high risk

Part of the Display Campaign Agent.

What it does

Create a Responsive Display Ad in a Display ad group via AdGroupAdService.MutateAdGroupAds with ad.responsive_display_ad. Assembles uploaded asset references: marketing_images (1.91:1) and square_marketing_images (1:1) — at least one of each — plus optional logo_images / square_logo_images, up to 5 short headlines (<=30 chars), 1 long_headline (<=90 chars), up to 5 descriptions (<=90 chars), a business_name (<=25 chars), and final_urls. Images must already exist as Asset resources (upload via AssetService first). PREVIEW->APPROVE->COMMIT: validate_only=true dry run -> show all text + referenced assets + policy findings -> explicit approval -> execute with partial_failure=true -> confirm resource name + UTC timestamp + audit log. Accuracy: validate text lengths and asset-ratio requirements before sending; default the ad to PAUSED unless go-live is approved. 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. IMAGE SLOTS: logo_images is the LANDSCAPE 4:1 logo slot (min 512x128); 1:1 logos go in square_logo_images (min 128x128); marketing_images is 1.91:1 (min 600x314); square_marketing_images is 1:1 (min 300x300). Preview reads each referenced asset's pixel dimensions and rejects wrong-slot/undersized images naming the exact asset.

When to use it

Use to launch a new Responsive Display Ad once the required images are uploaded as assets. Confirm assets, text lengths and business name, run validate_only, default to PAUSED, and create live only on explicit approval. First call gads_plan_display_campaign for the campaign blueprint, operation ordering, and policy pre-checks.

Inputs

NameTypeRequiredDescription
ad_group_idstringyesDisplay ad group id.
customer_idstringyes10-digit CID, dashes stripped.
marketing_imagesarrayyesAsset resource names for 1.91:1 landscape images (>=1 required).
square_marketing_imagesarrayyesAsset resource names for 1:1 square images (>=1 required).
headlinesarrayyes1-5 short headlines, each <=30 chars.
long_headlinestringyesSingle long headline, <=90 chars.
descriptionsarrayyes1-5 descriptions, each <=90 chars.
business_namestringyesAdvertiser/business name, <=25 chars.
final_urlsarrayyesLanding page URL(s); consistent with copy.
logo_imagesarraynoOptional 4:1 logo Asset resource names.
square_logo_imagesarraynoOptional 1:1 logo Asset resource names.
statusstringnoENABLED|PAUSED, enum-normalized; defaults to PAUSED unless go-live approved.
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

Display copy and creative must meet editorial standards and be non-deceptive (Misrepresentation = immediate suspension). AI-generated imagery/creative must be disclosed where required and must never deepfake real people. Images must not contain prohibited/shocking content; logos/business name must accurately represent the advertiser.

Reminder

Creative must be truthful, disclose AI generation where required, and never impersonate a real person; do not recreate disapproved creative to dodge review.

Errors

Error classMeansWhat to doRetry
CUSTOMER_NOT_FOUNDCustomer ID not found / unauthorized.Verify CID and authorization; re-auth if revoked.no
TOKEN_REVOKEDOAuth credential revoked/expired.Prompt reconnect (needs_reauth).no
POLICY_FINDINGCreative/copy violates advertising policy — surfacing Google's policy_summary finding.Show the exact reason; revise and re-preview; don't push known-violating creative.no
ASSET_NOT_FOUNDA referenced image Asset resource name does not exist.Upload images via AssetService and reference valid resource names.no
INVALID_ARGUMENTRejected (missing required image ratio, text over length, missing business_name, channel mismatch) — surfacing Google's message.Surface exact error; fix assets/lengths and re-preview.no
PERMISSION_DENIEDScope/role does not permit writes here.Confirm adwords scope and editor role on this CID.no
MANAGER_ACCOUNT_WRITECannot create ads on an MCC.Target a client account.no
PARTIAL_FAILUREA bulk ad create partially succeeded.Return success:true with per-row warnings; re-preview only the failed rows.no
RESOURCE_EXHAUSTEDRate/quota exceeded (429).Backoff 5->10->20s cap 60s; honor retryDelay.yes
PLATFORM_UNAVAILABLEGoogle Ads API 5xx.Re-check state, then retry to avoid duplicate ads.yes

Edge cases

  • Missing a required ratio (no 1.91:1 or no 1:1 image) -> INVALID_ARGUMENT; enforce >=1 of each before sending.
  • Text length overflow (headline>30, long_headline>90, description>90, business_name>25) -> reject client-side.
  • Referencing an image that is still processing/disapproved as an asset -> ASSET_NOT_FOUND/POLICY_FINDING.
  • Display ad created in a Search ad group -> INVALID_ARGUMENT (channel mismatch).
  • Bulk create partial_failure -> success:true with per-row warnings.
  • Preview TTL expiry -> re-preview; expired token -> refresh once, retry; commit idempotency to avoid duplicates.