SCALIX help

← All tools

gads_create_sitelink

Google Ads write medium risk

Part of the Ad Extensions Agent.

What it does

Create a SitelinkAsset (link text <=25 chars + up to 2 description lines <=35 chars each + final URL) and link it at the customer, campaign, or ad-group level via the appropriate *AssetService link with field_type=SITELINK. This is the asset-based extension model (feed-based sitelinks are deprecated). Returns {asset_resource_name, link_resource_name, scope}. Accuracy: link text and description char limits are validated pre-create; the final URL must be a fully-qualified HTTPS URL on the advertiser's verified domain. Flow: preview (validate_only=true to catch URL/char/editorial errors) -> plain-English diff (text, descriptions, URL, scope) -> approval -> execute (partial_failure=true) -> 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 add navigational sitelinks that improve CTR/SERP real estate. Confirm link text <=25 chars, descriptions <=35, and the final URL matches the ad's landing-page theme before creating. Use campaign/ad-group scope only when targeting a subset; default to customer scope for shared links.

Inputs

NameTypeRequiredDescription
customer_idstringyes10-digit CID; strip dashes.
link_textstringyesSitelink display text, <=25 chars; reject/flag over-limit before send.
description1stringnoLine 1, <=35 chars; if either description is set, both should be set for the descriptions to serve.
description2stringnoLine 2, <=35 chars.
final_urlsarrayyesList of fully-qualified HTTPS final URLs (typically one) on the advertiser domain.
scopestringyesEnum CUSTOMER/CAMPAIGN/AD_GROUP — link level.
scope_idstringnoCampaign/ad-group ID; required 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

Sitelink text and destinations must be accurate, non-clickbait, and consistent with the landing page (Misrepresentation = egregious). Final URLs must resolve to the advertiser's verified domain; no redirect chains/cloaking (Circumventing Systems = egregious).

Reminder

Use only advertiser-owned destination URLs; do not embed tracking that exfiltrates user data; nothing retained beyond this request.

Errors

Error classMeansWhat to doRetry
INVALID_ARGUMENTlink_text/description exceeds limit or final_url malformed.Surface the platform field error; correct lengths/URL — do not guess.no
URL_ERROR_INVALID_FINAL_URLFinal URL is not a valid/qualified HTTPS URL or domain mismatch.Require a valid advertiser-domain HTTPS URL.no
FIELD_ERROR_REQUIREDscope_id missing for CAMPAIGN/AD_GROUP scope.Require scope_id when scope != CUSTOMER.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 created but link failed (or vice versa) in the chained op.Return per-op errors; report which step succeeded and roll-forward guidance.no
PLATFORM_UNAVAILABLEBackend 5xx/INTERNAL.Retry once after backoff.yes

Edge cases

  • Setting only one description -> sitelink may not serve descriptions; warn to provide both or neither.
  • Sitelinks need at least 2 (often 4) total to serve as a group — note minimums; a single sitelink may not show.
  • Customer-scope sitelink applies account-wide; campaign/ad-group link overrides at that level.
  • validate_only=true creates nothing; chained asset+link both deferred.
  • Duplicate identical sitelink asset -> existing asset reused, new link still created.
  • preview TTL expiry -> re-preview before execute.