Reference · Tools

Google Cloud Storage

Manage buckets and objects (files) in Google Cloud Storage. Upload, download, list, create, update, and delete buckets and objects.

Action (binary) Data & Storage v1 Binary data

The Google Cloud Storage node connects your workflows to GCS buckets and objects — uploading files, downloading binary data, listing contents, and deleting resources through the Cloud Storage JSON API v1. Use it to build pipelines that, for example, receive a file from an upstream node and archive it directly into a GCS bucket. Both OAuth2 and service account authentication are supported.

Node type
Action (binary)
Parameters
33
Outputs
Output, Error
Credentials
Google Cloud Storage OAuth2

Google Cloud Storage

Upload, download, and manage files in Google Cloud Storage

Overview

Manages Google Cloud Storage buckets and objects through the Cloud Storage JSON API v1. Bucket operations cover create, delete, get and list; object operations cover create (upload), delete, get, list and update. Getting an object can return either its metadata or the file itself as binary data, and creating an object can upload binary data from an upstream node or plain text. Authentication is available via OAuth2 or a service account.

Category: Data & Storage
Tool Name: google_cloud_storage
Version: 1

Appearance: Icon: si-googlecloud | Color: #4285F4

Node Type

Action (Binary) — handles file/binary data operations

Input / Output

DirectionPort(s)
InputInput
OutputOutput, Error

Credentials

This tool requires Google Cloud Storage OAuth2 credentials. See the Credentials Guide for setup instructions.

Resources

ResourceValue
Bucketbucket
Objectobject

Operations

Both resources offer the same five operation values; the Resource selector decides what they act on.

OperationValueDescription
CreatecreateCreate a new bucket
DeletedeleteDelete an empty bucket
GetgetGet metadata for a specific bucket
Get ManygetAllList buckets for a project
UpdateupdateUpdate a bucket’s metadata
CreatecreateUpload an object to a bucket
DeletedeleteDelete an object from a bucket
GetgetGet object data or metadata
Get ManygetAllList objects in a bucket
UpdateupdateUpdate an object’s metadata

Parameters

Bucket: Create

ParameterTypeRequiredDefaultDescription
Project IDstringYesGoogle Cloud project ID. Supports expressions.
Bucket NamestringYesName of the GCS bucket. Supports expressions.
Projection (projection)optionsNonoAclControls the detail level of the response. “No ACL” omits ACL data and allows larger page sizes.
Options: full (all properties), noAcl
Predefined Access ControlcollectionNo{}Predefined access control settings.
— Predefined ACLoptionsNoauthenticatedReadPredefined access control list applied to the bucket.
Options: authenticatedRead, private, projectPrivate, publicRead, publicReadWrite
— Predefined Default Object ACLoptionsNoauthenticatedReadPredefined access control list applied to objects added to the bucket.
Options: authenticatedRead, bucketOwnerFullControl, bucketOwnerRead, private, projectPrivate, publicRead
Additional Parameters (createBody)collectionNo{}Additional bucket metadata parameters.
— Access ControljsonNo[]Access controls on the bucket (JSON array).
— BillingjsonNo{}The bucket’s billing configuration (JSON object).
— CORSjsonNo[]The bucket’s CORS configuration (JSON array).
— Custom Placement ConfigjsonNo{}Region placement configuration (JSON object).
— Data LocationsjsonNo[]Dual-region data locations (JSON array).
— Default Event Based HoldbooleanNotrueAuto-apply event-based hold to new objects.
— Default Object ACLjsonNo[]Default ACL for new objects (JSON array).
— EncryptionjsonNo{}Encryption configuration (JSON object).
— IAM ConfigurationjsonNo{}The bucket’s IAM configuration (JSON object).
— LabelsjsonNo{}Key-value labels (JSON object).
— LifecyclejsonNo{}The bucket’s lifecycle configuration (JSON object).
— LocationstringNoUSGeographic location of the bucket.
— LoggingjsonNo{}The bucket’s logging configuration (JSON object).
— Retention PolicyjsonNo{}The bucket’s retention policy (JSON object).
— Recovery Point ObjectivestringNoDEFAULTRecovery point objective.
— Storage ClassstringNoSTANDARDThe bucket’s default storage class.
— VersioningjsonNo{}The bucket’s versioning configuration (JSON object).
— WebsitejsonNo{}The bucket’s website hosting configuration (JSON object).

