Actions27
- Account Actions
- Built-In Variable Actions
- Client Actions
- Container Actions
- Destination Actions
- Environment Actions
Environment → List Environments
AI-generatedOverview
This node interacts with the Google Tag Manager (GTM) API to list all environments of a specified GTM container. It is useful for users who want to retrieve and manage the environments within their GTM containers programmatically. For example, a user can list all environments to audit or automate environment-related workflows in GTM.
Use Case Examples
- List all environments of a GTM container by providing the GTM Account ID and Container ID.
- Use the node to fetch environment details for automation or reporting purposes.
Properties
| Name | Meaning |
|---|---|
| Account ID | The GTM Account ID to specify which account's environments to list. |
| Container ID | The GTM Container ID to specify which container's environments to list. |
| Optional Query Parameters | Additional optional parameters to customize the API request, such as pagination or filtering options. |
Output
JSON
environmentId- The unique identifier of the GTM Environment.name- The name of the GTM Environment.description- Description of the GTM Environment.url- The URL associated with the GTM Environment.type- The type of the GTM Environment.authorizationCode- Authorization code for the GTM Environment, if applicable.
Dependencies
- Google Tag Manager API OAuth2 credentials
Troubleshooting
- Ensure that the GTM Account ID and Container ID are provided; missing these will cause errors.
- Verify that the OAuth2 credentials for Google Tag Manager API are correctly set up and authorized.
- Check for correct permissions on the GTM account to list environments.
- Common error messages include missing required parameters (Account ID, Container ID) and authorization failures; resolving these involves providing the missing parameters and ensuring valid credentials.
Links
- Google Tag Manager API - List Environments - Official documentation for the List Environments endpoint in the Google Tag Manager API.