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. Specifically, for the Folder resource and the Move Entities to a Folder operation, it allows moving entities such as triggers, variables, or tags into a specified GTM folder within a workspace. This is useful for organizing GTM entities efficiently, grouping related items together for better management and clarity.
Common scenarios include:
- Organizing newly created tags, triggers, or variables into folders automatically.
- Reorganizing existing GTM workspace entities by moving them between folders.
- Cleaning up workspaces by moving orphaned entities out of folders (using folder ID 0).
Example use case:
- After creating multiple triggers and variables in a GTM workspace, you can use this node to move all these entities into a specific folder to keep the workspace tidy.
Properties
| Name | Meaning |
|---|---|
| Account ID | The GTM Account ID where the folder and entities reside. |
| Container ID | The GTM Container ID containing the workspace and folder. |
| Workspace ID | The GTM Workspace ID within the container where the folder exists. |
| Folder ID | The GTM Folder ID to which entities will be moved. If set to "0", entities are moved out of folders. |
| Trigger ID | The ID(s) of the trigger entities to move to the folder. |
| Variable ID | The ID(s) of the variable entities to move to the folder. |
| Optional Query Parameters | Additional optional parameters for the API call (not typically required for this operation). |
Output
The output is a JSON array containing the response from the Google Tag Manager API after attempting to move the specified entities to the folder. The structure corresponds to the API's response object for the move operation, typically including details about the moved entities or confirmation of the action.
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 v2 endpoint:
https://www.googleapis.com/tagmanager/v2. - Proper permissions on the GTM account, container, and workspace are necessary to perform folder entity moves.
Troubleshooting
- Missing Required IDs: Errors will occur if any of the required IDs (Account ID, Container ID, Workspace ID, Folder ID) are missing. Ensure all are provided.
- Invalid Folder ID: Using an incorrect or non-existent Folder ID will cause the API to fail. Verify folder existence before moving entities.
- Entity IDs Missing or Incorrect: If no valid Trigger ID or Variable ID is provided, the move operation may not affect any entities or return an error.
- API Credential Issues: If the OAuth2 credentials are missing or invalid, authentication errors will occur.
- Permission Denied: Insufficient permissions on the GTM account or container will result in authorization errors.
- Error Messages: The node wraps API errors with messages like
Error calling GTM API: <error message>. Check the detailed error message and stack trace for troubleshooting.
Links and References
If you need further details on other operations or resources, feel free to ask!