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 User Permission resource and the Update User Permissions operation, it enables updating a user's access permissions on a GTM account and its containers. This is useful in scenarios where you need to automate permission management, such as onboarding or offboarding team members, or dynamically adjusting access rights based on workflow conditions.
Practical examples include:
- Automatically updating user permissions when a new project starts.
- Revoking or modifying access rights after a role change.
- Synchronizing user permissions across multiple GTM accounts via automation.
Properties
| Name | Meaning |
|---|---|
| Account ID | The unique identifier of the GTM Account where the user permissions will be updated. |
| User Permissions ID | The unique identifier of the specific user permission entry to update within the GTM Account. |
| Optional Query Parameters | Additional optional parameters that can modify the behavior of the update request. For example: - allowUserPermissionFeatureUpdate: Boolean flag to allow enabling user permission features.Other parameters are available but mostly unrelated to this operation. |
| Request Body | A JSON object representing the data to update the user permissions. This typically includes the new permission settings and access levels for the user. |
Output
The node outputs an array of JSON objects representing the response from the Google Tag Manager API after updating the user permissions. The structure corresponds to the updated user permission resource returned by the API, which generally includes details such as user access levels, account ID, container access, and other metadata related to the user's permissions.
No binary data output is involved.
Dependencies
- Requires valid Google Tag Manager API credentials configured in n8n (an OAuth2 API credential).
- Internet access to call the Google Tag Manager API endpoint at
https://www.googleapis.com/tagmanager/v2. - Proper permissions on the Google Tag Manager account to update user permissions.
Troubleshooting
- Missing Credentials Error: If the node throws an error about missing credentials, ensure that the Google Tag Manager API OAuth2 credentials are properly set up and connected in n8n.
- Required Parameter Errors: The node validates required parameters like Account ID and User Permissions ID. Missing these will cause errors. Double-check that these IDs are correctly provided.
- API Permission Denied: If the authenticated user does not have sufficient rights to update user permissions, the API will return an error. Verify that the OAuth2 token has the necessary scopes and that the user has admin or appropriate access.
- Invalid Request Body: Ensure the JSON in the Request Body is well-formed and matches the expected schema for user permissions updates. Invalid JSON or incorrect fields may cause API errors.
- Feature Update Flag: When updating user permissions that enable the
features.user_permissionsfeature, theallowUserPermissionFeatureUpdatequery parameter must be set to true; otherwise, the operation will fail.
Links and References
- Google Tag Manager API Documentation - User Permissions
- Google Tag Manager API Overview
- Google OAuth 2.0 Guide
If you need further details on other operations or resources, feel free to ask!