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. Specifically, the "Get Client" operation under the "Client" resource retrieves detailed information about a specific GTM Client within a container workspace.
Common scenarios for this node include:
- Automating retrieval of client configurations in GTM for auditing or reporting.
- Integrating GTM client data into workflows that require dynamic access to client details.
- Supporting DevOps or CI/CD pipelines by fetching client info before updates or deployments.
Example use case:
- A marketing automation workflow fetches a GTM Client's configuration to verify settings before triggering an update or deployment.
Properties
| Name | Meaning |
|---|---|
| Account ID | The unique identifier of the GTM Account containing the client. |
| Container ID | The unique identifier of the GTM Container where the client resides. |
| Workspace ID | The unique identifier of the GTM Workspace within the container. |
| Client ID | The unique identifier of the GTM Client to retrieve. |
| Optional Query Parameters | Additional optional parameters to customize the API request (e.g., feature flags). |
Details on input properties relevant to "Get Client":
- Account ID: Required to specify which GTM account to query.
- Container ID: Required to specify the container within the account.
- Workspace ID: Required to specify the workspace context.
- Client ID: Required to identify the specific client to get.
- Optional Query Parameters: Allows passing extra options as key-value pairs; typically not required for basic retrieval.
Output
The output is a JSON object representing the GTM Client resource retrieved from the API. It contains all the properties and metadata of the specified client as defined by the Google Tag Manager API.
The structure includes fields such as client name, type, parameter values, and other configuration details relevant to the GTM Client.
No binary data output is involved in this operation.
Dependencies
- Requires valid Google Tag Manager API credentials configured in n8n (an OAuth2 API credential).
- Internet access to call the Google Tag Manager API endpoint at
https://www.googleapis.com/tagmanager/v2. - Proper permissions on the GTM account to read client information.
Troubleshooting
- Missing Credentials Error: If the node throws an error about missing credentials, ensure that the Google Tag Manager API OAuth2 credentials are properly set up in n8n.
- Required Parameter Missing: Errors indicating missing Account ID, Container ID, Workspace ID, or Client ID mean these must be provided for the operation to succeed.
- API Errors: Errors returned from the GTM API (e.g., 404 Not Found) usually indicate invalid IDs or insufficient permissions.
- Network Issues: Connectivity problems can cause request failures; verify network access to Google's API endpoints.