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 "Delete Built-In Variable" operation allows users to delete a specified built-in variable from a GTM workspace within a container and account.
Common scenarios for this node include automating GTM configuration tasks such as creating, listing, updating, or deleting built-in variables programmatically. For example, a user might want to clean up unused built-in variables in a GTM workspace or automate environment setup by removing default variables that are not needed.
Practical example:
- Automatically delete a specific built-in variable by specifying its type, account ID, container ID, and workspace ID, helping maintain a clean and optimized GTM workspace.
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 within the account. |
| Workspace ID | The unique identifier of the GTM Workspace inside the container where the built-in variable is managed. |
| Optional Query Parameters | Additional optional parameters for the request. Includes: • Allow User Permission Feature Update (boolean): Must be true to allow user permission features update. • Built-In Variable Type (options): Selects the type of built-in variable to delete (e.g., Advertiser ID, Click URL, Page URL, etc.). |
Output
The output is a JSON array containing the response from the Google Tag Manager API after attempting to delete the built-in variable. The structure corresponds to the API's response for the delete operation, typically an empty object or confirmation of deletion.
No binary data is output by this node.
Dependencies
- Requires a valid 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 and workspace are necessary to perform delete operations.
Troubleshooting
- Missing Credentials Error: If the node throws an error about missing credentials, ensure that a valid Google Tag Manager OAuth2 credential is set up and connected.
- Required Parameter Missing: Errors like "GTM Account ID is required" or "GTM Container ID is required" indicate that mandatory fields were not provided. Make sure all required IDs are correctly filled.
- Permission Denied: If the API returns permission errors, verify that the authenticated user has sufficient rights to modify the specified GTM workspace.
- Invalid Built-In Variable Type: Ensure the selected built-in variable type exists and is enabled in the workspace; otherwise, the delete operation may fail.
- API Rate Limits: Frequent calls may hit Google API rate limits; implement retries or backoff strategies if needed.
Links and References
- Google Tag Manager API Documentation
- Built-In Variables in Google Tag Manager
- Google OAuth2 Setup in n8n
This summary focuses on the "Delete 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 source code and provided property definitions.