SCALIX help

← All tools

gads_create_demand_gen_ad

Google Ads write high risk

Part of the Demand Gen Campaign Agent.

What it does

Create a Demand Gen ad in a Demand Gen ad group via AdGroupAdService.MutateAdGroupAds. Supports the v24 Demand Gen ad info types: ad.demand_gen_multi_asset_ad (DemandGenMultiAssetAdInfo — marketing_images, square_marketing_images, optional portrait/logo images, headlines, descriptions, business_name), ad.demand_gen_video_responsive_ad (DemandGenVideoResponsiveAdInfo — in v24 videos AND logos are REQUIRED, plus an optional companion_banner), ad.demand_gen_carousel_ad, and ad.demand_gen_product_ad. All image/video 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: branch required-field validation on the chosen Demand Gen type and confirm v24's video+logo requirement for video-responsive; default to PAUSED unless go-live approved. 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 launch a Demand Gen ad once assets are uploaded. Pick the correct Demand Gen type, satisfy its required fields (in v24 video AND logo for video-responsive), run validate_only, default to PAUSED, and create live only on explicit approval. First call gads_plan_demand_gen_campaign for the campaign blueprint, operation ordering, and policy pre-checks.

Inputs

NameTypeRequiredDescription
campaign_idstringyesDemand Gen campaign id. The tool creates the Demand Gen ad group under this campaign automatically (do NOT pass an ad group id).
customer_idstringyes10-digit CID, dashes stripped.
demand_gen_typestringyesMULTI_ASSET|VIDEO_RESPONSIVE|CAROUSEL|PRODUCT. Enum-normalized; drives required fields.
marketing_imagesarraynoLandscape image asset resource names (required for MULTI_ASSET).
square_marketing_imagesarraynoSquare image asset resource names (required for MULTI_ASSET).
video_assetsarraynoYouTubeVideoAsset resource names; REQUIRED for VIDEO_RESPONSIVE in v24.
logo_imagesarraynoLogo asset resource names; REQUIRED for VIDEO_RESPONSIVE in v24, used by other types.
headlinesarraynoHeadline assets (<=30 chars typical).
descriptionsarraynoDescription assets (<=90 chars typical).
business_namestringnoBusiness name (<=25 chars).
final_urlsarrayyesLanding page URL(s).
statusstringnoENABLED|PAUSED, enum-normalized; defaults to PAUSED unless go-live approved.
ad_group_namestringnoName for the atomically-created Demand Gen ad group (default: '<business_name> ad group').
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

Demand Gen creative spans YouTube/Discover/Gmail — copy and creative must meet editorial standards, be non-deceptive (Misrepresentation = immediate suspension), respect copyright, and disclose AI-generated content where required with no deepfakes of real people. Restricted verticals (alcohol, gambling, healthcare, financial, political) require eligibility/certification before serving.

Reminder

Keep Demand Gen creative truthful, copyright-clean, and AI-disclosed; never recreate disapproved 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_FINDINGCreative/copy violates policy (deceptive, copyright, restricted vertical) — surfacing Google's policy_summary finding.Show exact reason; revise and re-preview; verify vertical eligibility/certification.no
ASSET_NOT_FOUNDA referenced image/video asset does not exist or is unprocessed.Upload/confirm assets via AssetService, then retry.no
INVALID_ARGUMENTRejected (type-required fields missing, v24 video+logo missing, channel mismatch) — surfacing Google's message.Surface exact error; add missing required fields for the chosen type 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

  • VIDEO_RESPONSIVE without both videos and logos -> INVALID_ARGUMENT in v24; enforce before send.
  • Wrong type fields for the chosen demand_gen_type (e.g. carousel cards on a multi-asset ad) -> INVALID_ARGUMENT.
  • Ad created in a non-Demand-Gen ad group -> INVALID_ARGUMENT.
  • Restricted-vertical creative validates structurally but is disapproved without certification — warn the user.
  • Bulk create partial_failure -> success:true with per-row warnings.
  • Preview TTL expiry -> re-preview; expired token -> refresh once, retry; commit idempotency.