SCALIX help

← All tools

gads_create_campaign

Google Ads write high risk

Part of the Google Ads Manager Agent.

What it does

Generic campaign creator: builds a Campaign of any advertising_channel_type via the unified GoogleAdsService.Mutate. Use the type-specific tools (gads_create_search_campaign, etc.) when you know the channel; use this only for raw/advanced control. Inputs: customer_id, campaign name, advertising_channel_type, bidding strategy, budget, optional start/end dates. `budget` may be an object {amount_micros, delivery_method?, explicitly_shared?} to CREATE a CampaignBudget inline (chained atomically with the campaign), or an existing budget id/resource_name to REUSE one. Money: amounts are micros (display ÷ 1e6); a $50.00/day budget = amount_micros 50000000. PREVIEW->APPROVE->COMMIT: step 1 runs Mutate with validate_only=true (returns INVALID_ARGUMENT / policy errors without creating anything); step 2 returns a plain-English diff (channel type, budget/day, bidding goal, status); step 3 waits for explicit user approval; step 4 executes; step 5 returns the created resource_name(s) + timestamp and writes the immutable audit log. New campaigns spend real money the moment they are ENABLED, so this tool defaults the campaign status to PAUSED unless the user explicitly says go live. Returns {success:true,data:{resource_names,...},count,warnings} or the standard error envelope {success:false,error_class,message,action_required,is_retryable,errors:[...]}. 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. CHANNEL LIMITS: advertising_channel_type=VIDEO is rejected up front — the Google Ads API cannot create VIDEO campaigns (use the Google Ads UI, or Demand Gen / PMax for API-managed video); MULTI_CHANNEL/APP is redirected to gads_create_app_campaign (which sets the app-specific required fields).

When to use it

Use to create a campaign of an arbitrary channel type when the type-specific creators don't fit. ALWAYS preview the full structure (budget, bidding, geo, status) and require the user to approve the exact diff before committing. Confirm budget and go-live explicitly — a campaign set ENABLED spends real money immediately. If the vertical is restricted, confirm eligibility/certification first.

Inputs

NameTypeRequiredDescription
customer_idstringyes10-digit Google Ads CID; strip dashes (123-456-7890 -> 1234567890). Must be the operating account, not an MCC.
namestringyesCampaign name; must be unique within the account (DUPLICATE_CAMPAIGN_NAME otherwise).
advertising_channel_typeenumyesSEARCH|DISPLAY|SHOPPING|VIDEO|PERFORMANCE_MAX|DEMAND_GEN|MULTI_CHANNEL (App). Enum-normalize (uppercase, underscores).
advertising_channel_sub_typeenumnoSub-type when applicable (e.g. SEARCH_MOBILE_APP, DISPLAY_GMAIL_AD, SHOPPING_COMPARISON_LISTING_ADS, APP_CAMPAIGN). Omit for PMax/Demand Gen (they take no sub-type).
budgetobjectyesEITHER an object {amount_micros, delivery_method?:STANDARD|ACCELERATED, explicitly_shared?:false} to CREATE a daily budget inline (amount_micros is micros, e.g. $50/day = 50000000), OR an existing CampaignBudget id (e.g. 12345) / full resource_name (customers/{cid}/campaignBudgets/{id}) / {resource_name} to REUSE one.
bidding_strategyobjectyesGoal + type, e.g. {type:MAXIMIZE_CONVERSIONS, target_cpa_micros?}, {type:TARGET_ROAS, target_roas:3.5}, {type:MANUAL_CPC}. Must be valid for the chosen channel type.
statusenumnoENABLED|PAUSED. Defaults to PAUSED (safe). ENABLED only on explicit go-live approval.
start_datestringnoYYYY-MM-DD (YYYYMMDD also accepted); sent as that day's 00:00:00. Defaults to today; must be <= end_date.
end_datestringnoYYYY-MM-DD, inclusive (sent as that day's 23:59:59, as v24 requires); optional (runs indefinitely if omitted).
declare_eu_politicalbooleannoSet true ONLY if the campaign contains EU political advertising (v24 requires the contains_eu_political_advertising declaration; omitted -> declares does-not-contain). 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

Campaign creation is subject to Google editorial, Misrepresentation, and restricted-vertical eligibility review. Never create a new campaign (or new account) to recreate disapproved content or dodge a suspension — that is 'Circumventing Systems', an egregious violation that triggers immediate, often permanent, account suspension. Restricted verticals (alcohol, gambling, healthcare/medicines, financial services, political) require verification/certification before the campaign can serve.

Reminder

Preview with validate_only, get explicit approval, default to PAUSED; never recreate disapproved content or spin up replacement accounts to bypass enforcement; do not retain account data beyond this request.

Errors

Error classMeansWhat to doRetry
CUSTOMER_NOT_FOUNDCustomer ID not found or not accessible with the connected credentials.Verify the 10-digit CID (dashes stripped) and that the connected user has access; prompt re-auth if needed.no
TOKEN_REVOKEDThe OAuth refresh/access token is invalid or revoked (UNAUTHENTICATED/401).Trigger token refresh; if still failing, set needs_reauth and prompt the user to reconnect Google Ads.no
OPERATION_ON_MANAGER_ACCOUNTCannot create campaigns on a manager (MCC) account; campaigns live on operating accounts only.Select a non-manager child account as the operating customer_id.no
INVALID_ARGUMENTValidation failed during validate_only preview (e.g. bidding strategy invalid for channel type, missing required setting).Surface the exact platform error message verbatim; do not guess a fix — re-preview after correction.no
DUPLICATE_CAMPAIGN_NAMEA campaign with this name already exists in the account.Choose a unique name or confirm intent to reuse.no
PERMISSION_DENIEDCaller lacks write scope or the action is outside the bearer token's granted scope (403).Confirm the adwords OAuth scope and account role; request re-consent with write permission.no
RESOURCE_EXHAUSTEDRate/quota limit hit (HTTP 429).Exponential backoff 5->10->20s capped at 60s, honoring any retryDelay, then retry once.yes
PLATFORM_UNAVAILABLEGoogle Ads API returned a 5xx / INTERNAL error.Retry once with backoff; if it persists, report the outage and do not assume the campaign was created.yes

Edge cases

  • validate_only=true never executes (it is separate from partial_failure); a clean preview does NOT create the campaign — the commit is a second call.
  • Budget is created before the campaign; if the campaign create fails after the budget succeeds (no temp-resource chaining), an orphaned budget may remain — prefer single GoogleAdsService.Mutate with temp resource names to keep it atomic.
  • Shared budget (explicitly_shared=true) affects every campaign that uses it — warn before reusing a shared budget.
  • Bidding strategy must match channel type (e.g. TARGET_ROAS needs conversion-value tracking); surface the platform error rather than substituting a strategy.
  • Preview state has a TTL; if the user approves after expiry, re-run validate_only before committing.
  • Commit must be idempotent on retry — track a client request id so a backoff retry doesn't create a duplicate campaign.
  • Default status PAUSED; only ENABLE on explicit go-live so no unintended spend.
  • Expired access token mid-call -> refresh once and retry the same operation.