SCALIX help

← All tools

gads_create_app_ad

Google Ads write high risk

Part of the App Campaign Agent.

What it does

Create an App ad in an App-campaign ad group via AdGroupAdService.MutateAdGroupAds with ad.app_ad (AppAdInfo). Assembles asset references: headlines and descriptions (text assets), plus optional images (MediaBundle/image assets), youtube_videos (YouTubeVideoAsset), html5_media_bundles, and a mandatory_ad_text. The promoted app/store listing is set at the App campaign level (app_id / app_store), not on the ad. Assets must already exist as Asset resources. PREVIEW->APPROVE->COMMIT: validate_only=true dry run -> show text + referenced assets + policy findings -> explicit approval -> execute with partial_failure=true -> confirm resource name + UTC timestamp + audit log. Accuracy: validate text-asset lengths and that referenced assets exist before sending. STATUS: the ad is created ENABLED — Google refuses to pause App ads ('Cannot pause an adgroup ad with this ad type'), so status PAUSED is refused at preview and the PAUSED App campaign (or a paused ad group) holds delivery. 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 add an App ad to an App campaign's ad group after assets are uploaded. Confirm headlines/descriptions and assets, preview it, and create it only on explicit approval: it is created ENABLED (Google refuses to pause App ads), so keep the App campaign paused until go-live. First call gads_plan_app_campaign for the campaign blueprint, operation ordering, and policy pre-checks.

Inputs

NameTypeRequiredDescription
ad_group_idstringyesApp-campaign ad group id: a bare id or its resource name (customers/{cid}/adGroups/{id}); anything else is refused before any Google call.
customer_idstringyes10-digit CID, dashes stripped.
headlinesarrayyesHeadline text assets (<=30 chars each).
descriptionsarrayyesDescription text assets (<=90 chars each).
imagesarraynoImage Asset resource names.
youtube_videosarraynoYouTubeVideoAsset resource names.
html5_media_bundlesarraynoHTML5 MediaBundle Asset resource names.
mandatory_ad_textstringnoMandatory ad text asset shown with every combination.
statusstringnoENABLED only (the default). Google refuses to pause App ads ('Cannot pause an adgroup ad with this ad type'), so PAUSED is refused at preview; keep the App campaign or ad group paused to hold delivery.
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-ad copy/creative must meet editorial standards and accurately represent the app's functionality and the store listing (Misrepresentation = immediate suspension); no malware/unwanted-software promotion, respect copyright on video/images, and disclose AI-generated creative where required.

Reminder

Represent the app honestly and consistently with the store listing; never recreate disapproved app creative to evade review.

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_FINDINGApp creative/copy violates policy (misrepresentation, malware, copyright) — surfacing Google's policy_summary finding.Show exact reason; revise and re-preview.no
ASSET_NOT_FOUNDA referenced image/video/HTML5 asset does not exist or is unprocessed.Upload/confirm assets via AssetService, then retry.no
INVALID_ARGUMENTRejected (missing required text assets, length over limit, not an App campaign ad group) — surfacing Google's message.Surface exact error; fix 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 create ads on an MCC.Target a client account.no
PARTIAL_FAILUREA bulk ad create partially succeeded.Return success:true with per-row warnings; re-preview only the failed rows.no
RESOURCE_EXHAUSTEDRate/quota exceeded (429).Backoff 5->10->20s cap 60s; honor retryDelay.yes
PLATFORM_UNAVAILABLEGoogle Ads API 5xx.Re-check state, then retry to avoid duplicate ads.yes

Edge cases

  • App ad created in a non-App-campaign ad group -> INVALID_ARGUMENT; app identity is set on the campaign, not the ad.
  • Text asset over length (headline>30 / description>90) -> reject client-side.
  • Referencing an unprocessed HTML5 bundle -> ASSET_NOT_FOUND.
  • App store listing mismatch (copy claims features not in the listing) -> policy disapproval.
  • Bulk create partial_failure -> success:true with per-row warnings.
  • Preview TTL expiry -> re-preview; expired token -> refresh once, retry; commit idempotency.