Google Tag Manager icon

Google Tag Manager

Use the Google Tag Manager API

Actions102

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 List User Permissions operation, it lists all users who have access to a specified GTM account along with their granted Account and Container user access permissions.

This functionality is beneficial in scenarios where an organization needs to audit or review user access rights across GTM accounts, ensuring proper permission management and compliance. For example, a marketing team lead might use this node to retrieve a list of all users with access to their GTM account to verify that only authorized personnel have editing rights.

Properties

Name Meaning
Account ID The unique identifier of the GTM Account for which user permissions are to be listed. This is required to specify the scope of the query.
Optional Query Parameters Additional optional parameters to customize the request. For the "List User Permissions" operation, these can include:
- Allow User Permission Feature Update (boolean): Must be true to allow certain feature updates.
- Include Google Tags (boolean): Whether to also retrieve accounts associated with Google Tag.
- Page Token (string): Continuation token for fetching the next page of results if pagination is needed.

Note: Although many optional query parameters exist in the full property definition, most are irrelevant for the "List User Permissions" operation except those mentioned above.

Output

The output is a JSON array where each element represents a user permission entry associated with the specified GTM account. Each entry includes details about the user and their access levels at both the account and container scopes.

The structure typically contains fields such as:

  • User identifier (e.g., email)
  • Account-level permissions
  • Container-level permissions (if any)
  • Other metadata related to the user's access

No binary data output is involved in this operation.

Dependencies

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

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.
  • Missing Account ID: The operation requires the Account ID; omitting it will cause an error indicating the Account ID is required.
  • API Errors: Errors returned from the Google API (e.g., permission denied, invalid token) will be surfaced with messages prefixed by "Error calling GTM API". Check the provided message and stack trace for details.
  • Pagination Handling: If the result set is large, use the "Page Token" optional parameter to fetch subsequent pages.

Links and References


This summary focuses on the "User Permission" resource and the "List User Permissions" operation as requested, based on static analysis of the provided source code and input properties.

Discussion