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 within n8n workflows. Specifically, for the User Permission resource and the Update User Permissions operation, it enables updating a user's access permissions on a GTM account. This is useful in scenarios where you need to automate permission management, such as granting or modifying user roles across multiple GTM accounts or containers without manual intervention.
Practical examples include:
- Automatically updating user permissions when onboarding new team members.
- Adjusting access rights based on role changes in an organization.
- 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. |
| Optional Query Parameters | Additional optional parameters that can modify the behavior of the update request. For example: - Allow User Permission Feature Update: Boolean flag to allow enabling user permission features. Other parameters are available but mostly relevant to other operations/resources. |
| Request Body | A JSON object representing the data to update the user permissions with. This typically includes the new permission settings or roles to assign to the user. |
Output
The node outputs the JSON response from the Google Tag Manager API after performing the update operation. This JSON contains the updated user permission details, reflecting the changes made. The structure corresponds to the GTM API's user permission resource representation, including fields like user access levels and container access configurations.
No binary data output is involved in this operation.
Dependencies
- Requires a valid Google Tag Manager API OAuth2 credential configured in n8n to authenticate requests.
- The node uses the official GTM API endpoint
https://www.googleapis.com/tagmanager/v2. - Proper permissions on the Google Cloud project and GTM account are necessary to perform user permission updates.
Troubleshooting
- Missing Credentials Error: If the node throws an error about missing credentials, ensure that a valid Google Tag Manager OAuth2 credential is set up and connected in n8n.
- Required Parameter Errors: The node validates required parameters such as Account ID and User Permissions ID. Missing these will cause errors. Double-check that these IDs are correctly provided.
- Permission Denied: If the API returns permission errors, verify that the authenticated user has sufficient rights to update user permissions on the specified GTM account.
- Feature Update Flag: When updating user permissions involving enabling the user permission feature, the
allowUserPermissionFeatureUpdateflag must be set to true; otherwise, the operation will fail. - API Rate Limits: Frequent updates may hit Google API rate limits. Implement retry logic or reduce request frequency if encountering quota errors.