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. Specifically, for the Destination resource and the Get Destination operation, it retrieves details about a specific destination linked to a GTM container.
Typical use cases include:
- Fetching configuration details of a particular destination within a GTM container.
- Automating workflows that require validation or inspection of GTM destinations.
- Integrating GTM destination data into broader automation pipelines for marketing or analytics.
For example, a user might want to retrieve the settings of a destination linked to a container to verify its setup before publishing changes.
Properties
| Name | Meaning |
|---|---|
| Account ID | The Google Tag Manager Account ID where the container and destination reside. |
| Container ID | The GTM Container ID that contains the destination. |
| Destination Link ID | The unique identifier of the Google Tag Destination Link to retrieve. |
| Optional Query Parameters | Additional optional parameters to customize the request. For this operation, typically empty. |
Details on Required Properties for "Get Destination" Operation:
- Account ID: Must be provided to specify which GTM account to query.
- Container ID: Must be provided to specify the container within the account.
- Destination Link ID: Must be provided to identify the exact destination link to fetch.
Output
The output is a JSON object representing the retrieved destination's details from the GTM API. This includes all properties and metadata associated with the destination as defined by the Google Tag Manager API.
The node returns an array of such JSON objects (usually one per input item), each containing the full response from the API for the requested destination.
No binary data is involved in this operation.
Dependencies
- Requires valid Google Tag Manager API credentials configured in n8n using OAuth2 authentication.
- The node uses the Google Tag Manager v2 REST API endpoint (
https://www.googleapis.com/tagmanager/v2). - Proper permissions on the Google account to access the specified GTM account, container, and destination.
Troubleshooting
- Missing Credentials Error: If the node throws an error about missing credentials, ensure that the Google Tag Manager OAuth2 API credentials are properly set up in n8n.
- Required Parameter Errors: The node validates required parameters like Account ID, Container ID, and Destination Link ID. Missing any of these will cause an error. Double-check that these IDs are correctly provided.
- API Errors: Errors returned from the Google API (e.g., permission denied, not found) will be surfaced with messages prefixed by "Error calling GTM API". Verify that the account has access to the requested resources and that the IDs are correct.
- Unknown Operation: If an unsupported operation is selected, the node will throw an error indicating the unknown operation.
Links and References
- Google Tag Manager API Documentation
- Google Tag Manager Destinations Resource
- n8n OAuth2 Credential Setup
This summary focuses on the "Destination" resource and the "Get Destination" operation as requested, based on static analysis of the provided source code and property definitions.