> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.airweave.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.airweave.ai/_mcp/server.

# Google Drive

> Google Drive integration with Airweave

{/* AUTO-GENERATED CONTENT START */}

<img src="https://fdr-prod-docs-files-public.s3.us-east-1.amazonaws.com/airweave.docs.buildwithfern.com/2026-05-20T11%3A36%3A51.367Z/docs/pages/connectors/google_drive/icon.svg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIA6KXJSKKNFOCF7G4B%2F20260807%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20260807T163116Z&X-Amz-Expires=604800&X-Amz-Signature=daa90c9b36a7a9a807fb40c3230e0cab16200dd3da8fc9a7132c13c9a2384593&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject" alt="Google Drive logo" width="48" height="48" />

<h1>
  Google Drive
</h1>

This connector enables AI agents and RAG systems to retrieve context from Google Drive through Airweave's unified search layer.

## Configuration

Google Drive source connector integrates with the Google Drive API to extract files.

Supports both personal Google Drive (My Drive) and shared drives.

It supports downloading and processing files
while maintaining proper organization and access permissions.

#### [View Source Code](https://github.com/airweave-ai/airweave/tree/main/backend/airweave/platform/sources/google_drive.py)

Explore the Google Drive connector implementation

### Authentication

This connector uses **OAuth 2.0 with custom credentials**. You need to provide your OAuth application's Client ID and Client Secret, then complete the OAuth consent flow.

#### OAuth Setup Required

1. Create an OAuth application in your provider's developer console
2. Enter your Client ID and Client Secret when configuring the connection
3. Complete the OAuth consent flow

### Configuration Options

This connector does not have any additional configuration options.

## Data Models

The following data models are available for this connector:

#### GoogleDriveDriveEntity

Schema for a Drive resource (shared drive).

Reference:
[https://developers.google.com/drive/api/v3/reference/drives](https://developers.google.com/drive/api/v3/reference/drives)

| Field         | Type                | Description                                                        |
| ------------- | ------------------- | ------------------------------------------------------------------ |
| drive\_id     | str                 | Unique identifier for the shared drive.                            |
| title         | str                 | Display name of the shared drive.                                  |
| created\_time | Optional\[datetime] | Creation timestamp of the shared drive.                            |
| kind          | Optional\[str]      | Identifies what kind of resource this is; typically "drive#drive". |
| color\_rgb    | Optional\[str]      | The color of this shared drive as an RGB hex string.               |
| hidden        | bool                | Whether the shared drive is hidden from default view.              |
| org\_unit\_id | Optional\[str]      | The organizational unit of this shared drive, if applicable.       |

#### GoogleDriveFileEntity

Schema for a File resource (in a user's or shared drive).

Reference:
[https://developers.google.com/drive/api/v3/reference/files](https://developers.google.com/drive/api/v3/reference/files)

| Field                  | Type                | Description                                                      |
| ---------------------- | ------------------- | ---------------------------------------------------------------- |
| file\_id               | str                 | Unique identifier for the file.                                  |
| title                  | str                 | Display title of the file.                                       |
| created\_time          | datetime            | Timestamp when the file was created.                             |
| modified\_time         | datetime            | Timestamp when the file was last modified.                       |
| description            | Optional\[str]      | Optional description of the file.                                |
| starred                | bool                | Indicates whether the user has starred the file.                 |
| trashed                | bool                | Whether the file is in the trash.                                |
| explicitly\_trashed    | bool                | Whether the file was explicitly trashed by the user.             |
| parents                | List\[str]          | IDs of the parent folders containing this file.                  |
| owners                 | List\[Any]          | Owners of the file.                                              |
| shared                 | bool                | Whether the file is shared.                                      |
| web\_view\_link        | Optional\[str]      | Link for opening the file in a relevant Google editor or viewer. |
| icon\_link             | Optional\[str]      | A static, far-reaching URL to the file's icon.                   |
| md5\_checksum          | Optional\[str]      | MD5 checksum for the content of the file.                        |
| shared\_with\_me\_time | Optional\[datetime] | Time when this file was shared with the user.                    |
| modified\_by\_me\_time | Optional\[datetime] | Last time the user modified the file.                            |
| viewed\_by\_me\_time   | Optional\[datetime] | Last time the user viewed the file.                              |

#### GoogleDriveFileDeletionEntity

Deletion signal for a Google Drive file.

| Field     | Type           | Description                               |
| --------- | -------------- | ----------------------------------------- |
| file\_id  | str            | ID of the file that was deleted.          |
| label     | str            | Human-readable deletion label.            |
| drive\_id | Optional\[str] | Drive identifier that contained the file. |

{/* AUTO-GENERATED CONTENT END */}

## Integrate Airweave with Google APIs on localhost

This guide will walk you through connecting Google Workspace APIs to Airweave when running locally.
Google provides extensive [documentation](https://developers.google.com/workspace/guides/get-started) on setting up your workspace.
Below is a streamlined process for connecting Google APIs to Airweave.

1. [Create a Google Cloud project](https://developers.google.com/workspace/guides/create-project) for your Google Workspace (if you don't already have one)
2. [Enable the Google Workspace APIs](https://developers.google.com/workspace/guides/enable-apis) for Gmail, Google Calendar, and Google Drive
3. [Configure Google OAuth 2.0 consent screen](https://developers.google.com/workspace/guides/configure-oauth-consent)
4. Under `Audience`, select `Make external` and add test users
5. Under `Data Access`, add the following scopes:

```
https://www.googleapis.com/auth/docs
https://www.googleapis.com/auth/drive.photos.readonly
https://www.googleapis.com/auth/drive
https://www.googleapis.com/auth/drive.readonly
https://www.googleapis.com/auth/drive.metadata
https://www.googleapis.com/auth/drive.metadata.readonly
https://www.googleapis.com/auth/gmail.readonly
https://www.googleapis.com/auth/calendar.events.public.readonly
https://www.googleapis.com/auth/calendar.freebusy
https://www.googleapis.com/auth/calendar.readonly
https://www.googleapis.com/auth/calendar.calendars.readonly
https://www.googleapis.com/auth/calendar.events.owned.readonly
https://www.googleapis.com/auth/calendar.events.readonly
```

6. [Create OAuth client ID credentials](https://developers.google.com/workspace/guides/create-credentials#oauth-client-id)
7. Under "Authorized redirect URIs," click "+ Add URI" and add the Redirect URI. Use the appropriate URL for your environment:
   **Production (Airweave Cloud):**

   ```
   https://api.airweave.ai/source-connections/callback
   ```

   **Local:**

   ```
   http://localhost:8001/source-connections/callback
   ```
8. Locate the client ID and client secret from your newly created OAuth client. Add these credentials to the `dev.integrations.yml` file to enable Google API integration.