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
The "Update Workspace" operation in the Google Tag Manager (GTM) node allows users to update an existing workspace within a GTM container. This operation is useful for modifying workspace details such as its name or description, or applying changes that affect the workspace's configuration.
Common scenarios where this node is beneficial include:
- Automating updates to GTM workspaces as part of deployment pipelines.
- Integrating GTM workspace management into broader marketing or analytics workflows.
- Programmatically adjusting workspace settings without manual intervention in the GTM UI.
For example, a user might update a workspace to rename it or to apply new configurations before creating a container version from it.
Properties
| Name | Meaning |
|---|---|
| Account ID | The unique identifier of the GTM Account containing the workspace. |
| Container ID | The unique identifier of the GTM Container that holds the workspace. |
| Workspace ID | The unique identifier of the GTM Workspace to be updated. |
| Optional Query Parameters | Additional optional parameters to customize the request. For this operation, typically empty. |
| Request Body | A JSON object representing the updated properties of the workspace. This includes fields like name, description, or other workspace attributes as defined by the GTM API. |
Output
The output is a JSON object representing the updated workspace resource returned by the GTM API. It contains all the current properties of the workspace after the update, such as its ID, name, description, and any other metadata provided by the API.
Example structure (simplified):
{
"workspaceId": "string",
"name": "string",
"description": "string",
"path": "string",
"fingerprint": "string",
// ... other workspace properties ...
}
No binary data is output by this operation.
Dependencies
- Requires valid Google Tag Manager API credentials with OAuth2 authentication configured in n8n.
- The node uses the Google Tag Manager v2 REST API endpoint:
https://www.googleapis.com/tagmanager/v2. - Proper permissions on the GTM account, container, and workspace are necessary to perform update operations.
Troubleshooting
- Missing Required IDs: If Account ID, Container ID, or Workspace ID is not provided, the node will throw an error indicating the missing parameter. Ensure these IDs are correctly set.
- Invalid Request Body: Providing an improperly formatted JSON in the Request Body may cause API errors. Validate the JSON structure against the GTM API documentation.
- Authentication Errors: If OAuth2 credentials are missing or invalid, the node will fail. Verify that the Google Tag Manager OAuth2 credentials are properly configured and authorized.
- API Rate Limits or Quotas: Exceeding Google API quotas can result in errors. Monitor usage and apply appropriate backoff or retries if needed.
- Permission Denied: Insufficient permissions on the GTM account or container will cause authorization errors. Confirm that the authenticated user has edit rights on the workspace.