Google Cloud Storage Enhanced icon

Google Cloud Storage Enhanced

Use the Google Cloud Storage API

Object → Update

AI-generated

Overview

This node interacts with Google Cloud Storage, specifically providing enhanced capabilities to manage buckets and objects within those buckets. The "Object Update" operation allows users to update metadata and properties of an existing object stored in a Google Cloud Storage bucket.

Common scenarios for this node include:

  • Modifying access control lists (ACLs) or permissions on an object.
  • Updating metadata such as cache control, content type, or custom user-defined metadata.
  • Changing retention policies or hold statuses on objects.
  • Adjusting encryption headers or other advanced parameters related to the object's storage.

Practical example: A user wants to update the content type and add custom metadata to an image file stored in a bucket without re-uploading the entire file. This node can perform that update efficiently.

Properties

Name Meaning
Authentication Method of authentication to use: either "Service Account" or "OAuth2".
Bucket Name The name of the Google Cloud Storage bucket containing the object to update.
Object Name The name (key) of the object within the bucket to update.
Projection Determines which properties are returned in the response after update. Options: "All Properties" (full), or "No ACL" (noAcl).
Update Fields Collection of fields to update on the object:
- Access Control (ACL) as JSON array
- Cache Control string
- Content Disposition string
- Content Encoding string
- Content Language string
- Content Type string
- Custom Time string
- Event Based Hold boolean
- Metadata as JSON object
- Temporary Hold boolean
Additional Parameters Optional query parameters to control conditional updates and predefined ACLs:
- Generation (number)
- Generation Match (number)
- Generation Exclude (number)
- Metageneration Match (number)
- Metageneration Exclude (number)
- Predefined ACL (options like authenticatedRead, private, publicRead, etc.)
Encryption Headers Optional headers for customer-supplied encryption keys:
- Encryption Algorithm (only AES256 supported)
- Encryption Key (Base64 encoded AES256 key)
- Encryption Key Hash (Base64 encoded SHA256 hash of key)

Output

The output is a JSON array where each item corresponds to the updated object metadata returned by the Google Cloud Storage API. This includes all standard object properties such as name, bucket, generation, metadata, ACLs, content type, size, and any updated fields.

If binary data were involved (not applicable for update operation), it would be summarized accordingly, but here the output focuses on JSON metadata describing the updated object state.

Dependencies

  • Requires valid Google Cloud credentials via either a service account or OAuth2 authentication.
  • Uses Google Cloud Storage REST API endpoints.
  • Requires n8n environment configured with appropriate Google API credentials.
  • No additional external dependencies beyond the Google Cloud Storage API.

Troubleshooting

  • Authentication errors: Ensure the provided credentials have sufficient permissions to update objects in the specified bucket.
  • Object not found: Verify the bucket name and object name are correct and that the object exists.
  • Invalid field values: Check that JSON fields like ACL and metadata are properly formatted.
  • Conditional update failures: If using generation or metageneration match/exclude parameters, ensure they correspond to the current object version; otherwise, the update will fail.
  • Encryption header issues: When supplying encryption keys, ensure keys and hashes are Base64 encoded correctly and match the expected algorithm (AES256).
  • Quota or API limits: Be aware of Google Cloud Storage API quotas and rate limits which may cause request failures.

Links and References

Discussion