Bucket: Delete

ParameterTypeRequiredDefaultDescription
Bucket NamestringYesName of the GCS bucket. Supports expressions.
FilterscollectionNo{}Conditional filters for the operation.
— Metageneration MatchnumberNo-1Only return data if the metageneration value matches this value.
— Metageneration ExcludenumberNo-1Only return data if the metageneration value does NOT match this value.

Bucket: Get

ParameterTypeRequiredDefaultDescription
Bucket NamestringYesName of the GCS bucket. Supports expressions.
Projection (projection)optionsNonoAclControls the detail level of the response. “No ACL” omits ACL data and allows larger page sizes.
Options: full (all properties), noAcl
FilterscollectionNo{}Conditional filters for the operation.
— Metageneration MatchnumberNo-1Only return data if the metageneration value matches this value.
— Metageneration ExcludenumberNo-1Only return data if the metageneration value does NOT match this value.

Bucket: Get Many

ParameterTypeRequiredDefaultDescription
Project IDstringYesGoogle Cloud project ID. Supports expressions.
PrefixstringNoFilter bucket names by prefix.
Projection (projection)optionsNonoAclControls the detail level of the response. “No ACL” omits ACL data and allows larger page sizes.
Options: full (all properties), noAcl
Return AllbooleanNofalseWhether to return all results or only the first page.

Bucket: Update

ParameterTypeRequiredDefaultDescription
Bucket NamestringYesName of the GCS bucket. Supports expressions.
Projection (projection)optionsNonoAclControls the detail level of the response. “No ACL” omits ACL data and allows larger page sizes.
Options: full (all properties), noAcl
FilterscollectionNo{}Conditional filters for the operation.
— Metageneration MatchnumberNo-1Only return data if the metageneration value matches this value.
— Metageneration ExcludenumberNo-1Only return data if the metageneration value does NOT match this value.
Predefined Access ControlcollectionNo{}Predefined access control settings.
— Predefined ACLoptionsNoauthenticatedReadPredefined access control list applied to the bucket.
Options: authenticatedRead, private, projectPrivate, publicRead, publicReadWrite
— Predefined Default Object ACLoptionsNoauthenticatedReadPredefined access control list applied to objects added to the bucket.
Options: authenticatedRead, bucketOwnerFullControl, bucketOwnerRead, private, projectPrivate, publicRead
Additional Parameters (createBody)collectionNo{}Additional bucket metadata parameters.
— Access ControljsonNo[]Access controls on the bucket (JSON array).
— BillingjsonNo{}The bucket’s billing configuration (JSON object).
— CORSjsonNo[]The bucket’s CORS configuration (JSON array).
— Custom Placement ConfigjsonNo{}Region placement configuration (JSON object).
— Data LocationsjsonNo[]Dual-region data locations (JSON array).
— Default Event Based HoldbooleanNotrueAuto-apply event-based hold to new objects.
— Default Object ACLjsonNo[]Default ACL for new objects (JSON array).
— EncryptionjsonNo{}Encryption configuration (JSON object).
— IAM ConfigurationjsonNo{}The bucket’s IAM configuration (JSON object).
— LabelsjsonNo{}Key-value labels (JSON object).
— LifecyclejsonNo{}The bucket’s lifecycle configuration (JSON object).
— LocationstringNoUSGeographic location of the bucket.
— LoggingjsonNo{}The bucket’s logging configuration (JSON object).
— Retention PolicyjsonNo{}The bucket’s retention policy (JSON object).
— Recovery Point ObjectivestringNoDEFAULTRecovery point objective.
— Storage ClassstringNoSTANDARDThe bucket’s default storage class.
— VersioningjsonNo{}The bucket’s versioning configuration (JSON object).
— WebsitejsonNo{}The bucket’s website hosting configuration (JSON object).

Object: Create

