SCALIX help

← All tools

gads_update_campaign

Google Ads write high risk

Part of the Google Ads Manager Agent.

What it does

Updates mutable fields on an existing campaign (name, status, start/end dates, bidding strategy/targets like target_cpa/target_roas, network settings, frequency cap, etc.) via CampaignService.MutateCampaigns with an update_mask listing exactly the changed fields. Budget amount changes go through the dedicated budget tool (campaign_budget is a separate resource). Money fields are micros (×1e6 on input, ÷1e6 to display). PREVIEW->APPROVE->COMMIT: step 1 validate_only=true (returns errors without applying); step 2 plain-English diff per field (from-value -> to-value, estimated impact e.g. a tROAS change); step 3 explicit approval; step 4 execute with partial_failure=true; step 5 confirm changed fields + timestamp + audit log. Re-preview if the user modifies the request. Returns standard success/error envelope. 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. EU POLITICAL ADS (TTPA): to declare an existing campaign set updates.contains_eu_political_advertising = CONTAINS_EU_POLITICAL_ADVERTISING or DOES_NOT_CONTAIN_EU_POLITICAL_ADVERTISING. Google requires the declaration before location/proximity targeting edits, and since 2026-04-01 an account with ANY undeclared campaign fails every campaign mutate (MutateError.EU_POLITICAL_ADVERTISING_DECLARATION_REQUIRED); list undeclared campaigns with gads_run_gaql_query: SELECT campaign.id, campaign.name FROM campaign WHERE campaign.missing_eu_political_advertising_declaration = true.

When to use it

Use to change a campaign's name, status, dates, bidding goal/targets, or network/frequency settings. Show the exact from->to diff with estimated impact (e.g. raising tROAS may reduce volume) and require explicit approval before committing. For budget amount changes, route to the budget-change tool instead.

Inputs

NameTypeRequiredDescription
customer_idstringyes10-digit CID, dashes stripped; operating account.
campaign_idstringyesNumeric campaign ID (or resource_name) to update.
updatesobjectyesMap of fields to change, e.g. {name, status:ENABLED|PAUSED, start_date, end_date}. Drives the update_mask (only listed fields change). Currency->micros. Nested objects are flattened to dotted mask paths — e.g. {geo_target_type_setting:{positive_geo_target_type:PRESENCE}} or {network_settings:{target_search_network:false}} are valid keys. The bare create-param names also work as top-level aliases: positive_geo_target_type / negative_geo_target_type / target_search_network / target_content_network map to their nested paths automatically, and start_date / end_date (YYYY-MM-DD; YYYYMMDD also accepted) map to start_date_time / end_date_time, sent as that day's 00:00:00 / 23:59:59 as v24 requires (a value with a time passes through).
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

Editing a campaign must not be used to evade enforcement — re-pointing a disapproved campaign at duplicate content or changing fields to dodge a disapproval is 'Circumventing Systems' (egregious). Changing bidding/targets affects real spend; apply only the approved fields. Restricted-vertical eligibility still applies to any new geo/vertical exposure.

Reminder

Preview with validate_only, approve the per-field diff, apply only approved fields; never edit a campaign to circumvent a disapproval or to bypass enforcement.

Errors

Error classMeansWhat to doRetry
CUSTOMER_NOT_FOUNDCustomer ID not found / not accessible.Verify CID and access; prompt re-auth if needed.no
TOKEN_REVOKEDOAuth token invalid/revoked (401).Refresh; if still failing set needs_reauth.no
CAMPAIGN_NOT_FOUNDNo campaign with that ID in this account.Verify the campaign_id (and that it isn't already REMOVED).no
OPERATION_ON_MANAGER_ACCOUNTCannot mutate campaigns on an MCC.Use the child operating account.no
INVALID_ARGUMENTPreview validation failed (e.g. immutable field in update_mask, invalid status transition, tROAS without value tracking).Surface the platform message verbatim; remove immutable fields / fix values and re-preview.no
PERMISSION_DENIEDMissing write scope / out-of-bearer-scope (403).Confirm scope + role; re-consent.no
RESOURCE_EXHAUSTEDRate/quota exceeded (429).Backoff 5->10->20s cap 60s, honor retryDelay, retry once.yes
PLATFORM_UNAVAILABLEGoogle Ads API 5xx/INTERNAL.Retry once with backoff; verify state before re-applying.yes

Edge cases

  • Only fields in update_mask change; omitting a field leaves it untouched (do not send full objects expecting a replace).
  • Some fields are immutable post-creation (e.g. advertising_channel_type) -> INVALID_ARGUMENT; surface verbatim.
  • Budget amount lives on campaign_budget, not campaign — route those to the budget tool.
  • Switching bidding strategy can reset the learning phase / affect spend — state the impact in the preview.
  • Changing status to ENABLED starts spend immediately — treat like a go-live.
  • validate_only preview never executes; commit separate + idempotent on retry.
  • Preview TTL expiry or user modification -> re-preview before commit.
  • Expired token mid-call -> refresh once and retry.