Cloud Storage JSON API Connector Overview

The Workflows connector defines the built-infunctions that can be used to access other Google Cloud products within aworkflow.

This page provides an overview of the individual connector.There is no need to import or load connector libraries in a workflow—connectorswork out of the box when used in a call step.

Cloud Storage JSON API

Stores and retrieves potentially large, immutable data objects.To learn more, see theCloud Storage JSON API documentation.

Note: The Cloud Storage connector supports simple object uploads and downloads.For resumable uploads or batch requests, instead of using the connector, definea workflow step thatmakes an HTTP call to theCloud Storage JSON API endpoints.

You should URL-encode object names to be path safe. You can use theurl_encode andurl_encode_plusfunctions to encode applicable characters when they appear in either the objectname or query string of a request URL. If you don't url-encode your object nameand your storage bucket hasfolders, the request willfail. For more information, seeEncoding URL path parts andCloud Storage naming considerations.

Cloud Storage JSON connector sample

YAML

# This workflow demonstrates how to use the Cloud Storage connector:# Create a bucket and upload an object to the bucket# Delete the bucket and the object# Expected output: "SUCCESS"-init:assign:-project_id:${sys.get_env("GOOGLE_CLOUD_PROJECT_ID")}-bucket_name:"BUCKET_NAME"# replace BUCKET_NAME and FILE_NAME placeholders-encoded_object_name:${text.url_encode("FILE_NAME.txt")}# URL-encode object names to be path safe-create_bucket:call:googleapis.storage.v1.buckets.insertargs:project:${project_id}body:name:${bucket_name}-upload_object_media:call:googleapis.storage.v1.objects.insertargs:bucket:${bucket_name}uploadType:"media"# uploads object dataname:${encoded_object_name}body:"helloworld"-download_object_media:call:googleapis.storage.v1.objects.getargs:bucket:${bucket_name}object:${encoded_object_name}alt:"media"# gets object dataresult:object_data# If `alt` is not set, get metadata-get_object_metadata:call:googleapis.storage.v1.objects.getargs:bucket:${bucket_name}object:${encoded_object_name}result:object_metadata-get_bucket:call:googleapis.storage.v1.buckets.getargs:bucket:${bucket_name}-delete_object:call:googleapis.storage.v1.objects.deleteargs:bucket:${bucket_name}object:${encoded_object_name}-delete_bucket:call:googleapis.storage.v1.buckets.deleteargs:bucket:${bucket_name}-the_end:return:"SUCCESS"

JSON

[{"init":{"assign":[{"project_id":"${sys.get_env(\"GOOGLE_CLOUD_PROJECT_ID\")}"},{"bucket_name":"BUCKET_NAME"},{"encoded_object_name":"${text.url_encode(\"FILE_NAME.txt\")}"}]}},{"create_bucket":{"call":"googleapis.storage.v1.buckets.insert","args":{"project":"${project_id}","body":{"name":"${bucket_name}"}}}},{"upload_object_media":{"call":"googleapis.storage.v1.objects.insert","args":{"bucket":"${bucket_name}","uploadType":"media","name":"${encoded_object_name}","body":"hello world"}}},{"download_object_media":{"call":"googleapis.storage.v1.objects.get","args":{"bucket":"${bucket_name}","object":"${encoded_object_name}","alt":"media"},"result":"object_data"}},{"get_object_metadata":{"call":"googleapis.storage.v1.objects.get","args":{"bucket":"${bucket_name}","object":"${encoded_object_name}"},"result":"object_metadata"}},{"get_bucket":{"call":"googleapis.storage.v1.buckets.get","args":{"bucket":"${bucket_name}"}}},{"delete_object":{"call":"googleapis.storage.v1.objects.delete","args":{"bucket":"${bucket_name}","object":"${encoded_object_name}"}}},{"delete_bucket":{"call":"googleapis.storage.v1.buckets.delete","args":{"bucket":"${bucket_name}"}}},{"the_end":{"return":"SUCCESS"}}]

Module: googleapis.storage.v1.bucketAccessControls

Functions
deletePermanently deletes the ACL entry for the specified entity on thespecified bucket.
getReturns the ACL entry for the specified entity on the specified bucket.
insertCreates a new ACL entry on the specified bucket.
listRetrieves ACL entries on the specified bucket.
patchPatches an ACL entry on the specified bucket.
updateUpdates an ACL entry on the specified bucket.

Module: googleapis.storage.v1.buckets

Functions
deletePermanently deletes an empty bucket.
getReturns metadata for the specified bucket.
getIamPolicyReturns an IAM policy for the specified bucket.
insertCreates a new bucket.
listRetrieves a list of buckets for a given project.
lockRetentionPolicyLocks retention policy on a bucket.
patchPatches a bucket. Changes to the bucket will be readable immediatelyafter writing, but configuration changes may take time to propagate.
setIamPolicyUpdates an IAM policy for the specified bucket.
testIamPermissionsTests a set of permissions on the given bucket to see which, if any, areheld by the caller.
updateUpdates a bucket. Changes to the bucket will be readable immediatelyafter writing, but configuration changes may take time to propagate.

Module: googleapis.storage.v1.channels

Functions
stopStop watching resources through this channel

Module: googleapis.storage.v1.defaultObjectAccessControls

Functions
deletePermanently deletes the default object ACL entry for the specifiedentity on the specified bucket.
getReturns the default object ACL entry for the specified entity on thespecified bucket.
insertCreates a new default object ACL entry on the specified bucket.
listRetrieves default object ACL entries on the specified bucket.
patchPatches a default object ACL entry on the specified bucket.
updateUpdates a default object ACL entry on the specified bucket.

Module: googleapis.storage.v1.notifications

Functions
deletePermanently deletes a notification subscription.
getView a notification configuration.
insertCreates a notification subscription for a given bucket.
listRetrieves a list of notification subscriptions for a given bucket.

Module: googleapis.storage.v1.objectAccessControls

Functions
deletePermanently deletes the ACL entry for the specified entity on thespecified object.
getReturns the ACL entry for the specified entity on the specified object.
insertCreates a new ACL entry on the specified object.
listRetrieves ACL entries on the specified object.
patchPatches an ACL entry on the specified object.
updateUpdates an ACL entry on the specified object.

Module: googleapis.storage.v1.objects

Functions
composeConcatenates a list of existing objects into a new object in the samebucket.
copyCopies a source object to a destination object. Optionally overridesmetadata.
deleteDeletes an object and its metadata. Deletions are permanent ifversioning is not enabled for the bucket, or if the generation parameteris used.
getRetrieves an object or its metadata.
insertStores a new object and metadata.
listRetrieves a list of objects matching the criteria.
patchPatches an object's metadata.
rewriteRewrites a source object to a destination object. Optionally overridesmetadata.
updateUpdates an object's metadata.
watchAllWatch for changes on all objects in a bucket.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-02-19 UTC.