SCALIX help

← All tools

gads_create_label

Google Ads write low risk

Part of the Account Structure Agent.

What it does

Create a label (LabelService) for organizing campaigns/ad groups/ads, with optional text_label.description and background_color (hex like '#FF0000'). WRITE with preview->approve->commit: preview = mutate validate_only=true + diff (name, color, description) + 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 {label_id, name, resource_name}. Low risk — organizational only, no spend or targeting effect. 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 organizational label before applying it to entities. Preview validate_only, confirm the name, then commit. Quick low-risk step in an account-organization workflow.

Inputs

NameTypeRequiredDescription
customer_idstringyes10-digit CID; strip dashes.
namestringyesLabel name; unique in account.
descriptionstringnoOptional text_label.description.
background_colorstringnoOptional hex color like '#FF0000'.
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

Labels are internal organization only; do not encode client PII or sensitive data in label names/descriptions.

Reminder

No PII or sensitive data in label names/descriptions.

Errors

Error classMeansWhat to doRetry
DUPLICATE_NAMEA label with this name already exists.Choose a unique label name.no
INVALID_ARGUMENTInvalid background_color or empty name.Use a valid hex color and non-empty name; surface the platform message.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_COUNT_LIMIT_EXCEEDEDMaximum labels reached for the account.Remove unused labels first.no
RESOURCE_EXHAUSTEDRate/quota exceeded (HTTP 429).Backoff 5/10/20s cap 60s, then retry.yes
INTERNAL_ERRORTransient Google server error (5xx).Retry after backoff.yes

Edge cases

  • Duplicate label name rejected -> suggest a unique name.
  • background_color must be valid hex; invalid -> INVALID_ARGUMENT.
  • Account label cap exists -> RESOURCE_COUNT_LIMIT_EXCEEDED.
  • Preview creates nothing; preview_id TTL expiry -> re-preview; expired token -> refresh once and retry.