# Google Drive

> Sync Google Drive files into an agent's knowledge, by OAuth or a service account.

Source: https://docs.runbear.io/agents/knowledge/google-drive

Last updated: 2026-10-07

Sync documents, spreadsheets, and files from Google Drive so your agent can answer questions grounded in your team's files.

## How it works

Runbear connects to Google Drive and indexes the files you select. The agent searches this content at query time to provide accurate answers. Runbear periodically checks for changes and updates the index automatically.

## Connection methods

Google Drive supports two connection methods. You can use either or both at the same time.

### OAuth (recommended)

Connect your Google account directly:

1. Open your agent in the Runbear dashboard and go to the **Knowledge** tab.
2. Select **Google Drive**.
3. Click **Connect with Google** — a Google authorization page opens.
4. Select the account and grant Runbear access to your Drive files.
5. Use the file picker to select which files and folders to sync.
6. Click **Save**.

If a Google Drive knowledge base was connected with OAuth through another member's Google account, you can take it over: open the source and connect your own Google account. As the notice there says, connecting yours "moves it to your account and keeps everything that is already synced".

### Service Account

Use a Google Cloud service account for organization-managed access:

1. In the [Google Cloud Console](https://console.cloud.google.com/), create a service account and download the JSON key file.
2. Enable the **Google Drive API** in the [API Library](https://console.cloud.google.com/apis/library).
3. Share the Drive files (or Shared Drives) you want to sync with the service account's email address.
4. In Runbear, select **Google Drive** as a knowledge source and upload the JSON key file.

![Add from Google Drive](/img/team-agent/knowledge-base/google-drive-sync-button.png)

5. Select the files to sync and click **Add Files**.

![Select files](/img/team-agent/knowledge-base/google-drive-sync-files.png)

> **Note**
>
> Shared Drives are supported — share the Shared Drive with the service account's email address, and it will have access to sync the files.

## What gets synced

- Files you select in a [supported format](/agents/knowledge/overview.md#supported-file-formats), including Shared Drive files
- Google Docs, Sheets, and Slides — exported automatically as Markdown, `.xlsx`, and `.pptx`
- Content updates are detected and re-synced automatically

A file whose format can't be indexed is not dropped silently: the picker marks it **Unsupported**, and the source lists it in a skipped-files notice. Convert the file to a supported format and it syncs on the next run.
