Actions84
- 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
Overview
This node integrates with the Google Tag Manager (GTM) API, allowing users to manage various GTM resources programmatically within n8n workflows. Specifically, the "Delete Container" operation under the "Container" resource enables users to delete a specified GTM container from their account.
Common scenarios for this node include automating GTM container lifecycle management, such as creating, updating, or deleting containers as part of deployment pipelines or cleanup tasks. For example, a marketing team might automate the removal of outdated GTM containers when they are no longer needed, ensuring a tidy and manageable GTM environment.
Properties
| Name | Meaning |
|---|---|
| Account ID | The unique identifier of the Google Tag Manager account where the container resides. |
| Container ID | The unique identifier of the GTM container to be deleted. |
| Optional Query Parameters | Additional optional parameters that can modify the behavior of the delete operation. Options include: - Allow User Permission Feature Update (boolean): Must be true to allow user permissions feature changes. - Built-In Variable Type (various predefined options related to built-in variable types). - Container Version ID, Copy Settings, Copy Terms Of Service, Copy Users, Destination ID, Fingerprint, Include Google Tags, Page Token, Setting Source, Tag ID, Tag Name, Trigger ID, Variable ID (various optional parameters relevant to other operations but available here as optional query parameters). |
Note: For the "Delete Container" operation, the primary required properties are Account ID and Container ID. Other optional query parameters may be provided but are generally not necessary for deletion.
Output
The output is a JSON array containing the response from the Google Tag Manager API after attempting to delete the specified container. Typically, a successful delete operation returns an empty object or confirmation message indicating the container was deleted.
The json output field will contain the parsed JSON response from the API call. There is no binary data output for this operation.
Example output:
[{}]
Dependencies
- Requires an active Google Tag Manager API OAuth2 credential configured in n8n.
- The node uses the Google Tag Manager API endpoint
https://www.googleapis.com/tagmanager/v2. - Proper permissions on the Google Tag Manager account are necessary to perform delete operations on containers.
Troubleshooting
- Missing Credentials Error: If the node throws an error about missing credentials, ensure that a valid Google Tag Manager OAuth2 API credential is set up and connected.
- Required Parameter Errors: Errors like "GTM Account ID is required" or "GTM Container ID is required" indicate that these mandatory fields were not provided. Make sure to fill in these properties correctly.
- API Errors: Errors returned from the Google API (e.g., permission denied, container not found) will be surfaced by the node. Verify that the account has sufficient permissions and that the container ID exists.
- Allow User Permission Feature Update: If using optional query parameters related to user permissions, ensure that the flag
allowUserPermissionFeatureUpdateis set to true if the operation involves changing user permissions; otherwise, the operation may fail.
Links and References
- Google Tag Manager API Documentation
- Google Tag Manager Containers Resource
- Google Tag Manager OAuth2 Setup
This summary focuses on the "Delete Container" operation of the "Container" resource, describing its purpose, required inputs, outputs, dependencies, and common troubleshooting tips based on static analysis of the node's source code and provided property definitions.