Overview
The Google Cloud Storage Enhanced node allows you to interact with Google Cloud Storage buckets directly from n8n workflows.
For the Bucket → Update operation, this node updates the metadata and configuration of an existing bucket in your Google Cloud project.
Typical use cases include:
- Modifying bucket settings such as labels, lifecycle rules, or access controls.
- Changing storage class, location, or enabling/disabling features like versioning or logging.
- Automating infrastructure management by updating bucket configurations as part of a workflow.
Example:
Automatically update the retention policy and add new labels to a bucket when a compliance requirement changes.
Properties
| Name | Type | Meaning |
|---|---|---|
| Authentication | options | Selects the authentication method: Service Account or OAuth2. |
| Bucket Name | string | The name of the bucket to update. |
| Projection | options | Determines which properties are returned in the response: All Properties or No ACL. |
| Filters | collection | Optional filters for conditional updates (e.g., metageneration match/exclude). |
| Predefined Access Control | collection | Set predefined access control lists (ACL) for the bucket and default object ACLs. |
| Additional Parameters | collection | Collection of advanced bucket metadata and configuration fields to update (see below). |
Additional Parameters (within "Additional Parameters" collection):
- Access Control (json): Custom access controls on the bucket.
- Billing (json): Billing configuration for the bucket.
- CORS (json): Cross-Origin Resource Sharing configuration.
- Custom Placement Config (json): Region(s) configuration for the bucket.
- Data Locations (json): List of regions for dual-region buckets.
- Default Event Based Hold (boolean): Whether to automatically apply event-based hold to new objects.
- Default Object ACL (json): Default access controls for new objects.
- Encryption (json): Encryption configuration.
- IAM Configuration (json): IAM configuration for the bucket.
- Labels (json): User-defined key/value labels.
- Lifecycle (json): Lifecycle configuration for automatic object management.
- Location (string): Physical location of the bucket.
- Logging (json): Logging configuration.
- Retention Policy (json): Retention policy for objects in the bucket.
- Recovery Point Objective (string): RPO setting for the bucket.
- Storage Class (string): Default storage class for new objects.
- Versioning (json): Versioning configuration.
- Website (json): Website hosting configuration.
Output
- The output is a JSON object representing the updated bucket's metadata and configuration as returned by the Google Cloud Storage API.
- If an error occurs and "Continue On Fail" is enabled, the output will be:
{ "error": "Error message here" }
Typical output fields include:
id: Unique identifier for the bucket.name: Name of the bucket.location: Location of the bucket.storageClass: Storage class of the bucket.labels: Key-value pairs of user-defined labels.lifecycle: Lifecycle rules.- ...and other fields depending on the updated properties and projection.
Dependencies
- Google Cloud Project with Storage API enabled.
- Authentication: Requires either a Service Account credential or OAuth2 credential configured in n8n.
- n8n Credentials:
googleApi(for Service Account)googleCloudStorageOAuth2Api(for OAuth2)
Troubleshooting
Common Issues:
- Invalid credentials: Ensure that the selected authentication method is properly configured in n8n and has sufficient permissions.
- Bucket not found: Double-check the "Bucket Name" property for typos or non-existent buckets.
- Permission denied: The service account or OAuth2 user must have appropriate roles (e.g., Storage Admin).
- Metageneration mismatch: If using metageneration filters, ensure the value matches the current state of the bucket.
Common Error Messages:
"Error: Not Found": The specified bucket does not exist."Error: Permission denied": Insufficient permissions for the requested operation."Error: Precondition Failed": Metageneration filter did not match; check your filter values.
How to resolve:
- Verify credentials and permissions.
- Confirm bucket name and region.
- Remove or adjust filters if unsure about metageneration values.