Google Cloud Storage

Upload, download, and list objects in Google Cloud Storage buckets.

Data and storageOAuth12 actionsAll integrations

On this page
  1. Connect
  2. Call it from a workflow
  3. Actions (12)
  4. clone_object
  5. create_bucket
  6. create_bucket_acl
  7. create_bucket_default_object_acl
  8. create_object_acl
  9. delete_bucket_acl
  10. delete_bucket_default_object_acl
  11. delete_empty_bucket
  12. delete_object
  13. delete_object_acl
  14. search_buckets
  15. search_objects
  16. Details

Connect

Auth type: OAuth (oauth2). The connection holds the provider's OAuth tokens. They are sealed on the server and only opened when an action runs.

Scopes requested: https://www.googleapis.com/auth/devstorage.full_control

  • From your agent: integrations {action: "connect", piece, credentials, env} stores the credentials for dev, prod or all. Answers name the fields, never the values.
  • Or set the integration's project secrets with the secrets tool (SLACK_BOT_TOKEN, DISCORD_WEBHOOK_URL, TELEGRAM_BOT_TOKEN, TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN …): a call uses the connection, else those secrets. integrations {action: "catalog", piece} lists which ones work.
  • Try one action now with integrations {action: "call", piece, piece_action, input}. It really sends.

Call it from a workflow

step.ctx.integrations.invoke("google_cloud_storage", action, input) resolves with the provider's answer and rejects when Google Cloud Storage isn't connected or refuses. Wrap it in step.run so a retry sends once. See step.ctx. Its actions run through the integration runner, which the server's operator turns on: integrations {action: "catalog", piece: "google_cloud_storage"} says whether yours can call it.

Workflow
// workflows/notify.ts: call Google Cloud Storage when a booking is confirmed
import { on } from "@appbricx/workflows";

export const tellGoogleCloudStorage = on.transition("booking", "status", "confirmed", async (_event, step) => {
  // Recorded once: a retry doesn't send it twice. Rejects when Google Cloud Storage isn't connected.
  const output = await step.run("Google Cloud Storage", () =>
    step.ctx.integrations.invoke("google_cloud_storage", "clone_object", {
      "projectId": "<projectId>",
      "sourceBucket": "<sourceBucket>",
      "sourceObject": "<sourceObject>",
      "destBucket": "<destBucket>",
      "destObject": "<destination object name>"
    }),
  );
  step.ctx.log("Google Cloud Storage answered", output);
});
Try it from your agent
{
  "name": "integrations",
  "arguments": {
    "project_id": "<project-id>",
    "action": "call",
    "piece": "google_cloud_storage",
    "piece_action": "clone_object",
    "input": {
      "projectId": "<projectId>",
      "sourceBucket": "<sourceBucket>",
      "sourceObject": "<sourceObject>",
      "destBucket": "<destBucket>",
      "destObject": "<destination object name>"
    },
    "env": "dev"
  }
}
From another backend (connector proxy)
curl -X POST "$APP_ORIGIN/__appbricx/connector-proxy/google_cloud_storage/clone_object" \
  -H "Authorization: Bearer $APP_KEY" \
  -H "content-type: application/json" \
  -d '{"props":{"projectId":"<projectId>","sourceBucket":"<sourceBucket>","sourceObject":"<sourceObject>","destBucket":"<destBucket>","destObject":"<destination object name>"}}'

Actions

clone_object

Clone Object. Copy / clone an object (file) to a new location (same or different bucket), optionally overriding metadata. Perfect for duplicating files as backup or version.

InputTypeDescription
projectIdrequiredid (picked from your account)Project
sourceBucketrequiredid (picked from your account)Bucket
sourceObjectrequiredid (picked from your account)Object
destBucketrequiredid (picked from your account)Bucket
destObjectrequiredtextName for the copied object (must be valid object name)
metadataOverridesoptionalobjectOptional metadata and properties to override in the copied object (contentType, cacheControl, contentDisposition, etc.)

create_bucket

Create Bucket. Create a new bucket in a specified location/configuration. Perfect for automating storage provisioning for new projects.

InputTypeDescription
projectIdrequiredid (picked from your account)Project
namerequiredtextUnique name for your bucket (must be globally unique, 3-63 characters)
locationoptionalone of "US" | "EU" | "ASIA" | "us-central1" | "us-east1" | "us-east4" | "us-west1" | "us-west2" | "us-west3" | "us-west4" | "us-south1" | "europe-central2"Location
storageClassoptionalone of "STANDARD" | "NEARLINE" | "COLDLINE" | "ARCHIVE" | "MULTI_REGIONAL" | "REGIONAL" | "DURABLE_REDUCED_AVAILABILITY"Storage Class
versioningoptionalbooleanEnable Versioning
uniformBucketLevelAccessoptionalbooleanUniform Bucket Level Access
labelsoptionalobjectKey-value pairs for bucket labels

create_bucket_acl

Create Bucket ACL. Add an ACL entry at bucket level. Perfect for granting permission to manage the bucket.

