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, enabling users to manage various GTM resources programmatically within n8n workflows. Specifically, the "Move Tag ID Container" operation under the "Container" resource allows moving a tag ID out of a specified GTM container. This can be useful for reorganizing tags across containers or managing tag deployments efficiently.
Common scenarios include:
- Migrating tags between containers during GTM restructuring.
- Automating tag management tasks in large-scale GTM setups.
- Integrating GTM tag operations into broader automation workflows.
Example: Automatically move a specific tag from one container to another as part of a deployment pipeline.
Properties
| Name | Meaning |
|---|---|
| Account ID | The GTM Account ID where the container resides. Required to identify the account context for the operation. |
| Container ID | The GTM Container ID from which the tag ID will be moved. Identifies the source container. |
| Optional Query Parameters | Additional optional parameters to customize the operation. Includes: - Allow User Permission Feature Update (boolean): Allows user permissions feature update. - Built-In Variable Type (many options): Type of built-in variable. - Container ID (string): ID of container to merge. - Container Version ID (string): Specific container version. - Copy Settings (boolean): Whether to copy tag settings. - Copy Terms Of Service (boolean): Must be true to accept terms copied. - Copy Users (boolean): Whether to copy users. - Destination ID (string): Destination linked to a container. - Fingerprint (string): Must match stored fingerprint. - Include Google Tags (boolean): Include accounts associated with Google Tag. - Page Token (string): For pagination. - Setting Source (options): Source of config setting after combine. - Tag ID (string): Tag ID to move (only one of destination_id or tag_id should be set). - Tag Name (string): Name for newly created tag. - Trigger ID (string): Triggers to move. - Variable ID (string): Variables to move. |
Output
The node outputs an array of JSON objects representing the response from the Google Tag Manager API for the executed operation. For the "Move Tag ID Container" operation, this typically includes details about the moved tag or confirmation of the move action.
The output JSON structure corresponds directly to the GTM API response and may include fields such as tag identifiers, status, and metadata related to the move operation.
No binary data output is involved in this operation.
Dependencies
- Requires a valid Google Tag Manager API OAuth2 credential configured in n8n.
- The node uses the Google Tag Manager v2 REST API endpoint (
https://www.googleapis.com/tagmanager/v2). - Proper permissions on the GTM account and containers are necessary to perform move operations.
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 connected.
- Required Parameter Errors: The node validates required parameters like Account ID and Container ID. Missing these will cause errors. Double-check that all mandatory fields are filled.
- Permission Denied: Insufficient permissions on the GTM account or container may result in API errors. Verify that the authenticated user has appropriate access rights.
- Invalid Tag ID or Container ID: Providing incorrect IDs will cause the API to fail. Confirm IDs are correct and exist in your GTM account.
- Operation Not Supported: Using an unsupported or unknown operation value will throw an error. Ensure the operation name matches exactly as defined.
Links and References
- Google Tag Manager API Documentation
- Google Tag Manager API Reference for Containers
- n8n OAuth2 Credential Setup
If you need further details on other operations or resources, feel free to ask!