SCALIX help

← All tools

gads_update_ad

Google Ads write high risk

Part of the Google Ads Manager Agent.

What it does

Update an ad's headlines, descriptions or final URLs IN PLACE via AdService.MutateAds with an update_mask, on the existing Ad resource (customers/{cid}/ads/{ad_id}): no replace-and-pause, and the ad's id and history are kept. The tool reads the ad's type first and writes each type's own fields: responsive search, responsive display, Demand Gen image (multi-asset), Demand Gen video, video responsive, and Demand Gen carousel and product ads (one headline and one description each). Types Google does not let any tool change in place (text, expanded text, expanded dynamic search, image, call, hotel, shopping and the older video formats) are refused before anything is sent, with the way out: a new ad, and this one paused. Text on any other type is refused the same way; final_urls still work there. Headlines and descriptions REPLACE the whole set: the lists you pass become the ad's complete set. Read the ad first (gads_get_ad shows every type's text, with pinned_field on search ads) and pass the full intended set. Demand Gen video and video responsive ads also re-send their current videos and logo images unchanged, as Google requires. Status changes (PAUSED/ENABLED/REMOVED) are NOT done here: status is an ad_group_ad field, handled via AdGroupAdService. PREVIEW->APPROVE->COMMIT: validate_only=true dry run (catches editorial/policy issues on the new copy) -> plain-English diff of the in-place field changes (the ad's type, which headlines/descriptions/URLs change; full-set replacement warning) -> explicit approval -> execute with partial_failure=true -> confirm resource name + UTC timestamp + audit log. Re-preview on every modification. Limits are the ad type's own (search: 3-15 headlines of 30 characters, 2-4 descriptions of 90); Google checks them at the preview. 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 edit an ad's RSA headlines/descriptions or final URLs in place without creating a new ad or resetting history. Read the ad first (gads_get_ad) and pass the COMPLETE intended asset set (replacement, not merge), run validate_only first, re-preview on any modification, and apply only on explicit approval; never use it to revive disapproved creative.

Inputs

NameTypeRequiredDescription
ad_idstringyesNumeric ad id to update in place (resource_name customers/{cid}/ads/{ad_id}).
ad_group_idstringyesParent ad group id. Must match: an ad/ad-group pair that does not exist is refused before anything is sent.
customer_idstringyes10-digit CID, dashes stripped.
final_urlsarraynoNew final URL(s); mutated in place on the Ad resource via update_mask (final_urls).
headlinesarraynoThe ad's complete new headline set; REPLACES the current one. Written to the ad type's own field (search: 3-15, <=30 chars; Demand Gen carousel or product: exactly one). Pins ride on each asset (pinned_field) on search ads.
descriptionsarraynoThe ad's complete new description set; REPLACES the current one. Written to the ad type's own field (search: 2-4, <=90 chars; Demand Gen carousel or product: exactly one).
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

Copy must meet Google editorial standards (no excessive capitalization, no gimmick punctuation, no clickbait, correct spelling) and support every claim on the landing page (Misrepresentation = immediate suspension). Do NOT edit an ad to recreate disapproved content to dodge enforcement — that is Circumventing Systems (egregious).

Reminder

Edits apply in place and preserve the ad's id; the arrays you pass REPLACE the full asset set — read the ad first (gads_get_ad) and pass everything you want to keep; keep copy truthful and never recreate disapproved content to evade enforcement.

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_FINDINGUpdated copy violates editorial/advertising policy — surfacing Google's policy_summary finding.Show exact reason; revise copy and re-preview.no
INVALID_ARGUMENTUpdate rejected (length over limit, bad URL, headline/description counts out of range, invalid pin) — surfacing Google's message.Surface exact error; fix the merged copy 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 mutate ads on an MCC.Target a client account.no
RESOURCE_EXHAUSTEDRate/quota exceeded (429).Backoff 5->10->20s cap 60s; honor retryDelay.yes
PLATFORM_UNAVAILABLEGoogle Ads API 5xx.Re-check ad state, then retry idempotently.yes

Edge cases

  • AdService.MutateAds replaces the entire headlines/descriptions list: the tool passes your lists through as the complete new set and warns at preview; fetch the existing ones with gads_get_ad first.
  • Pins ride on each asset object on search ads: re-send pinned_field on the assets you keep or the pins are dropped.
  • In-place edits keep the ad id and its history.
  • Status changes (pause/enable/remove) are not handled here: route to AdGroupAdService (ad_group_ad.status).
  • Google does not let any tool change text, expanded text, expanded dynamic search, image, call, hotel, shopping or older video ads in place: the tool refuses before sending and says to create a new ad and pause this one.
  • Demand Gen carousel and product ads have one headline and one description: more than one is refused.
  • Changing a Demand Gen ad's text sends it back to policy review and a large change can restart the campaign's learning; the preview says so.
  • A search ad's replacement set must still satisfy its limits (3-15 headlines <=30 chars, 2-4 descriptions <=90 chars); other types have their own, which Google checks at the preview.
  • Preview TTL expiry -> re-preview; expired token -> refresh once, retry; re-preview required on each modification.