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
| Name | Type | Required | Description |
|---|---|---|---|
ad_group_id | string | yes | App-campaign ad group id: a bare id or its resource name (customers/{cid}/adGroups/{id}); anything else is refused before any Google call. |
customer_id | string | yes | 10-digit CID, dashes stripped. |
headlines | array | yes | Headline text assets (<=30 chars each). |
descriptions | array | yes | Description text assets (<=90 chars each). |
images | array | no | Image Asset resource names. |
youtube_videos | array | no | YouTubeVideoAsset resource names. |
html5_media_bundles | array | no | HTML5 MediaBundle Asset resource names. |
mandatory_ad_text | string | no | Mandatory ad text asset shown with every combination. |
status | string | no | ENABLED 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_only | boolean | no | Optional. 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_id | string | no | Omit 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 class | Means | What to do | Retry |
|---|---|---|---|
CUSTOMER_NOT_FOUND | Customer ID not found / unauthorized. | Verify CID and authorization; re-auth if revoked. | no |
TOKEN_REVOKED | OAuth credential revoked/expired. | Prompt reconnect (needs_reauth). | no |
POLICY_FINDING | App creative/copy violates policy (misrepresentation, malware, copyright) — surfacing Google's policy_summary finding. | Show exact reason; revise and re-preview. | no |
ASSET_NOT_FOUND | A referenced image/video/HTML5 asset does not exist or is unprocessed. | Upload/confirm assets via AssetService, then retry. | no |
INVALID_ARGUMENT | Rejected (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_DENIED | Scope/role does not permit writes here. | Confirm adwords scope and editor role on this CID. | no |
MANAGER_ACCOUNT_WRITE | Cannot create ads on an MCC. | Target a client account. | no |
PARTIAL_FAILURE | A bulk ad create partially succeeded. | Return success:true with per-row warnings; re-preview only the failed rows. | no |
RESOURCE_EXHAUSTED | Rate/quota exceeded (429). | Backoff 5->10->20s cap 60s; honor retryDelay. | yes |
PLATFORM_UNAVAILABLE | Google 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.