ParameterTypeRequiredDefaultDescription
Bucket NamestringYesName of the GCS bucket. Supports expressions.
Object NamestringYesName/path of the object in the bucket. Supports expressions.
Projection (updateProjection)optionsNofullControls the detail level of the response.
Options: full (all properties), noAcl
Use Input Binary FieldbooleanNotrueWhether to upload data from a binary input field or from text content.
Input Binary FieldstringNodataName of the binary property containing the file to upload. (shown when Use Input Binary Field is true)
File ContentstringNoText content to upload as the object. Supports expressions. (shown when Use Input Binary Field is false)
Create FieldscollectionNo{}Metadata fields for the created object.
— Access Control ListjsonNo[]Sets the object’s acl metadata.
— Cache ControlstringNoSets the object’s cacheControl metadata.
— Content DispositionstringNoSets the object’s contentDisposition metadata.
— Content EncodingstringNoSets the object’s contentEncoding metadata.
— Content LanguagestringNoSets the object’s contentLanguage metadata.
— Content TypestringNoSets the object’s contentType metadata.
— CRC32c ChecksumstringNoSets the object’s crc32c checksum metadata.
— Custom TimestringNoSets the object’s customTime metadata.
— Event Based HoldbooleanNofalseSets the object’s eventBasedHold flag.
— MD5 HashstringNoSets the object’s md5Hash metadata.
— MetadatajsonNo{}Sets the object’s custom metadata key-value pairs.
— Storage ClassstringNoSets the object’s storageClass.
— Temporary HoldbooleanNofalseSets the object’s temporaryHold flag.
Additional Parameters (createQuery)collectionNo{}Additional query parameters for object creation.
— Content EncodingstringNoContent encoding sent with the upload request.
— GenerationnumberNo-1Select a specific revision.
— Generation MatchnumberNo-1Conditional on generation match.
— Generation ExcludenumberNo-1Conditional on generation mismatch.
— Metageneration MatchnumberNo-1Conditional on metageneration match.
— Metageneration ExcludenumberNo-1Conditional on metageneration mismatch.
— KMS Key NamestringNoCloud KMS key for encryption.
— Predefined ACLoptionsNoauthenticatedReadPredefined access control list applied to the new object.
Options: authenticatedRead, bucketOwnerFullControl, bucketOwnerRead, private, projectPrivate, publicRead
Encryption HeaderscollectionNo{}Customer-supplied encryption key headers.
— Encryption AlgorithmoptionsNoAES256The customer-supplied encryption algorithm.
Options: AES256
— Encryption KeystringNoBase64-encoded AES256 encryption key.
— Encryption Key HashstringNoBase64-encoded SHA256 hash of the encryption key.

Object: Delete

ParameterTypeRequiredDefaultDescription
Bucket NamestringYesName of the GCS bucket. Supports expressions.
Object NamestringYesName/path of the object in the bucket. Supports expressions.
Additional Parameters (getParameters)collectionNo{}Additional parameters for get/delete operations.
— GenerationnumberNo-1Target a specific object revision.
— Generation MatchnumberNo-1Conditional on generation match.
— Generation ExcludenumberNo-1Conditional on generation mismatch.
— Metageneration MatchnumberNo-1Conditional on metageneration match.
— Metageneration ExcludenumberNo-1Conditional on metageneration mismatch.

Object: Get

ParameterTypeRequiredDefaultDescription
Bucket NamestringYesName of the GCS bucket. Supports expressions.
Object NamestringYesName/path of the object in the bucket. Supports expressions.
Projection (projection)optionsNonoAclControls the detail level of the response.
Options: full (all properties), noAcl
Return DataoptionsNojsonWhether to return object metadata (JSON) or download the file (binary).
Options: json (metadata), media (object data)
Put Output File in FieldstringNodataName of the binary property to write the downloaded file to. Names are case-sensitive — see the upstream node’s Binary Data panel for the exact names to use. (shown when Return Data is media)
Additional Parameters (getParameters)collectionNo{}Additional parameters for get/delete operations.
— GenerationnumberNo-1Target a specific object revision.
— Generation MatchnumberNo-1Conditional on generation match.
— Generation ExcludenumberNo-1Conditional on generation mismatch.
— Metageneration MatchnumberNo-1Conditional on metageneration match.
— Metageneration ExcludenumberNo-1Conditional on metageneration mismatch.
Encryption HeaderscollectionNo{}Customer-supplied encryption key headers.
— Encryption AlgorithmoptionsNoAES256The customer-supplied encryption algorithm.
Options: AES256
— Encryption KeystringNoBase64-encoded AES256 encryption key.
— Encryption Key HashstringNoBase64-encoded SHA256 hash of the encryption key.

