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, for the Client resource and the Delete Client operation, it enables deleting a specific client within a GTM container workspace.
Typical use cases include automating the cleanup or management of GTM clients as part of deployment pipelines or administrative workflows. For example, if a client configuration is no longer needed or was created erroneously, this node can delete it automatically without manual intervention in the GTM UI.
Properties
| Name | Meaning |
|---|---|
| Account ID | The GTM Account ID where the client exists. |
| Container ID | The GTM Container ID within the account. |
| Workspace ID | The GTM Workspace ID inside the container. |
| Client ID | The specific GTM Client ID to delete. |
| Optional Query Parameters | Additional optional parameters that can modify the request behavior (e.g., feature flags). |
The Optional Query Parameters collection includes options such as:
- Allow User Permission Feature Update (boolean)
- Built-In Variable Type (multiple predefined options)
- Fingerprint (string)
- And many others related to GTM features and configurations.
Output
The output is a JSON array containing the response from the Google Tag Manager API after attempting to delete the specified client. Typically, for a delete operation, the API returns an empty response or confirmation of deletion. This node parses the JSON response and outputs it as the json field of the node's output data.
No binary data output is involved in this operation.
Dependencies
- Requires valid Google Tag Manager API credentials configured in n8n (an OAuth2 API credential).
- The node uses the Google Tag Manager v2 REST API endpoint:
https://www.googleapis.com/tagmanager/v2. - Proper permissions on the GTM account are necessary to perform delete operations on clients.
Troubleshooting
- Missing Credentials Error: If the node throws "Missing Google Tag Manager API Credentials," ensure that the OAuth2 credentials for Google Tag Manager are properly set up and connected.
- Required Parameter Errors: The node validates required parameters like Account ID, Container ID, Workspace ID, and Client ID. Missing any of these will cause an error indicating which parameter is missing.
- API Errors: Errors returned by the GTM API (e.g., insufficient permissions, invalid IDs) will be surfaced with messages prefixed by "Error calling GTM API." Check the provided IDs and user permissions.
- Unknown Operation: If an unsupported operation is selected, the node will throw an "Unknown operation" error.
Links and References
This summary focuses on the Client resource and the Delete Client operation as requested.