InputTypeDescription
projectIdrequiredid (picked from your account)Project
bucketrequiredid (picked from your account)Bucket
entityrequiredtextThe entity to grant access to. Must include the entity type prefix. Format: user-emailAddress, group-groupId, group-emailAddress, domain-domainName, project-team-projectId, allUsers, or allAuthentica…
rolerequiredone of "READER" | "WRITER" | "OWNER"Role

create_bucket_default_object_acl

Create Bucket Default Object ACL. Set default ACLs for new objects added to a bucket. Perfect for automatically assigning permissions to new uploads.

InputTypeDescription
projectIdrequiredid (picked from your account)Project
bucketrequiredid (picked from your account)Bucket
entityrequiredtextThe entity to grant access to. Must include the entity type prefix. Format: user-emailAddress, group-groupId, group-emailAddress, domain-domainName, project-team-projectId, allUsers, or allAuthentica…
rolerequiredone of "READER" | "OWNER"Role

create_object_acl

Create Object ACL. Add an ACL entry to an object (grant a permission). Perfect for granting read/write access to a user or group.

InputTypeDescription
projectIdrequiredid (picked from your account)Project
bucketrequiredid (picked from your account)Bucket
objectrequiredid (picked from your account)Object
entityrequiredtextThe entity to grant access to. Must include the entity type prefix. Format: user-emailAddress, group-groupId, group-emailAddress, domain-domainName, project-team-projectId, allUsers, or allAuthentica…
rolerequiredone of "READER" | "OWNER"Role
generationoptionalnumberOptional generation number for versioned objects

delete_bucket_acl

Delete Bucket ACL. Remove an ACL entry from a bucket. Perfect for revoking access for a user or group.

InputTypeDescription
projectIdrequiredid (picked from your account)Project
bucketrequiredid (picked from your account)Bucket
entityrequiredtextThe entity to grant access to. Must include the entity type prefix. Format: user-emailAddress, group-groupId, group-emailAddress, domain-domainName, project-team-projectId, allUsers, or allAuthentica…

delete_bucket_default_object_acl

Delete Bucket Default Object ACL. Remove default ACL settings from a bucket. Perfect for reverting to default behavior.

InputTypeDescription
projectIdrequiredid (picked from your account)Project
bucketrequiredid (picked from your account)Bucket
entityrequiredtextThe entity to grant access to. Must include the entity type prefix. Format: user-emailAddress, group-groupId, group-emailAddress, domain-domainName, project-team-projectId, allUsers, or allAuthentica…

delete_empty_bucket

Delete Empty Bucket. Clean up unused buckets by deleting them if they contain no live objects.

InputTypeDescription
projectIdrequiredid (picked from your account)Project
bucketrequiredid (picked from your account)Bucket

delete_object

Delete Object. Permanently delete a specific object. Perfect for removing obsolete files.

InputTypeDescription
projectIdrequiredid (picked from your account)Project
bucketrequiredid (picked from your account)Bucket
objectrequiredid (picked from your account)Object
generationoptionalnumberOptional generation number for versioned objects (permanently deletes a specific revision)

delete_object_acl

Delete Object ACL. Remove an ACL entry from an object. Perfect for revoking access for a user.

InputTypeDescription
projectIdrequiredid (picked from your account)Project
bucketrequiredid (picked from your account)Bucket
objectrequiredid (picked from your account)Object
entityrequiredtextThe entity to grant access to. Must include the entity type prefix. Format: user-emailAddress, group-groupId, group-emailAddress, domain-domainName, project-team-projectId, allUsers, or allAuthentica…
generationoptionalnumberOptional generation number for versioned objects

search_buckets

Search Buckets. Search buckets by name. Perfect for finding buckets in your project.

InputTypeDescription
projectIdrequiredid (picked from your account)Project
prefixoptionaltextFilter buckets whose names begin with this prefix
includeSoftDeletedoptionalbooleanInclude soft-deleted bucket versions in results
projectionoptionalone of "noAcl" | "full"Set of properties to return
pageTokenoptionaltextToken for pagination (from previous response)
maxResultsoptionalnumberMaximum number of buckets to return

search_objects

Search Objects. Search objects by criteria. Perfect for finding files in your bucket.

InputTypeDescription
projectIdrequiredid (picked from your account)Project
bucketrequiredid (picked from your account)Bucket
prefixoptionaltextFilter objects whose names begin with this prefix
matchGloboptionaltextGlob pattern to filter results (e.g., "folder/*", "backup-*.txt")
delimiteroptionaltextDelimiter for hierarchical listing (commonly "/")
includeFoldersAsPrefixesoptionalbooleanInclude empty folders and managed folders in results
versionsoptionalbooleanList all versions of objects as distinct results
pageTokenoptionaltextToken for pagination (from previous response)
maxResultsoptionalnumberMaximum number of objects to return (recommended: ≤1000)

Details

Id
google_cloud_storage
Category
Data and storage
Tags
storage, cloud, gcp, files, objects
Package
@activepieces/piece-google-cloud-storage@0.1.3
Runs
Through the integration runner