Object: Get Many

ParameterTypeRequiredDefaultDescription
Bucket NamestringYesName of the GCS bucket. Supports expressions.
Projection (projection)optionsNonoAclControls the detail level of the response.
Options: full (all properties), noAcl
Return AllbooleanNofalseWhether to return all results or only up to a given limit.
LimitnumberNo100Maximum number of results to return. (shown when Return All is false)
Additional Parameters (listFilters)collectionNo{}Additional filters for listing objects.
— DelimiterstringNo/Directory-like delimiter for results.
— End OffsetstringNoFilter results to names lexicographically before this value.
— Include Trailing DelimiterbooleanNofalseInclude trailing delimiter in object names.
— PrefixstringNoFilter results to names starting with this prefix.
— Start OffsetstringNoFilter results to names lexicographically equal to or after this value.
— VersionsbooleanNofalseList all object versions as distinct entries.

Object: Update

ParameterTypeRequiredDefaultDescription
Bucket NamestringYesName of the GCS bucket. Supports expressions.
Object NamestringYesName/path of the object in the bucket. Supports expressions.
Projection (updateProjection)optionsNofullControls the detail level of the response.
Options: full (all properties), noAcl
Update FieldscollectionNo{}Metadata fields to update on the object.
— Access ControljsonNo[]Sets the object’s acl metadata.
— Cache ControlstringNoSets the object’s cacheControl metadata.
— Content DispositionstringNoSets the object’s contentDisposition metadata.
— Content EncodingstringNoSets the object’s contentEncoding metadata.
— Content LanguagestringNoSets the object’s contentLanguage metadata.
— Content TypestringNoSets the object’s contentType metadata.
— Custom TimestringNoSets the object’s customTime metadata.
— Event Based HoldbooleanNofalseSets the object’s eventBasedHold flag.
— MetadatajsonNo{}Sets the object’s custom metadata key-value pairs.
— Temporary HoldbooleanNofalseSets the object’s temporaryHold flag.
Additional Parameters (metagenAndAclQuery)collectionNo{}Additional query parameters for object update.
— GenerationnumberNo-1Target a specific object revision.
— Generation MatchnumberNo-1Conditional on generation match.
— Generation ExcludenumberNo-1Conditional on generation mismatch.
— Metageneration MatchnumberNo-1Conditional on metageneration match.
— Metageneration ExcludenumberNo-1Conditional on metageneration mismatch.
— Predefined ACLoptionsNoauthenticatedReadPredefined access control list applied to the object.
Options: authenticatedRead, bucketOwnerFullControl, bucketOwnerRead, private, projectPrivate, publicRead
Encryption HeaderscollectionNo{}Customer-supplied encryption key headers.
— Encryption AlgorithmoptionsNoAES256The customer-supplied encryption algorithm.
Options: AES256
— Encryption KeystringNoBase64-encoded AES256 encryption key.
— Encryption Key HashstringNoBase64-encoded SHA256 hash of the encryption key.

All Operations

ParameterTypeRequiredDefaultDescription
AuthenticationoptionsNooAuth2Authentication method to use.
Options: oAuth2, serviceAccount
Google AccountcredentialNoConnect or select your Google account. (shown when Authentication is oAuth2)
Service Account EmailstringYesThe email address of the Google service account. (shown when Authentication is serviceAccount)
Private KeystringYesThe private key from the service account JSON key file. (shown when Authentication is serviceAccount)
Max ConcurrencynumberNo10Maximum number of items to process concurrently.

Output Data

