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 Trigger resource and the Get Trigger operation, it retrieves detailed information about a specific GTM trigger within a container workspace.
Common scenarios where this node is beneficial include:
- Automating retrieval of trigger configurations for auditing or reporting.
- Integrating GTM trigger data into workflows for dynamic tag management.
- Synchronizing trigger settings across environments or containers.
For example, you can use this node to fetch a trigger's details by specifying the Account ID, Container ID, Workspace ID, and Trigger ID, then use that data downstream in your automation workflow.
Properties
| Name | Meaning |
|---|---|
| Account ID | The unique identifier of the GTM Account containing the trigger. |
| Container ID | The unique identifier of the GTM Container where the trigger resides. |
| Workspace ID | The unique identifier of the GTM Workspace within the container. |
| Trigger ID | The unique identifier of the GTM Trigger to retrieve. |
| Optional Query Parameters | Additional optional parameters to customize the API request. |
The Optional Query Parameters collection supports various fields, but for the "Get Trigger" operation, typically no additional parameters are required.
Output
The output is a JSON array where each item corresponds to the retrieved trigger object from GTM. The structure of the trigger object follows the Google Tag Manager API specification for triggers, including properties such as:
triggerId: The ID of the trigger.name: The name of the trigger.type: The type of trigger (e.g., click, page view).filter: Conditions defining when the trigger fires.- Other metadata related to the trigger configuration.
No binary data is output by this node.
Dependencies
- Requires an OAuth2 credential configured for Google Tag Manager API access.
- The node uses the Google Tag Manager API base URL:
https://www.googleapis.com/tagmanager/v2. - Proper permissions on the GTM account and container are necessary to retrieve trigger information.
Troubleshooting
- Missing Credentials Error: If the node throws an error about missing credentials, ensure that a valid Google Tag Manager OAuth2 credential is configured and selected.
- Required Parameter Errors: The node validates presence of Account ID, Container ID, Workspace ID, and Trigger ID. Missing any of these will cause an error. Double-check that all IDs are correctly provided.
- API Errors: Errors returned from the GTM API (e.g., permission denied, not found) will be surfaced with messages prefixed by "Error calling GTM API". Verify that the specified IDs exist and that the authenticated user has access.
- Unknown Operation Error: This should not occur if the operation is set correctly to "Get Trigger". If it does, verify the operation parameter.
Links and References
- Google Tag Manager API Documentation - Triggers
- Google Tag Manager Official Site
- n8n OAuth2 Credential Setup Guide
This summary focuses exclusively on the "Trigger" resource and the "Get Trigger" operation as requested.