SCALIX help

← All tools

gads_create_app_campaign

Google Ads write high risk

Part of the App Campaign Agent.

What it does

Creates an App campaign. All App campaigns use advertising_channel_type=MULTI_CHANNEL (ads serve across multiple channels) with Campaign.app_campaign_setting (app_id + app_store) and an advertising_channel_sub_type of APP_CAMPAIGN (installs / in-app conversions), APP_CAMPAIGN_FOR_ENGAGEMENT (re-engage existing users), or APP_CAMPAIGN_FOR_PRE_REGISTRATION (pre-registration). Sets bidding inline on the campaign as Google's App campaign guide pairs it: a target CPA in target_cpa (TargetCpa), a target ROAS in target_roas (TargetRoas), no target in maximize_conversions / maximize_conversion_value; the goal type follows the sub type and that field. Creates a dedicated non-shared CampaignBudget (explicitly_shared=false — App campaigns require their own budget); geo/language criteria are NOT set at create (a warning says so; apply them after with gads_add_location_targeting / gads_add_language_targeting). Bidding is configured inline on the campaign object; no portfolio (BiddingStrategyService) strategy is used. Omitted bidding_strategy defaults to MAXIMIZE_CONVERSIONS (goal OPTIMIZE_INSTALLS_WITHOUT_TARGET_INSTALL_COST), named in a preview warning; engagement and pre-registration campaigns need TARGET_CPA. App campaigns are largely automated — Google assembles ads from supplied text/image/video/HTML5 assets (added via assets/ad group afterward). Inputs: customer_id, name, app_id, app_store, sub_type, daily budget (micros), bidding goal + target CPA/value, geo, languages. Money is micros (÷1e6). PREVIEW->APPROVE->COMMIT: validate_only=true preview (no creation) -> plain-English diff (linked app/store, install vs engagement vs pre-reg, budget/day, bidding strategy and goal, 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 to drive app installs, in-app engagement, or pre-registration via Google's automated App campaigns. Confirm the linked app_id/app_store, the sub-type goal (install vs engagement vs pre-reg), target CPA/value, and the dedicated daily budget, then require go-live approval before ENABLING. Note that ads are auto-assembled from the assets you supply afterward. First call gads_plan_app_campaign for the campaign blueprint, operation ordering, and policy pre-checks.

Inputs

NameTypeRequiredDescription
customer_idstringyes10-digit CID, dashes stripped; operating account.
namestringyesUnique campaign name.
app_idstringyesApp store identifier (Android package name or iOS App Store numeric ID).
app_storeenumyesAPPLE_APP_STORE | GOOGLE_APP_STORE (AppCampaignAppStoreEnum); enum-normalize.
advertising_channel_sub_typeenumyesAPP_CAMPAIGN (installs, the default) | APP_CAMPAIGN_FOR_ENGAGEMENT | APP_CAMPAIGN_FOR_PRE_REGISTRATION; enum-normalized, another value is refused. Engagement and pre-registration campaigns bid with TARGET_CPA.
budget_amount_microsintegeryesDaily budget in micros (currency ×1e6). The budget is created dedicated/non-shared (explicitly_shared=false).
bidding_strategyobjectyesInline campaign bidding (Google's App campaign guide): {type: TARGET_CPA (sent as campaign.target_cpa; target_cpa or target_cpa_micros) | TARGET_ROAS (campaign.target_roas; target_roas) | MAXIMIZE_CONVERSIONS | MAXIMIZE_CONVERSION_VALUE (no target)}. A MAXIMIZE_* type given a target is sent as TARGET_CPA / TARGET_ROAS, with a warning. A portfolio strategy is refused pre-API, and so is bidding the guide gives no goal for the sub type (MANUAL_CPC, MAXIMIZE_CLICKS, MAXIMIZE_* on engagement or pre-registration) unless bidding_strategy_goal_type is given. Omitted -> defaults to MAXIMIZE_CONVERSIONS (no target), named in a preview warning; a dict without type infers TARGET_CPA/TARGET_ROAS from its target key; a dict that resolves to NO bidding scheme (e.g. TARGET_CPA with no target) is rejected pre-API as invalid_argument.
bidding_strategy_goal_typestringnoOptional AppCampaignBiddingStrategyGoalType (e.g. OPTIMIZE_INSTALLS_TARGET_INSTALL_COST, OPTIMIZE_IN_APP_CONVERSIONS_WITHOUT_TARGET_CPA, OPTIMIZE_PRE_REGISTRATION_CONVERSION_VOLUME). Omitted: derived from the sub type and the bidding field as Google's App campaign guide pairs them — APP_CAMPAIGN: TARGET_CPA → OPTIMIZE_INSTALLS_TARGET_INSTALL_COST, TARGET_ROAS → OPTIMIZE_RETURN_ON_ADVERTISING_SPEND, MAXIMIZE_CONVERSIONS → OPTIMIZE_INSTALLS_WITHOUT_TARGET_INSTALL_COST, MAXIMIZE_CONVERSION_VALUE → OPTIMIZE_TOTAL_VALUE_WITHOUT_TARGET_ROAS; APP_CAMPAIGN_FOR_ENGAGEMENT + TARGET_CPA → OPTIMIZE_IN_APP_CONVERSIONS_TARGET_CONVERSION_COST; APP_CAMPAIGN_FOR_PRE_REGISTRATION + TARGET_CPA → OPTIMIZE_PRE_REGISTRATION_CONVERSION_VOLUME. Pass it for the guide's other goals (e.g. OPTIMIZE_IN_APP_CONVERSIONS_TARGET_INSTALL_COST); Google checks that pair at preview. Required by Google at create; Scalix always sets it.
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.
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

App ads are subject to editorial, Misrepresentation, and the destination app's compliance with Google Play / Apple App Store and Google malware/Unwanted-Software policies; assets may not misrepresent the app's functionality. AI-generated assets must be disclosed and may not depict deepfakes of real people. Restricted verticals require certification. Never recreate disapproved ads to circumvent enforcement.

Reminder

Preview with validate_only, approve the diff, default PAUSED; create a dedicated non-shared budget, set bidding inline on the campaign, and ensure the linked app is a real, policy-compliant store listing with assets that don't misrepresent app functionality.

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. app_id not found in the chosen store, bidding goal invalid for the chosen sub-type, sub-type missing).Surface platform message verbatim; verify the app store listing and bidding goal, then 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; do not assume creation succeeded.yes

Edge cases

  • app_id must resolve in the chosen store; engagement campaigns also require deep-link/in-app conversion tracking — preview rejects otherwise.
  • App campaigns auto-generate ad combinations from supplied assets; the campaign serves poorly until enough text/image/video assets are added.
  • The bidding goal follows the sub type and the bidding field (Google's App campaign guide): installs = TARGET_CPA (campaign.target_cpa), TARGET_ROAS or a target-less MAXIMIZE_*; engagement and pre-registration = TARGET_CPA. A pair the guide doesn't give is refused pre-API unless bidding_strategy_goal_type is given, and Google checks that pair at preview.
  • Targeting is highly automated; manual placement controls are limited — set expectations.
  • validate_only preview never executes; commit separate + idempotent on retry.
  • Budget is dedicated/non-shared (explicitly_shared=false); App campaigns cannot use a shared budget.
  • Default PAUSED; ENABLE only on go-live.
  • Expired token mid-call -> refresh once and retry.