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 providing functionality to manage GTM Zones among many other resources. The "Get Zone" operation retrieves detailed information about a specific GTM Zone within a workspace of a container in a GTM account.
Typical use cases include:
- Fetching configuration details of a particular zone for auditing or reporting.
- Automating workflows that require validation or synchronization of GTM zones.
- Integrating GTM zone data into broader marketing or analytics automation pipelines.
For example, you might use this node to programmatically retrieve a zone's settings before updating or deploying changes across multiple GTM containers.
Properties
| Name | Meaning |
|---|---|
| Account ID | The unique identifier of the GTM Account containing the zone. |
| 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 zone resides. |
| Zone ID | The unique identifier of the GTM Zone to retrieve. |
| Optional Query Parameters | Additional optional parameters for the request; includes options like allowUserPermissionFeatureUpdate and others (not typically used for Get Zone). |
Output
The output is a JSON object representing the retrieved GTM Zone resource. This JSON contains all the properties and configuration details of the specified zone as returned by the Google Tag Manager API.
The structure corresponds directly to the GTM Zone resource schema, including fields such as zone name, description, boundary definitions, and any associated tags or triggers configured within the zone.
No binary data output is involved in this operation.
Dependencies
- Requires an OAuth2 API credential for Google Tag Manager to authenticate requests.
- The node uses the official Google Tag Manager API endpoint:
https://www.googleapis.com/tagmanager/v2. - Proper permissions on the GTM account are necessary to access zone details.
Troubleshooting
- Missing Required IDs: If Account ID, Container ID, Workspace ID, or Zone ID is not provided, the node will throw an error indicating which ID is missing. Ensure all these identifiers are correctly set.
- Authentication Errors: If the OAuth2 credentials are missing or invalid, the node will fail to authenticate. Verify that the Google Tag Manager API credentials are properly configured in n8n.
- API Errors: Errors from the GTM API (e.g., zone not found, permission denied) will be surfaced with messages prefixed by "Error calling GTM API". Check the GTM account permissions and the correctness of the IDs.
- Unknown Operation: If the operation parameter is incorrect or unsupported, the node will throw an "Unknown operation" error.