SCALIX help

← All tools

gads_create_pmax_campaign

Google Ads write high risk

Part of the Performance Max Agent.

What it does

Creates a Performance Max campaign (advertising_channel_type=PERFORMANCE_MAX, NO sub-type). PMax only supports MAXIMIZE_CONVERSIONS (optional target CPA) or MAXIMIZE_CONVERSION_VALUE (optional target ROAS). This tool creates the budget + campaign shell; asset groups, listing groups (for retail/Merchant Center) and audience signals are added in a follow-up (typically chained in the same GoogleAdsService.Mutate with temp resource names). Inputs: customer_id, name, daily budget (micros), bidding goal + optional tCPA/tROAS, optional merchant_id+feed_label (retail PMax), final URL expansion toggle (geo/languages are NOT applied at create — a warning says so; use the targeting tools after create). Money is micros (÷1e6). PREVIEW->APPROVE->COMMIT: validate_only=true preview (no creation) -> plain-English diff (budget/day, conversion goal, retail vs general, geo, status) -> approval -> execute (atomic: budget and campaign together or neither) -> resource_name + timestamp + audit log. Defaults PAUSED. Returns standard 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.

When to use it

Use for goal-based cross-channel Performance Max. Confirm the conversion goal (tCPA vs tROAS), non-shared budget, and (for retail) the Merchant Center link, and require go-live approval before ENABLING. Remind the user that asset groups/audience signals are a required follow-up before meaningful serving. First call gads_plan_pmax_campaign for the campaign blueprint, operation ordering, and policy pre-checks.

Inputs

NameTypeRequiredDescription
customer_idstringyes10-digit CID, dashes stripped; operating account.
namestringyesUnique campaign name.
budget_amount_microsintegeryesDaily budget in micros (currency ×1e6); PMax requires a non-shared budget (explicitly_shared=false).
bidding_strategyobjectyes{type:MAXIMIZE_CONVERSIONS|MAXIMIZE_CONVERSION_VALUE, target_cpa_micros?, target_roas?}. Only these two are valid for PMax. Omitted -> defaults to MAXIMIZE_CONVERSIONS (the PMax standard), named in a preview warning.
merchant_idintegernoFor retail PMax: linked Merchant Center ID.
feed_labelstringnoMerchant feed label for retail PMax (replaces sales_country).
final_url_expansion_opt_outbooleannotrue opts out of Final URL expansion (ON by default for PMax) by setting asset_automation_settings FINAL_URL_EXPANSION_TEXT_ASSET_AUTOMATION = OPTED_OUT (v22+ replaced url_expansion_opt_out); false opts in explicitly; omit to keep Google's default.
geo_targetsarraynoAccepted but NOT applied at create (a warning says so) — apply with gads_add_location_targeting after create.
languagesarraynoAccepted but NOT applied at create (a warning says so) — apply with gads_add_language_targeting after create.
statusenumnoENABLED|PAUSED; defaults PAUSED.
enable_brand_guidelinesbooleannoDefault false (opt out — creation needs no asset prerequisites). true links business_name (+ optional logo) as CampaignAssets atomically. IMMUTABLE after create.
business_namestringnoBusiness name for Brand Guidelines (required when enable_brand_guidelines=true; rejected without the flag — never silently dropped).
logo_asset_resource_namestringnoExisting IMAGE asset resource name to link as the LOGO CampaignAsset.
declare_eu_politicalbooleannoSet true ONLY if the campaign contains EU political advertising (Google requires the contains_eu_political_advertising declaration on every new campaign; omitted -> declares does-not-contain, which is a FALSE declaration for EU political ads). The preview names the declaration it sends, for the user to confirm.
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

PMax serves across Search, Display, YouTube, Gmail, Discover and Maps, so creative is subject to ALL of editorial, Misrepresentation, and per-surface policies; AI-generated assets must be disclosed and may not depict deepfakes of real people. Retail PMax follows Shopping/Merchant Center policies. Restricted verticals require certification. Never recreate disapproved assets to circumvent enforcement.

Reminder

Preview with validate_only, approve the diff, default PAUSED; PMax requires only MaxConv/MaxConvValue bidding, a non-shared budget, and policy-clean assets across every surface.

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
OPERATION_ON_MANAGER_ACCOUNTCannot create a campaign on an MCC.Use a non-manager operating account.no
INVALID_ARGUMENTPreview validation failed (e.g. unsupported bidding strategy, shared budget used, missing conversion tracking for value bidding, sub-type sent).Surface platform message verbatim; only MaxConv/MaxConvValue + non-shared budget + no sub-type are valid — correct 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
PARTIAL_FAILUREWhen chaining campaign + asset group in one Mutate, some operations failed while others succeeded.Report which temp-resource ops failed with their platform messages; the partial commit may leave a campaign with no asset group — fix and re-commit failed ops.no
PLATFORM_UNAVAILABLEGoogle Ads API 5xx/INTERNAL.Retry once with backoff; do not assume creation succeeded.yes

Edge cases

  • PMax has NO advertising_channel_sub_type — sending one -> INVALID_ARGUMENT.
  • Only MAXIMIZE_CONVERSIONS or MAXIMIZE_CONVERSION_VALUE are valid; value bidding needs conversion-value tracking.
  • Budget must be non-shared (explicitly_shared=false) — sharing -> rejection.
  • Campaign without an asset group won't serve; flag that asset groups are a required follow-up.
  • Retail PMax needs a linked Merchant Center; missing link -> error.
  • Final URL expansion ON can serve to URLs you didn't list — note and offer opt-out.
  • validate_only preview never executes; chained commit must be idempotent on retry.
  • Default PAUSED; ENABLE only on go-live.
  • Expired token mid-call -> refresh once and retry.