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

# Google Cloud Storage

> Access files from Google Cloud Storage buckets

## How it works

The Google Cloud Storage connector pulls in all documents from the specified GCS bucket.
It supports various file formats including PDF, DOC, DOCX, TXT, and more.

Documents are updated every **1** day.

## Setting up

### Authorization

<Steps>
  <Step title="Open Interoperability settings">
    Log into your [Google Cloud Console](https://console.cloud.google.com/).
    Navigate to "Cloud Storage" > "Settings" > "Interoperability".

    <img className="rounded-image" src="https://mintcdn.com/danswer/sZSCgOqeRdUK59k_/assets/admins/connectors/blob/google/interoperability.png?fit=max&auto=format&n=sZSCgOqeRdUK59k_&q=85&s=1975d1cb622d4945322dfb84c2325c4f" alt="Google Cloud Storage Interoperability" width="1624" height="1528" data-path="assets/admins/connectors/blob/google/interoperability.png" />
  </Step>

  <Step title="Create service account key">
    Click "Create a key for a service account".
    Click "Create new account" (or select an existing account and click Create key).

    <img className="rounded-image" src="https://mintcdn.com/danswer/sZSCgOqeRdUK59k_/assets/admins/connectors/blob/google/new_service_account.png?fit=max&auto=format&n=sZSCgOqeRdUK59k_&q=85&s=d8de6e4648055d2fc257d71c641c1202" alt="New service account" width="1600" height="584" data-path="assets/admins/connectors/blob/google/new_service_account.png" />
  </Step>

  <Step title="Set service account details">
    Set a name for the new service account (e.g., "onyx-gcs-connector") and click "Create and continue".

    <img className="rounded-image" src="https://mintcdn.com/danswer/sZSCgOqeRdUK59k_/assets/admins/connectors/blob/google/service_account_config.png?fit=max&auto=format&n=sZSCgOqeRdUK59k_&q=85&s=b10ff57111f08b3f994912c945857e11" alt="Service account configuration" width="1128" height="1230" data-path="assets/admins/connectors/blob/google/service_account_config.png" />
  </Step>

  <Step title="Assign role and finish">
    Click "Select a role" and select Storage Object Viewer or another, more permissive role. Click "Done".

    <img className="rounded-image" src="https://mintcdn.com/danswer/sZSCgOqeRdUK59k_/assets/admins/connectors/blob/google/service_account_perms.png?fit=max&auto=format&n=sZSCgOqeRdUK59k_&q=85&s=886efac45952b8bd42c721e0dbf5f604" alt="Service account permissions" width="1128" height="1230" data-path="assets/admins/connectors/blob/google/service_account_perms.png" />
  </Step>

  <Step title="Record HMAC keys">
    Back on the Interoperability page you should see the new credentials. Record both `Access key` and `Secret`.

    <img className="rounded-image" src="https://mintcdn.com/danswer/sZSCgOqeRdUK59k_/assets/admins/connectors/blob/google/hmac_keys.png?fit=max&auto=format&n=sZSCgOqeRdUK59k_&q=85&s=2fe75ddad6766cb0cd14038a5c073bcc" alt="HMAC keys" width="1588" height="702" data-path="assets/admins/connectors/blob/google/hmac_keys.png" />
  </Step>
</Steps>

### Indexing

<Steps>
  <Step title="Open Google Storage connector">
    Navigate to the Admin Panel > Add Connector > **Google Storage**.
  </Step>

  <Step title="Create credentials">
    Click Create New to create a new credential.

    <img className="rounded-image" src="https://mintcdn.com/danswer/sZSCgOqeRdUK59k_/assets/admins/connectors/blob/google/onyx_1.png?fit=max&auto=format&n=sZSCgOqeRdUK59k_&q=85&s=84de5a47d99600562fbdeb4c9c1d2834" alt="Onyx Google Cloud Storage credentials" width="1870" height="1156" data-path="assets/admins/connectors/blob/google/onyx_1.png" />
  </Step>

  <Step title="Enter keys and connect">
    Paste your Access key and Secret in the form. Click Create and Continue. Name your connector,
    specify the GCS bucket you would like to index, and click Create Connector.

    <img className="rounded-image" src="https://mintcdn.com/danswer/sZSCgOqeRdUK59k_/assets/admins/connectors/blob/google/onyx_2.png?fit=max&auto=format&n=sZSCgOqeRdUK59k_&q=85&s=1bdb64fb6f7768990352be915cc1ae41" alt="Onyx Connector creation" width="1870" height="1156" data-path="assets/admins/connectors/blob/google/onyx_2.png" />
  </Step>
</Steps>

## Understanding Google Cloud Storage Structure

Google Cloud Storage organizes data into buckets. Each bucket can contain an unlimited number of objects (files).
You can think of a bucket as a root directory, and the objects as files within that directory.

For more information on Google Cloud Storage structure,
visit the [Google Cloud Storage documentation](https://cloud.google.com/storage/docs).