Results are merged into the input item’s JSON, so the incoming fields stay available downstream, and binary data on the input item is forwarded. The one exception is a binary download, which replaces the JSON entirely.

OperationOutput
bucket / create, get, updateOne item carrying the bucket resource (kind, id, name, location, storageClass, timeCreated, updated …).
bucket / deleteOne item carrying success: true and deleted — the bucket name.
bucket / getAllOne item per bucket. When none match, one item carrying an empty items array.
object / create, updateOne item carrying the object resource (kind, id, name, bucket, size, contentType, generation, md5Hash …).
object / deleteOne item carrying success: true, deleted — the object name — and bucket.
object / get with Return Data jsonOne item carrying the object’s metadata.
object / get with Return Data mediaOne item whose JSON is empty; the file is written to the binary property you named, alongside any binary already on the item.
object / getAllOne item per object. When none match, one item carrying an empty items array.

An object metadata result looks like this:

{
  "kind": "storage#object",
  "id": "my-bucket/documents/file.txt/1712345678901234",
  "name": "documents/file.txt",
  "bucket": "my-bucket",
  "generation": "1712345678901234",
  "contentType": "text/plain",
  "size": "13",
  "updated": "2024-04-05T18:14:38.901Z"
}

Chain operations by expression — for example feed {{ $json.name }} from a list into a download.

Usage Examples

  • Download a file from a GCS bucket as binary data
  • Upload a binary file to Google Cloud Storage
  • List all objects in a GCS bucket
  • Create a new GCS bucket for a project
  • Delete an object from Google Cloud Storage
  • Get metadata for a specific GCS object
  • Update object metadata in a GCS bucket

Example Configuration

Create a versioned bucket:

{
  "type": "google_cloud_storage",
  "parameters": {
    "resource": "bucket",
    "operation": "create",
    "projectId": "my-gcp-project",
    "bucketName": "my-new-bucket",
    "projection": "full",
    "createBody": {
      "location": "US",
      "storageClass": "STANDARD",
      "versioning": "{\"enabled\": true}"
    },
    "createAcl": {
      "predefinedAcl": "private"
    }
  }
}

List every bucket in a project whose name starts with a prefix:

{
  "type": "google_cloud_storage",
  "parameters": {
    "resource": "bucket",
    "operation": "getAll",
    "projectId": "my-gcp-project",
    "prefix": "prod-",
    "returnAll": true,
    "projection": "noAcl"
  }
}

Upload text as an object:

{
  "type": "google_cloud_storage",
  "parameters": {
    "resource": "object",
    "operation": "create",
    "bucketName": "my-bucket",
    "objectName": "documents/{{ $json.slug }}.txt",
    "createFromBinary": false,
    "createContent": "{{ $json.body }}",
    "updateProjection": "full",
    "createData": {
      "contentType": "text/plain",
      "cacheControl": "max-age=3600",
      "metadata": "{\"source\": \"workflow\"}"
    },
    "createQuery": {
      "predefinedAcl": "publicRead"
    }
  }
}

Upload binary data coming from an upstream node:

{
  "type": "google_cloud_storage",
  "parameters": {
    "resource": "object",
    "operation": "create",
    "bucketName": "my-bucket",
    "objectName": "images/{{ $json.fileName }}",
    "createFromBinary": true,
    "createBinaryPropertyName": "data",
    "updateProjection": "noAcl",
    "createData": {
      "contentType": "image/jpeg",
      "storageClass": "STANDARD"
    }
  }
}

Download an object into a binary property:

{
  "type": "google_cloud_storage",
  "parameters": {
    "resource": "object",
    "operation": "get",
    "bucketName": "my-bucket",
    "objectName": "{{ $json.name }}",
    "alt": "media",
    "binaryPropertyName": "downloadedFile"
  }
}

Read an object’s metadata without downloading it:

{
  "type": "google_cloud_storage",
  "parameters": {
    "resource": "object",
    "operation": "get",
    "bucketName": "my-bucket",
    "objectName": "documents/file.txt",
    "alt": "json",
    "projection": "full"
  }
}

List objects under a prefix:

