Actions27
- Account Actions
- Built-In Variable Actions
- Client Actions
- Container Actions
- Destination Actions
- Environment Actions
Environment → Get Environment
AI-generatedOverview
This node interacts with the Google Tag Manager (GTM) API to manage GTM resources. Specifically, for the 'Environment' resource and 'Get Environment' operation, it retrieves details of a specific GTM Environment within a GTM Container. This is useful for users who want to fetch configuration or status information about a particular environment in their GTM setup, such as development, staging, or production environments.
Use Case Examples
- A user wants to get details about a specific GTM Environment to verify its settings or status before deploying changes.
- A user automates the retrieval of environment details to integrate with other systems or for reporting purposes.
Properties
| Name | Meaning |
|---|---|
| Account ID | The GTM Account ID to identify the account containing the environment. |
| Container ID | The GTM Container ID to identify the container within the account. |
| Environment ID | The GTM Environment ID to specify which environment to retrieve. |
| Optional Query Parameters | Additional optional parameters to customize the API request, such as flags or filters. |
Output
JSON
environmentId- The ID of the GTM Environment retrieved.name- The name of the GTM Environment.url- The URL associated with the GTM Environment.authorizationCode- Authorization code for the environment, if applicable.authorizationTimestamp- Timestamp of the last authorization.type- Type of the environment (e.g., live, preview, etc.).
Dependencies
- Google Tag Manager API OAuth2 credentials
Troubleshooting
- Ensure that the Account ID, Container ID, and Environment ID are correctly provided; missing any of these will cause errors.
- Check that the Google Tag Manager API credentials are properly configured and authorized.
- If the API returns an error, verify that the environment exists and that the user has permission to access it.
- Common error messages include missing required parameters or unauthorized access; resolving these typically involves correcting input parameters or updating credentials.
Links
- Google Tag Manager API - Get Environment - Official documentation for the Get Environment operation in the GTM API.