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, allowing users to manage various GTM resources programmatically within n8n workflows. Specifically, the "List Built-In Variables" operation under the "Built-In Variable" resource retrieves all enabled built-in variables for a specified GTM container workspace.
Common scenarios where this node is beneficial include:
- Automating the retrieval of GTM built-in variables to audit or synchronize configurations.
- Integrating GTM data into other systems or dashboards.
- Managing GTM workspaces and containers as part of CI/CD pipelines or automated deployment processes.
For example, a user can list all enabled built-in variables in a particular GTM workspace to verify which variables are active before publishing changes.
Properties
| Name | Meaning |
|---|---|
| Account ID | The unique identifier of the GTM Account. |
| Container ID | The unique identifier of the GTM Container within the account. |
| Workspace ID | The unique identifier of the GTM Workspace within the container. |
| Optional Query Parameters | Additional optional parameters for the API request: |
| - Allow User Permission Feature Update | Boolean flag to allow updating user permission features (must be true to enable changes). |
| - Built-In Variable Type | Filter by type of built-in variable. Options include many GTM built-in variable types such as Advertiser ID, Click Classes, Page URL, etc. |
| - Container ID | ID of a container to merge or reference (used in some operations). |
| - Container Version ID | Specific container version ID, e.g., "published" to get the published version. |
| - Copy Settings | Whether to copy tag settings when creating new tags (true/false). |
| - Copy Terms Of Service | Must be true to accept terms of service agreements when copying tags. |
| - Copy Users | Whether to copy users from one tag to another (true/false). |
| - Destination ID | Destination ID linked to a GTM Container (mutually exclusive with Tag ID). |
| - Fingerprint | Fingerprint string to match stored account fingerprint for concurrency control. |
| - Include Google Tags | Whether to include accounts associated with Google Tag (true/false). |
| - Page Token | Token for pagination to fetch next page of results. |
| - Setting Source | Source of config setting after combining containers; options: Current, Other, Unspecified. |
| - Tag ID | Tag ID for a GTM Container (mutually exclusive with Destination ID). |
| - Tag Name | Name for newly created tag. |
| - Trigger ID | ID of trigger(s) to move to a folder. |
| - Variable ID | ID of variable(s) to move to a folder. |
Output
The output is a JSON array containing the response from the Google Tag Manager API for the requested operation. For the "List Built-In Variables" operation, the output includes an array of enabled built-in variables in the specified GTM workspace. Each item typically contains details such as variable name, type, and configuration metadata as returned by the GTM API.
No binary data output is involved in this operation.
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, container, and workspace are necessary to perform the operations.
Troubleshooting
- Missing Credentials Error: If the node throws an error about missing credentials, ensure that a valid Google Tag Manager API OAuth2 credential is set up and connected.
- Required Parameter Errors: Many operations require specific IDs (Account ID, Container ID, Workspace ID). Missing these will cause errors. Double-check that all required fields are filled.
- API Rate Limits or Permissions: If the API returns errors related to rate limits or insufficient permissions, verify the Google Cloud project quotas and the user's access rights in GTM.
- Unknown Operation Error: This indicates an invalid or unsupported operation was selected. Confirm the operation name matches the supported ones.
- Network or API Errors: General network issues or API downtime may cause failures. Check connectivity and Google API status.