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, specifically enabling management of GTM Clients within a workspace. The "Create Client" operation allows users to create a new client entity inside a specified GTM account, container, and workspace. This is useful for automating the setup or modification of GTM clients programmatically, such as when managing multiple GTM environments or deploying configurations at scale.
Practical examples include:
- Automatically creating new GTM clients during deployment pipelines.
- Managing GTM clients across different containers and workspaces without manual intervention.
- Integrating GTM client creation into broader marketing or analytics workflows.
Properties
| Name | Meaning |
|---|---|
| Account ID | The unique identifier of the GTM Account where the client will be created. |
| Container ID | The unique identifier of the GTM Container within the account where the client will be created. |
| Workspace ID | The unique identifier of the GTM Workspace within the container where the client will be created. |
| Optional Query Parameters | Additional optional parameters that can modify the behavior of the request. These include various flags and settings relevant to GTM operations, such as permission updates, types, IDs, copy settings, and more. |
| Request Body | A JSON object representing the body of the request, containing the details of the client to be created. This should conform to the expected structure defined by the GTM API for a client resource. |
Output
The output is a JSON array where each element corresponds to the response from the GTM API for the create client operation. Each JSON object represents the newly created client resource with its properties as returned by the GTM API.
The exact structure depends on the GTM API's client resource schema but typically includes identifiers, configuration details, and metadata about the client.
No binary data output is involved in this operation.
Dependencies
- Requires an active and valid OAuth2 credential for Google Tag Manager API access.
- The node uses the base URL
https://www.googleapis.com/tagmanager/v2for API requests. - Proper permissions must be granted to the OAuth2 credential to perform client creation within the specified GTM account, container, and workspace.
Troubleshooting
- Missing Credentials: If the OAuth2 credentials are not set or invalid, the node will throw an error indicating missing Google Tag Manager API credentials.
- Required Parameters Missing: The node validates required parameters (
Account ID,Container ID,Workspace ID) and will throw errors if any are missing. - Invalid Client Data: If the request body does not conform to the expected client schema, the GTM API may return errors which will be surfaced by the node.
- API Errors: Any errors returned by the GTM API (e.g., permission denied, quota exceeded) will be wrapped and reported with the message prefix "Error calling GTM API".
- Unknown Operation: If an unsupported operation is selected, the node throws an error indicating the unknown operation.
To resolve these issues:
- Ensure all required IDs are correctly provided.
- Verify OAuth2 credentials have appropriate scopes and permissions.
- Validate the JSON structure of the request body against GTM API documentation.
- Check API quotas and limits in the Google Cloud Console.