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
The "Revert Transformation" operation in the Google Tag Manager (GTM) node allows users to revert changes made to a specific transformation within a GTM workspace. This is useful when you want to discard recent edits or updates to a transformation and restore it to its previous state.
Common scenarios include:
- Undoing unintended modifications to a transformation.
- Restoring a transformation to a known good configuration after testing changes.
- Managing version control of transformations during GTM container development.
For example, if a user accidentally modifies a transformation's logic or settings, they can use this operation to revert those changes without manually resetting all parameters.
Properties
| Name | Meaning |
|---|---|
| Account ID | The unique identifier of the GTM Account where the transformation resides. |
| Container ID | The unique identifier of the GTM Container that holds the workspace with the transformation. |
| Workspace ID | The unique identifier of the GTM Workspace containing the transformation to revert. |
| Transformation ID | The unique identifier of the GTM Transformation to revert. |
| Optional Query Parameters | Additional optional parameters for the API call, such as flags or filters (see below). |
Details on Optional Query Parameters (subset relevant to this operation)
allowUserPermissionFeatureUpdate(boolean): Must be set to true to allow certain user permission feature updates; otherwise, the operation will fail.- Other parameters exist but are generally not required for reverting a transformation.
Output
The output is a JSON object representing the reverted transformation resource as returned by the GTM API. It contains the full details of the transformation after the revert operation, reflecting its restored state.
No binary data is involved in 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:
https://www.googleapis.com/tagmanager/v2. - Proper permissions on the GTM account, container, and workspace are necessary to perform revert operations.
Troubleshooting
- Missing Required IDs: If any of the required IDs (Account ID, Container ID, Workspace ID, Transformation ID) are missing, the node will throw an error indicating which ID is required.
- Authentication Errors: Ensure that the Google Tag Manager API credentials are correctly set up and authorized.
- Permission Issues: The user must have sufficient permissions on the GTM account and container to revert transformations.
- API Errors: Any errors returned from the GTM API will be surfaced with messages prefixed by "Error calling GTM API". Check the message and stack trace for details.
- Optional Parameter Misconfiguration: Setting
allowUserPermissionFeatureUpdateincorrectly may cause the operation to fail if user permission features are involved.
Links and References
- Google Tag Manager API Documentation - Transformations
- Google Tag Manager API Overview
- n8n OAuth2 Credential Setup
This summary focuses specifically on the "Revert Transformation" operation under the "Transformation" resource as requested.