Actions102
- Account Actions
- Built-In Variable Actions
- Client Actions
- Container Actions
- Destination Actions
- Environment Actions
- Folder Actions
- Google Tag Configuration Actions
- Tag Actions
- Template Actions
- Transformation Actions
- Trigger Actions
- User Permission Actions
- Variable Actions
- Version Actions
- Workspace Actions
- Zone Actions
Overview
This node integrates with the Google Tag Manager (GTM) API, specifically enabling management of GTM Built-In Variables among many other GTM resources. The "Revert Built-In Variable" operation allows users to undo changes made to a built-in variable within a specific GTM workspace, restoring it to its previous state.
This functionality is useful in scenarios where modifications to built-in variables need to be rolled back due to errors or unwanted changes. For example, if a user accidentally alters a built-in variable configuration in a workspace, this operation can revert those changes without affecting other workspace entities.
Properties
| Name | Meaning |
|---|---|
| Account ID | The unique identifier of the GTM Account where the built-in variable exists. |
| Container ID | The unique identifier of the GTM Container that holds the workspace and built-in variable. |
| Workspace ID | The unique identifier of the GTM Workspace within the container where the built-in variable resides. |
| Optional Query Parameters | Additional optional parameters for the API call: - Allow User Permission Feature Update: Boolean flag to allow user permission feature updates. - Built-In Variable Type: Select the type of built-in variable to revert (e.g., Advertiser ID, Click Classes, Page URL, etc.). |
The "Built-In Variable Type" option provides a comprehensive list of predefined variable types supported by GTM, such as advertiserId, clickClasses, pageUrl, videoTitle, and many others, allowing precise targeting of the variable to revert.
Output
The output is a JSON array containing the response from the Google Tag Manager API after reverting the built-in variable. This typically includes the details of the reverted built-in variable resource, reflecting its restored state.
No binary data is produced by this operation.
Dependencies
- Requires an active Google Tag Manager API OAuth2 credential configured in n8n.
- The node makes authenticated HTTP requests to the Google Tag Manager API endpoint at
https://www.googleapis.com/tagmanager/v2. - Proper permissions on the GTM account are necessary to perform revert operations on built-in variables.
Troubleshooting
- Missing Credentials Error: If the node throws an error about missing credentials, ensure that a valid Google Tag Manager OAuth2 API credential is configured and connected.
- Required Parameter Errors: The node validates presence of required IDs (Account ID, Container ID, Workspace ID). Missing any of these will cause an error. Double-check that all required fields are correctly filled.
- Unknown Operation Error: If an unsupported operation is selected, the node will throw an error. Confirm that the operation is set to "Revert Built-In Variable" under the "Built-In Variable" resource.
- API Errors: Errors returned from the GTM API (e.g., permission denied, invalid IDs) will be surfaced with messages prefixed by "Error calling GTM API". Review the message and stack trace for details and verify your GTM setup and permissions.
Links and References
- Google Tag Manager API Documentation
- Google Tag Manager Built-In Variables
- n8n OAuth2 Credential Setup
This summary focuses on the "Revert Built-In Variable" operation of the Google Tag Manager node, describing its purpose, inputs, outputs, dependencies, and common troubleshooting tips based on static analysis of the provided source code and property definitions.