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 User Permission resource and the Get User Permission operation, it retrieves detailed information about a user's access permissions on a GTM account and its containers.
This is useful in scenarios where you need to audit or verify user access rights within GTM accounts, automate permission checks, or integrate GTM user permission data into broader workflows such as compliance reporting or user management systems.
Example use case:
- Automatically fetch and log the permissions of a specific user on a GTM account before performing container updates, ensuring the user has the necessary access rights.
Properties
| Name | Meaning |
|---|---|
| Account ID | The unique identifier of the GTM Account from which to retrieve the user permission. |
| User Permissions ID | The unique identifier of the GTM User Permission entry to get details for. |
| Optional Query Parameters | Additional optional parameters that can modify the request behavior (not typically used here). |
Note: For the "Get User Permission" operation, only Account ID and User Permissions ID are required.
Output
The output is a JSON object representing the user permission details retrieved from the GTM API. This includes information about the user's access levels at the account and container scopes, such as roles and permissions granted.
The structure corresponds directly to the GTM API's user permission resource representation, typically including fields like:
accountId: The GTM account ID.userPermissionId: The ID of the user permission.emailAddress: The email address of the user.permissions: Details about the access granted (e.g., account-level and container-level permissions).
No binary data is output by this node.
Dependencies
- Requires an OAuth2 credential configured for Google Tag Manager API access.
- The node uses the official GTM API base URL:
https://www.googleapis.com/tagmanager/v2. - Proper permissions must be granted to the OAuth2 token to read user permissions.
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 required parameters such as Account ID and User Permissions ID. Missing these will cause errors; ensure these IDs are correctly provided.
- API Permission Denied: If the OAuth2 token lacks sufficient permissions, the API call will fail. Verify that the authenticated user has the necessary GTM permissions.
- Unknown Operation Error: This node supports many operations; specifying an unsupported operation will cause an error. Confirm the operation name is correct.
- Network or API Errors: Standard network issues or API rate limits may cause failures. Check connectivity and API quotas.
Links and References
- Google Tag Manager API Documentation - User Permissions
- Google Tag Manager API Overview
- n8n OAuth2 Credential Setup
If you need details on other operations or resources, feel free to ask!