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 Google Tag Configurations among many other GTM resources. The "Create Google Tag Configuration" operation allows users to create a new Google Tag configuration within a specified GTM account, container, and workspace.
Common scenarios for this node include automating the setup and management of Google Tag configurations in GTM environments, which is useful for digital marketers and developers who want to programmatically manage tags without manually using the GTM web interface. For example, it can be used to create new tag configurations as part of a deployment pipeline or to synchronize tag settings across multiple containers.
Properties
| Name | Meaning |
|---|---|
| Account ID | The GTM Account ID where the Google Tag Configuration will be created. |
| Container ID | The GTM Container ID within the account where the configuration will be created. |
| Workspace ID | The GTM Workspace ID inside the container where the configuration will be created. |
| Optional Query Parameters | Additional optional parameters that can modify the request behavior. These include: - Allow User Permission Feature Update (boolean) - Built-In Variable Type (many predefined options) - Copy Settings (boolean) - Copy Terms Of Service (boolean) - Copy Users (boolean) - Destination ID (string) - Fingerprint (string) - Include Google Tags (boolean) - Page Token (string) - Setting Source (options: current, other, unspecified) - Tag ID (string) - Tag Name (string) - Trigger ID (string) - Variable ID (string) |
| Request Body | JSON object representing the body of the request to create the Google Tag Configuration. This should contain the configuration details according to the GTM API specification. |
Output
The output is a JSON array containing the response from the Google Tag Manager API after creating the Google Tag Configuration. The structure corresponds to the Google Tag Configuration resource as defined by the GTM API, typically including fields such as the configuration's unique ID, name, parameters, and metadata.
No binary data output is produced by this operation.
Dependencies
- Requires an OAuth2 credential configured for Google Tag Manager API access.
- The node uses the Google Tag Manager API base URL:
https://www.googleapis.com/tagmanager/v2. - Proper permissions on the GTM account, container, and workspace are necessary to perform creation operations.
Troubleshooting
- Missing Credentials Error: If the node throws an error about missing credentials, ensure that a valid OAuth2 credential for Google Tag Manager API is configured in n8n.
- Required Parameter Missing: Errors indicating missing Account ID, Container ID, or Workspace ID mean these must be provided for the operation to succeed.
- API Errors: Any errors returned by the GTM API will be wrapped and shown with the prefix "Error calling GTM API". Check the message and stack trace for details.
- Invalid Request Body: Ensure the JSON in the Request Body property is correctly formatted and contains all required fields as per the GTM API documentation for Google Tag Configurations.