SCALIX help

← All tools

gads_create_remarketing_list

Google Ads write medium risk

Part of the Google Ads Audience Agent.

What it does

Create a rule-based remarketing user list (UserListService, rule_based_user_list) that auto-populates from site behavior — e.g. visitors whose URL CONTAINS/EQUALS/STARTS_WITH a value, or a custom event. Builds a flexible_rule_user_list with one inclusive operand (OR_OF_ANDS), membership_status=OPEN, prepopulation_status=REQUESTED. WRITE with preview->approve->commit: preview = mutate validate_only=true (validates rule shape, no list created) + diff (name, rule_type, rule_value, membership_life_span_days) + preview_id; commit = the same call plus that preview_id after the user approves in a later message (the server then runs the real mutate) + audit. Returns {user_list_id, resource_name}. membership_life_span_days must be 1-540 (v24 range; unlimited duration removed April 2025), validated client-side BEFORE any API call — Google does not reject over-limit values for rule-based lists at validate_only. Omitted = Google's default. This is the rule-based list builder; for CRM-uploaded lists use gads_create_customer_match_list. 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.

When to use it

Use to create an auto-populating remarketing audience from site behavior. Preview validate_only first, confirm the URL/event rule and membership window with the user, then commit. Default to a conservative membership window unless asked.

Inputs

NameTypeRequiredDescription
customer_idstringyes10-digit CID; strip dashes.
namestringyesList name; unique in account.
rule_typestringnoEnum-normalize: URL_CONTAINS (default), URL_EQUALS, URL_STARTS_WITH, CUSTOM_EVENT.
rule_valuestringyesURL pattern or custom-event name to match. Required for a meaningful rule (non-empty).
membership_life_span_daysintegernoMembership duration in days; validated client-side to 1-540 (v24 range). Omitted = Google's default. Note: for rule-based lists the API accepts over-limit values at validate_only, so the client-side check is the enforcement.
descriptionstringnoOptional description.
manager_idstringnoOptional MCC login-customer-id.
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

Remarketing requires the site to have a privacy policy disclosing remarketing and Google's use of cookies/identifiers, plus EEA/UK consent where applicable; do not build lists from sensitive-category pages (health conditions, sexual orientation, financial hardship) or use them to target protected classes. Lists must not re-identify individuals.

Reminder

Site visitors are tracked under the client's disclosed privacy policy; never build a list from sensitive-category behavior or retain visitor data here.

Errors

Error classMeansWhat to doRetry
INVALID_ARGUMENTRule shape or membership_life_span invalid (e.g., >540 days, empty rule_value).Surface the platform message; clamp membership to 1-540 and supply a non-empty rule_value, then re-preview.no
TOKEN_REVOKEDOAuth token expired/revoked.Refresh and retry once; else prompt reconnect (needs_reauth).yes
CUSTOMER_NOT_FOUNDCustomer ID not found/accessible.Verify the CID is authorized.no
PERMISSION_DENIEDNo access or out-of-bearer-scope write.Confirm access and write scope; else refuse.no
RESOURCE_EXHAUSTEDRate/quota exceeded (HTTP 429).Backoff 5/10/20s cap 60s, honoring retryDelay, then retry.yes
RESOURCE_COUNT_LIMIT_EXCEEDEDMaximum user lists reached for the account.Remove unused lists first.no
INTERNAL_ERRORTransient Google server error (5xx).Retry after backoff.yes

Edge cases

  • A new list needs the remarketing tag firing on the site to populate; size_for_display/search start at 0 — set expectation that it fills over time.
  • List won't serve until it reaches the network minimum (~100 active visitors for Display, ~1000 for Search/RLSA) — note the list may show as not-eligible initially.
  • membership_life_span_days outside 1-540 -> rejected client-side with a clear message before any API call.
  • Preview creates nothing.
  • preview_id TTL expiry -> re-preview.
  • CUSTOM_EVENT rule requires the event already configured; otherwise the list never populates.