Create or edit a Tag Manager trigger
gtm_upsert_triggerCreate or edit a page view, link click, all-clicks, form submission or custom event trigger, as a draft in the container's Caybl workspace (never published). Dry run by default: returns the trigger in plain words and as saved, and warns when a condition uses a variable that isn't enabled (e.g. Click URL).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | Yes | ||
| name | Yes | Trigger name, e.g. 'Form - contact'. | |
| trigger | No | To EDIT: the existing trigger's id or exact name. Omit to create. | |
| container | No | Container public id like 'GTM-ABC123', from gtm_list_containers. | |
| eventName | No | custom_event only: the dataLayer event name, e.g. 'generate_lead'. | |
| workspace | No | Name of an existing workspace to draft into instead of "Caybl changes" (created automatically). | |
| conditions | No | All must match (AND). Omit to fire on every matching event. | |
| validateOnly | No | Default TRUE: a dry run that shows exactly what would change and changes nothing. Show the user the result, and only call again with validateOnly=false once they've agreed. |