Draft publishing a Tag Manager workspace
draft_publish_gtm_workspaceDraft a live publish of a Tag Manager workspace and return a preview of all pending changes. Refuses if conflicts, errors, or post-preview changes occur.
Instructions
Draft publishing a Tag Manager workspace LIVE — returns a PREVIEW.
Every pending change in the workspace goes live, including changes other people made in the GTM UI; the preview lists them all. Apply refuses when the workspace changed after the preview, has merge conflicts, or reports compiler errors in a quick preview, and it refuses a Custom HTML tag being added or changed while gtm.allow_custom_html is off. Refused unless gtm.write_enabled is set. Returns the pending changes, the version that is live now (for a one-step rollback), the version name that would be created and a plan_id. That gate matches the tag type html; a Custom JavaScript variable or a custom template tag (cvt_…), which can inject a script, is not covered and needs review in the GTM UI.
Tag Manager API: https://developers.google.com/tag-platform/tag-manager/api/v2
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| version_name | No | Name of the container version created by the publish. Empty uses "AdLoop publish <UTC timestamp>". | |
| workspace_id | No | Workspace to publish (see list_gtm_workspaces). Empty uses the Default Workspace, or the only workspace there is. | |
| version_notes | No | Notes stored on the created version. Empty leaves them out. | |
| gtm_account_id | No | Numeric GTM account ID (see list_gtm_accounts). Empty uses gtm.account_id from the config. | |
| gtm_container_id | No | Numeric GTM container ID (see list_gtm_containers). Empty uses gtm.container_id from the config. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||