> ## Documentation Index
> Fetch the complete documentation index at: https://veryfront.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Google Cloud Storage

> Browse buckets and read, upload, and delete objects in Google Cloud Storage

## At a glance

* **Availability**: Experimental ([how to enable](/cloud/integrations)).
* **Auth**: OAuth 2.0.
* **Connection**: A user authorizes the connection in the provider's consent screen.
* **Scopes**: `https://www.googleapis.com/auth/devstorage.read_only`.
* **Optional scopes**: `https://www.googleapis.com/auth/devstorage.read_write`.
* **Docs**: [https://cloud.google.com/storage/docs/authentication](https://cloud.google.com/storage/docs/authentication)

## Credentials

Set these per environment. See [Connect an integration](/cloud/integrations).

With a managed OAuth app, Connect works without these variables; set them to use your own OAuth app instead.

| Variable               | Required | Description                                                                           |
| ---------------------- | -------- | ------------------------------------------------------------------------------------- |
| `GOOGLE_CLIENT_ID`     | Yes      | Google OAuth Client ID [Docs](https://console.cloud.google.com/apis/credentials).     |
| `GOOGLE_CLIENT_SECRET` | Yes      | Google OAuth Client Secret [Docs](https://console.cloud.google.com/apis/credentials). |

## Setup

1. **Create or select a Google Cloud project**: Go to [https://console.cloud.google.com](https://console.cloud.google.com) and create a project (new Google Cloud accounts include free-tier credit; Cloud Storage also has an always-free tier in some regions).
2. **Enable the Cloud Storage JSON API**: Open [https://console.cloud.google.com/apis/library/storage-json.googleapis.com](https://console.cloud.google.com/apis/library/storage-json.googleapis.com) and click Enable for your project.
3. **Create OAuth credentials**: In [https://console.cloud.google.com/apis/credentials](https://console.cloud.google.com/apis/credentials) create an OAuth 2.0 Client ID (Web application) and add your callback URL as an authorized redirect URI. Store the values as GOOGLE\_CLIENT\_ID and GOOGLE\_CLIENT\_SECRET.
4. **Create a test bucket**: In [https://console.cloud.google.com/storage/browser](https://console.cloud.google.com/storage/browser) create a bucket and upload a small file so List Objects and Download Object have something to return.

* The default scope is read-only; uploading and deleting objects requires granting the optional devstorage.read\_write scope during authorization.
* List Buckets needs the project ID (not the project name or number label shown in the console header dropdown).
* Object names that contain slashes must be URL-encoded (%2F) when used in the object path of download and delete calls.

Provider API reference: [https://cloud.google.com/storage/docs/json\_api](https://cloud.google.com/storage/docs/json_api)

## Tools

| Tool                | Access | Description                                                                                                                          |
| ------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------ |
| List Buckets        | Read   | List Cloud Storage buckets in a Google Cloud project                                                                                 |
| Get Bucket Metadata | Read   | Get a bucket's metadata - location, storage class, versioning, and lifecycle configuration                                           |
| List Objects        | Read   | List objects in a bucket, optionally filtered by name prefix or grouped by delimiter                                                 |
| Download Object     | Read   | Download an object's content (alt=media), or set alt=json to return the object's metadata instead                                    |
| Upload Object       | Write  | Upload content as a new object (or overwrite an existing one) using a simple media upload - requires the read-write scope            |
| Copy Object         | Write  | Copy an object to another name or bucket server-side (rewrite), without downloading and re-uploading - requires the read-write scope |
| Delete Object       | Write  | Permanently delete an object from a bucket - requires the read-write scope                                                           |

## Example prompts

* List the objects in one of my Cloud Storage buckets and summarize what's stored there.
* Download a file from my Cloud Storage bucket and summarize its contents.
* List objects in a bucket with their metadata and point out large or old files I might want to clean up.
