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, allowing users to manage various GTM resources programmatically. Specifically, for the Destination resource and the List Destinations operation, it lists all destinations linked to a specified GTM Container within a GTM Account.
This operation is useful when you want to retrieve all destination configurations associated with a particular container in your GTM setup. For example, you might use this to audit or synchronize destination settings across environments or automate reporting on GTM destinations.
Properties
| Name | Meaning |
|---|---|
| Account ID | The unique identifier of the GTM Account that owns the container. |
| Container ID | The unique identifier of the GTM Container whose destinations you want to list. |
| Optional Query Parameters | Additional optional parameters to refine or control the request. These include: |
| - Allow User Permission Feature Update (boolean): Allows user permission feature updates. | |
| - Built-In Variable Type (options): Various built-in variable types (not typically used here). | |
| - Container ID (string): ID of another container (not typical for listing destinations). | |
| - Container Version ID (string): Specific container version to target. | |
| - Copy Settings, Copy Terms Of Service, Copy Users (booleans): Flags related to copying tags. | |
| - Destination ID (string): Specific destination ID (only one of destination_id or tag_id set). | |
| - Fingerprint (string): Used for concurrency control. | |
| - Include Google Tags (boolean): Whether to include accounts associated with Google Tag. | |
| - Page Token (string): Token for paginated results. | |
| - Setting Source (options): Source of config setting after combine. | |
| - Tag ID, Tag Name, Trigger ID, Variable ID (strings): IDs/names related to other GTM entities. |
For the List Destinations operation specifically, the required properties are:
- Account ID: Your GTM Account ID.
- Container ID: Your GTM Container ID.
Optional query parameters can be provided but are generally not required for basic listing.
Output
The output is a JSON array where each item represents a destination linked to the specified GTM Container. Each destination object contains details as returned by the GTM API, such as destination identifiers, configuration details, and metadata.
No binary data is output by this node.
Example output structure (simplified):
[
{
"destinationId": "string",
"name": "string",
"type": "string",
"linkedContainerId": "string",
"parameters": { /* destination-specific parameters */ },
...
},
...
]
Dependencies
- Requires an active connection to the Google Tag Manager API via OAuth2 authentication.
- The node expects valid credentials configured in n8n for accessing the Google Tag Manager API.
- Network access to
https://www.googleapis.com/tagmanager/v2is necessary.
Troubleshooting
- Missing Credentials Error: If the node throws an error about missing credentials, ensure that the Google Tag Manager API OAuth2 credentials are properly set up in n8n.
- Required Parameter Errors: The node validates presence of required parameters like Account ID and Container ID. Missing these will cause errors; double-check input values.
- API Rate Limits or Permissions: If the API returns permission errors or rate limit issues, verify that the authenticated user has sufficient permissions on the GTM account and that quota limits are not exceeded.
- Invalid Page Token: When using pagination, an invalid or expired page token may cause errors. Use tokens exactly as returned by previous calls.