Google Tag Manager icon

Google Tag Manager

Use the Google Tag Manager API

Actions84

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 Delete User Permissions operation, it enables the removal of a user's permissions from a GTM account. This revokes the user's access to the account and all its containers.

Common scenarios where this node is beneficial include automating user access management in GTM accounts, such as removing permissions when an employee leaves an organization or when access needs to be restricted based on role changes.

Practical example:

  • Automatically revoke a user's GTM access after their departure by deleting their user permissions using their User Permissions ID and Account ID.

Properties

Name Meaning
Account ID The unique identifier of the Google Tag Manager account from which the user permission will be deleted.
User Permissions ID The unique identifier of the user permission entry to delete. This identifies the specific user's access to be revoked.
Optional Query Parameters Additional optional parameters that can modify the behavior of the request. For this operation, the relevant parameter is:
Allow User Permission Feature Update: Boolean flag to allow feature updates related to user permissions; must be true to enable certain changes.

Output

The output is a JSON array containing the response from the Google Tag Manager API after attempting to delete the specified user permission. Typically, for a delete operation, the API returns an empty object {} or confirmation of deletion.

No binary data is output by this node.

Example output:

[{}]

Dependencies

  • Requires an OAuth2 API credential configured for Google Tag Manager API access.
  • The node uses the Google Tag Manager API base URL: https://www.googleapis.com/tagmanager/v2.
  • Proper permissions on the Google Cloud project and GTM account are necessary to perform user permission deletions.

Troubleshooting

  • Missing Credentials Error: If the node throws an error about missing credentials, ensure that a valid OAuth2 credential for Google Tag Manager API is configured and connected.
  • Required Parameter Errors: The node requires both the Account ID and User Permissions ID to be provided. Omitting these will cause errors indicating the missing parameter.
  • Permission Denied: If the authenticated user does not have sufficient rights to delete user permissions, the API will return an authorization error. Verify that the OAuth2 token has appropriate scopes and that the user has admin-level access.
  • Allow User Permission Feature Update Flag: If the operation fails due to feature update restrictions, ensure the "Allow User Permission Feature Update" optional parameter is set to true.

Links and References


This summary focuses on the "User Permission" resource and the "Delete User Permissions" operation as requested, based on static analysis of the provided source code and property definitions.

Discussion