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
The "Get Folder" operation of the Google Tag Manager (GTM) node retrieves detailed information about a specific folder within a GTM workspace. This is useful when you want to access metadata or configuration details of a particular folder in your GTM container workspace.
Typical use cases include:
- Fetching folder details to audit or review its properties.
- Using folder information as part of an automated workflow that manages GTM entities.
- Integrating GTM folder data into reporting or monitoring systems.
For example, you might use this operation to get the name, path, or other attributes of a folder before moving tags or triggers into it programmatically.
Properties
| Name | Meaning |
|---|---|
| Account ID | The unique identifier of the GTM Account containing the folder. |
| Container ID | The unique identifier of the GTM Container where the folder resides. |
| Workspace ID | The unique identifier of the GTM Workspace within the container. |
| Folder ID | The unique identifier of the GTM Folder to retrieve. |
| Optional Query Parameters | Additional optional parameters for the API request (none specifically required here). |
These properties are required to uniquely identify the folder resource in the GTM hierarchy: Account > Container > Workspace > Folder.
Output
The output is a JSON object representing the folder's details as returned by the GTM API. It typically includes fields such as:
name: The full API path of the folder.folderId: The folder's unique ID.name: The display name of the folder.notes: Any notes or description associated with the folder.- Other metadata related to the folder's configuration and state.
The output is provided as an array of JSON objects, each corresponding to one input item processed.
Dependencies
- Requires valid Google Tag Manager API credentials configured in n8n using OAuth2 authentication.
- The node makes authenticated HTTP requests to the GTM API endpoint at
https://www.googleapis.com/tagmanager/v2. - Proper permissions on the GTM account and container are necessary to access folder information.
Troubleshooting
- Missing Credentials: If the node throws an error about missing credentials, ensure that the Google Tag Manager OAuth2 API credentials are properly set up in n8n.
- Invalid or Missing IDs: Errors indicating missing Account ID, Container ID, Workspace ID, or Folder ID mean these inputs must be provided and valid.
- Permission Denied: If the API returns permission errors, verify that the authenticated user has sufficient access rights to the specified GTM account and container.
- Unknown Operation Error: This indicates a misconfiguration of the operation parameter; ensure "Get Folder" is selected under the Folder resource.