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

# Setup

> Connect a Google Drive service account to Ravenna so workflows and Ravenna Agents can search Drive files and share or unshare them.

Connect Google Drive with a service account so [workflows](https://docs.ravenna.ai/integrations/google-drive/workflows.md) and [Ravenna Agents](https://docs.ravenna.ai/integrations/google-drive/agent-tools.md) can find files and manage who can open them. This connection is separate from the per-user sign-in that [imports files into knowledge](https://docs.ravenna.ai/integrations/google-drive/knowledge.md).

## Prerequisites

* A Google Cloud project with the Google Drive API enabled
* Permission to create a service account and download its JSON key
* Ravenna organization admin permissions

## Connect a service account

**1. Create a service account**

In Google Cloud Console, create a service account in a project with the Google Drive API enabled. Download its JSON key file.

**2. Connect in Ravenna**

Go to **Settings > Integrations**, open **Google Drive** and choose **Connect with Service Account**. Enter the service account credentials from the JSON key file. Ravenna checks the credentials with Google before saving.

**3. Share files with the service account**

Share the folders and files Ravenna should work with to the service account's email address. Ravenna only sees what is shared with it. To share or unshare a file, the service account needs **Editor** access to it.

> [!NOTE]
>
> One Google Drive service account connects per organization. Every workspace in the organization uses it.

## How it works

> [accordion] Search scope
>
> Search covers every file shared with the service account, including shared drives it belongs to. Trashed files are left out.

> [accordion] File URLs
>
> Share and unshare take the file's link, such as `https://docs.google.com/document/d/FILE_ID/edit` or `https://drive.google.com/file/d/FILE_ID/view`. Ravenna reads the file ID from the `/d/` part. A link without it fails with an invalid file URL error.

> [accordion] What unsharing removes
>
> Unshare removes access granted directly on the file. People with no direct access are skipped. Access inherited from a shared folder and the file owner's access stay in place.

Learn more about [Google Drive workflow actions](https://docs.ravenna.ai/integrations/google-drive/workflows.md) and [agent tools](https://docs.ravenna.ai/integrations/google-drive/agent-tools.md)


## Related topics

- [Setup](https://docs.ravenna.ai/integrations/okta/setup/overview.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.