Update Object Metadata
gcs.update_object_metadata
ActionGoogle Cloudconnection required
Calls the GCS JSON API PATCH /b/{bucket}/o/{object}.
Change a Cloud Storage object's headers and custom metadata in place.
Connection
- Required
- Yes — the node will not save without one
- Auth type
- OAuth 2.0
- Providers
- Google Cloud Storage
- Secret shape
- {"client_id", "client_secret", "refresh_token"}
- Config it needs
- bucket
- Resolved by
- config.connection_id, else node.connection_id
Configuration
8 fields, 1 required. A dotted path is a nested object and name[] an array of objects — the editor renders the same tree.
| Field | Type | Required | Default | Constraints | Example |
|---|---|---|---|---|---|
bucket Bucket name (overrides connection). | string | No | — | — | — |
object Object name/key. | string | Yes | — | — | — |
metadata Custom key/value stamp (JSON), e.g. {"stage": "processed"}. Keys merge with what is already stored; a null value clears a key. | object | No | — | — | {"stage":"processed"} |
cache_control Cache-Control to store. | string | No | — | — | — |
content_disposition Content-Disposition, e.g. attachment; filename="report.pdf". | string | No | — | — | — |
http_content_encoding Content-Encoding header stored on the object, e.g. gzip. This is how GCS serves the bytes, not how Mantle reads them — it is not Put Object's base64 body flag. | string | No | — | — | — |
content_type MIME type to store. | string | No | — | — | — |
custom_time RFC 3339 timestamp lifecycle rules can match on. | string | No | — | — | — |
- At least one of metadata, cache_control, content_disposition, http_content_encoding, content_type, custom_time must be set.
Example configuration
Every value below is the contract’s own example or default — nothing invented.
{
"metadata": {
"stage": "processed"
}
}Output
One shape.
result
| Field | Type | Example |
|---|---|---|
ok | boolean | — |
object | string | — |
bucket | string | — |
size | number | — |
content_type | string | — |
updated | string | — |
md5 | string | — |
generation | string | — |
metageneration Metadata version, bumped by a metadata-only change. | string | — |
crc32c Base64 CRC32C of the content; always present. | string | — |
etag | string | — |
storage_class STANDARD / NEARLINE / COLDLINE / ARCHIVE. | string | — |
created When the object version was created. | string | — |
storage_class_updated When the storage class last changed. | string | — |
media_link Authenticated download URL. | string | — |
self_link | string | — |
content_encoding Stored Content-Encoding, e.g. gzip. | string | — |
content_disposition Stored Content-Disposition. | string | — |
cache_control Stored Cache-Control. | string | — |
kms_key_name Customer-managed encryption key, when one is used. | string | — |
temporary_hold True while a temporary hold blocks deletion. | boolean | — |
event_based_hold True while an event-based hold blocks deletion. | boolean | — |
retention_expiration When retention stops blocking deletion. | string | — |
custom_time User-set timestamp used by lifecycle rules. | string | — |
metadata The user-defined key/value map stamped on the object. | object | — |
{
"bucket": "",
"cache_control": "",
"content_disposition": "",
"content_encoding": "",
"content_type": "",
"crc32c": "",
"created": "",
"custom_time": "",
"etag": "",
"event_based_hold": false,
"generation": "",
"kms_key_name": "",
"md5": "",
"media_link": "",
"metadata": {},
"metageneration": "",
"object": "",
"ok": false,
"retention_expiration": "",
"self_link": "",
"size": 0,
"storage_class": "",
"storage_class_updated": "",
"temporary_hold": false,
"updated": ""
}Notes
- objects.patch needs the devstorage.full_control scope; a Connect-with-Google connection is granted devstorage.read_write and will fail here — with a message naming the scope to re-consent with — until that consent scope is widened.
- http_content_encoding is the Content-Encoding stored on the object. Put Object's content_encoding is a different field entirely (it declares that the body is base64), so do not copy it across.
Related Google Cloud Storage nodes
See Update Object Metadata run in a workflow.
In a technical demo we add the Google Cloud Storage connection, drop the node on the canvas and let Workflow Health pre-flight it before the first real run.