SCALIX help

← All tools

gads_create_lead_form_extension

Google Ads write high risk

Part of the Ad Extensions Agent.

What it does

Create a LeadFormAsset (business name, headline, description, CTA enum, REQUIRED privacy-policy URL, list of qualifying questions/fields, post-submit message + optional post-submit CTA/URL, optional background image asset, optional delivery_methods) and link it with field_type=LEAD_FORM. Asset-based lead-form extension. Returns {asset_resource_name, link_resource_name, scope}. Accuracy: privacy_policy_url is required by policy; field char limits and allowed field-type enums are validated pre-create. Lead delivery is optional and supports multiple channels — CSV download, email, CRM/API, or webhook; if a webhook URL is supplied the tool configures it, otherwise leads are retrievable via download/API. Retrievable lead data is bounded (~30-60 days) as a Google product limit. Flow: preview (validate_only=true) -> diff (headline, fields requested, CTA, privacy URL, delivery config) -> approval -> execute -> confirm + immutable audit log. 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 capture leads directly in-ad. Always include a privacy_policy_url and request only non-sensitive fields needed for the offer. Lead delivery is optional — leads are retrievable via download/API by default, and you may additionally configure a webhook for real-time delivery. Do not collect protected-attribute data for regulated verticals.

Inputs

NameTypeRequiredDescription
customer_idstringyes10-digit CID; strip dashes.
business_namestringyesAdvertiser business name shown on the form.
headlinestringyesForm headline within the API char limit.
descriptionstringyesForm description within the limit.
call_to_action_typestringyesEnum (LEARN_MORE, GET_QUOTE, APPLY_NOW, SIGN_UP, CONTACT_US, SUBSCRIBE, DOWNLOAD, BOOK_NOW, GET_OFFER); enum-normalize.
call_to_action_descriptionstringyesREQUIRED by the API whenever call_to_action_type is set (proto-marked Required): a short value proposition shown with the CTA, ~30 chars. The tool refuses call_to_action_type without it.
privacy_policy_urlstringyesREQUIRED advertiser privacy-policy HTTPS URL.
fieldsarrayyesREQUIRED non-empty list of qualifying fields — validated pre-API (empty input fails with a named error; a CSV string like 'EMAIL, FULL_NAME' is accepted). Common LeadFormFieldUserInputType members: FULL_NAME, FIRST_NAME, LAST_NAME, EMAIL, WORK_EMAIL, PHONE_NUMBER, WORK_PHONE, COMPANY_NAME, JOB_TITLE, POSTAL_CODE, STREET_ADDRESS, CITY, REGION, COUNTRY. Avoid sensitive/protected-attribute fields.
delivery_webhook_urlstringnoOptional advertiser webhook URL for real-time lead delivery; when set, configures a WebhookDelivery delivery method. Leads are also retrievable via download/API.
post_submit_headlinestringnoThank-you message headline.
post_submit_call_to_action_typestringnoOptional post-submit CTA enum.
scopestringyesEnum CUSTOMER/CAMPAIGN — lead forms link at campaign/customer level.
scope_idstringnoRequired when scope != CUSTOMER.
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

Lead forms must include a valid privacy-policy URL and must NOT collect sensitive personal data (health, financial-account, government-ID, sexual orientation, etc.). Anti-discrimination: forms for employment/housing/credit/education must not pre-qualify on protected attributes. Collected lead data is member-derived PII — delete within retention limits; never use for cross-account enrichment or pooling.

Reminder

Lead data is highly sensitive PII; never log raw leads, secure any configured delivery webhook, and purge per retention policy.

Errors

Error classMeansWhat to doRetry
FIELD_ERROR_REQUIREDprivacy_policy_url or another required form field missing.Require privacy_policy_url and all mandatory fields before create.no
LEAD_FORM_ERROR_INVALID_FIELDRequested field is unsupported or a disallowed/sensitive field.Remove the sensitive field; use only allowed enums.no
URL_ERROR_INVALID_FINAL_URLprivacy_policy_url (or webhook URL) invalid/unreachable or not HTTPS.Require a valid HTTPS privacy-policy URL (and valid webhook URL if delivery is configured).no
TOKEN_REVOKEDToken revoked/expired.Set needs_reauth; prompt reconnect.no
RESOURCE_EXHAUSTEDQuota/QPS exceeded (HTTP 429).Backoff 5/10/20s cap 60s, retry once.yes
PARTIAL_FAILUREAsset/link partial failure.Return per-op errors.no
PLATFORM_UNAVAILABLEBackend 5xx/INTERNAL.Retry once after backoff.yes

Edge cases

  • No webhook configured -> leads are still retrievable via CSV download / email / CRM(API); webhook is one optional delivery method, not a requirement.
  • Retrievable lead data is bounded (~30-60 days) by Google -> advise downloading/syncing leads promptly.
  • Regulated vertical (employment/housing/credit/education) -> block protected-attribute qualifying questions (anti-discrimination).
  • Sensitive field requested -> reject before mutate.
  • Lead-form CTAs only serve on eligible campaign types (Search/Video/Demand Gen) -> note eligibility.
  • validate_only=true creates nothing.
  • preview TTL expiry -> re-preview.