Actions84
- 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
Overview
This node integrates with the Google Tag Manager (GTM) API, specifically enabling management of GTM Transformations among many other resources. The "Create Transformation" operation allows users to create a new transformation within a specified GTM workspace. This is useful for automating and managing tag transformations programmatically, which can help in customizing how data is processed or manipulated before being sent to tags.
Typical use cases include:
- Automating the creation of transformations as part of a CI/CD pipeline for GTM configurations.
- Managing multiple GTM workspaces and containers by creating transformations dynamically based on input data.
- Integrating GTM transformation creation into broader workflows that involve data tagging and analytics setup.
Properties
| Name | Meaning |
|---|---|
| Account ID | The GTM Account ID where the transformation will be created. |
| Container ID | The GTM Container ID within the account. |
| Workspace ID | The GTM Workspace ID inside the container where the transformation will be created. |
| Optional Query Parameters | Additional optional parameters for the API request, such as flags or filters. |
| Request Body | JSON object representing the transformation details to be created. This includes all necessary fields defining the transformation. |
Output
The output is a JSON array containing the response from the Google Tag Manager API after creating the transformation. The structure corresponds to the GTM Transformation resource as returned by the API, typically including fields like the transformation's ID, name, type, and configuration details.
No binary data output is involved.
Dependencies
- Requires an OAuth2 API credential configured for Google Tag Manager API access.
- The node uses the base URL
https://www.googleapis.com/tagmanager/v2for API requests. - Proper permissions on the GTM account, container, and workspace are required to create transformations.
Troubleshooting
- Missing Credentials: If the OAuth2 credentials for Google Tag Manager are not set up or invalid, the node will throw an error indicating missing credentials.
- Required Parameter Missing: The node validates presence of Account ID, Container ID, and Workspace ID. Omitting any of these will cause an error specifying which ID is missing.
- Invalid Request Body: If the JSON provided in the Request Body is malformed or missing required transformation fields, the API may return an error. Ensure the JSON matches the expected GTM Transformation schema.
- API Errors: Any errors returned by the GTM API (e.g., permission denied, quota exceeded) will be surfaced with the message prefixed by "Error calling GTM API:" along with stack trace if available.
Links and References
- Google Tag Manager API Documentation
- Google Tag Manager Transformations Resource
- n8n OAuth2 Credential Setup
This summary focuses on the "Create Transformation" operation under the "Transformation" resource, describing its inputs, outputs, and usage context based on static analysis of the node source code and provided property definitions.