{
  "type": "google_cloud_storage",
  "parameters": {
    "resource": "object",
    "operation": "getAll",
    "bucketName": "my-bucket",
    "projection": "noAcl",
    "returnAll": false,
    "maxResults": 100,
    "listFilters": {
      "prefix": "documents/",
      "delimiter": "/",
      "versions": false
    }
  }
}

Update an object’s metadata:

{
  "type": "google_cloud_storage",
  "parameters": {
    "resource": "object",
    "operation": "update",
    "bucketName": "my-bucket",
    "objectName": "documents/file.txt",
    "updateProjection": "full",
    "updateData": {
      "contentType": "text/markdown",
      "cacheControl": "no-cache",
      "metadata": "{\"version\": \"2.0\"}"
    },
    "metagenAndAclQuery": {
      "ifMetagenerationMatch": 2,
      "predefinedAcl": "bucketOwnerRead"
    }
  }
}

Delete a specific object revision:

{
  "type": "google_cloud_storage",
  "parameters": {
    "resource": "object",
    "operation": "delete",
    "bucketName": "my-bucket",
    "objectName": "documents/old-file.txt",
    "getParameters": {
      "generation": 9876543210
    }
  }
}

Error Handling

ModeBehavior
stopHalts workflow on first error
continueSkips failed items, passes successful ones through
errorPortRoutes failed items to Error output port

Tips

Manage Google Cloud Storage buckets and objects — upload, download, list, and delete files in GCS.

  • Project ID is only needed for bucket Create and Get Many. Every other operation addresses the bucket by name.
  • Return Data decides what a Get produces. json gives you metadata on the item’s JSON; media downloads the file into a binary property and leaves the JSON empty, so capture anything you need from the item before this node.
  • Object names carry their path. documents/2024/report.pdf is a single object name, not a folder structure — the Delimiter and Prefix filters on Get Many are what make listings look folder-like.
  • Delete only works on empty buckets. Remove the objects first.
  • Numeric conditional filters default to -1, meaning “unset”. Leave Generation and the metageneration filters alone unless you are guarding against concurrent writes.
  • Customer-supplied encryption keys must be repeated on read. An object uploaded with Encryption Headers can only be downloaded or updated by supplying the same key and hash.
  • Get Many fans out — each bucket or object becomes its own item, so downstream nodes process them individually.

Frequently asked questions

When I use a Get Object operation, how do I get the actual file versus just its metadata?

The Return Data parameter controls this. Set it to `json` and you get the object's metadata as a JSON item. Set it to `media` and the node downloads the file itself into a binary property — but the JSON output will be empty when you do this. If you need any metadata fields (like the object name or size), read them in a node before this one or in a separate Get with `json` mode first.

Which operations actually require a Project ID?

Only two: Bucket Create and Bucket Get Many (listing buckets). Every other operation — including all object operations and single-bucket gets or deletes — addresses the bucket directly by name, so Project ID is not needed there.

I tried to delete a bucket but the operation failed. What's wrong?

GCS only allows deletion of empty buckets. You must delete all objects inside the bucket before the Bucket Delete operation will succeed. Use Object Get Many to list everything in the bucket, then delete each object first.

I uploaded an object using a customer-supplied encryption key. Now I can't download it — what's happening?

Objects uploaded with Encryption Headers can only be accessed by supplying the exact same encryption key and hash on every subsequent read or update request. If you omit those headers on the Get Object call, GCS will reject it. Make sure your download workflow passes the same key that was used at upload time.

Get Many returns a huge flat list of objects. How do I make it behave like a folder listing?

Object names in GCS are flat strings — `documents/2024/report.pdf` is one name, not a nested path. To simulate folder browsing, use the Prefix filter to scope results to a path prefix (e.g. `documents/2024/`) and the Delimiter filter (typically `/`) to stop the listing from descending further. Each matched object still comes out as its own item, so downstream nodes will process them individually.

Build with the Google Cloud Storage node

Drop it into a workflow, wire it to an agent, or call it on a schedule. You'll need Google Cloud Storage OAuth2 credentials first.

Open BusyBot

Last updated . Spotted something wrong? Tell us.