The Google Drive data store for Gemini Enterprise lets you search and
perform actions on your Google Drive data, including files and folders.

> [!NOTE]
> **Note:** Gemini Enterprise has released new Google Workspace data connectors for Google Drive, Gmail, Google Chat, and Google Calendar. The new connectors use a Google-managed OAuth app, so you no longer create your own OAuth client or supply a client ID and client secret when you create the data store. For Google Drive setup instructions, see [Set up a Google Drive data
> store](https://docs.cloud.google.com/gemini/enterprise/docs/connectors/gdrive/set-up-data-store).

## Supported actions

When the Google Drive data store is enabled, end users can use natural
language commands in Gemini Enterprise to perform the following actions.

| Action | Description |
|---|---|
| Copy file | Copies a file in Google Drive. |
| Create file | Creates a new file in Google Drive. |
| Download file content | Downloads the content of a Google Drive file. |
| Get cell values | Reads cell values from a Google Sheets spreadsheet. |
| Get file metadata | Fetches metadata for a Google Drive file. |
| Get file permissions | Lists the permissions on a Google Drive file. |
| Get spreadsheet | Reads the contents and metadata of a Google Sheets spreadsheet. |
| Insert dimension | Inserts rows or columns into a Google Sheets spreadsheet. |
| List recent files | Lists recent files in Google Drive. |
| List shared drives | Lists shared drives in Google Drive. |
| Read document | Reads the contents of a Google Docs document. |
| Read file content | Reads the contents of a Google Drive file. |
| Read presentation | Reads the contents of a Google Slides presentation. |
| Search files | Searches for Google Drive files matching a query. |
| Share file | Shares a Google Drive file with one or more users. |
| Trash file | Moves a Google Drive file to the trash. |
| Update cell values | Writes cell values to a Google Sheets spreadsheet. |
| Update file | Updates an existing Google Drive file. |
| Update formulas | Writes formulas to a Google Sheets spreadsheet. |

> [!NOTE]
> **Note:** The maximum file size for file uploads and downloads in Gemini Enterprise is 75 MB.

### Required scopes

The Google-managed OAuth app requests the following OAuth scopes.
Users grant these scopes when they authorize the connector:

| Scope | Purpose |
|---|---|
| `https://www.googleapis.com/auth/drive.readonly` | Search and retrieve Google Drive content. Lets the data store list files and folders, view metadata, list permissions, and read file content. |
| `https://www.googleapis.com/auth/drive.metadata.readonly` | Read Google Drive file metadata. |
| `https://www.googleapis.com/auth/drive.file` | Create and update files that the user opens or creates with the connector. |
| `https://www.googleapis.com/auth/drive.appdata` | Store application-specific data in Google Drive. |
| `https://www.googleapis.com/auth/drive` | Perform write actions on Google Drive files (for example, copy, share, trash, and update). |

## Limitations


- The Google Drive data store is supported only in the `global`, `us`, and `eu` locations.

<br />

- If you use security controls, be aware of their limitations related to data in
  Google Drive, as discussed in the following table:

  | Security control | Note the following |
  |---|---|
  | [Data Residency (DRZ)](https://docs.cloud.google.com/gemini/enterprise/docs/locations.md.txt) | Gemini Enterprise only guarantees data residency in Google Cloud. For information about data residency and Google Drive, see Google Workspace compliance guidance and documentation, including [Data regions for Google Workspace](https://support.google.com/a/answer/9223653). Also review examples like [Choose the region where data is stored](https://support.google.com/a/topic/7631290) and [Digital sovereignty](https://workspace.google.com/intl/en_in/security/digital-sovereignty/). |
  | [Customer-managed encryption keys (CMEK)](https://docs.cloud.google.com/gemini/enterprise/docs/cmek.md.txt) | Your keys only encrypt data within Google Cloud. Cloud Key Management Service controls don't apply to data stored in Google Drive. |
  | [Access Transparency](https://docs.cloud.google.com/gemini/enterprise/docs/access-transparency.md.txt) | Access Transparency logs actions taken by Google personnel on the Google Cloud project. You'll also need to review the Access Transparency logs created by Google Workspace. For more information, see [Access Transparency log events](https://support.google.com/a/answer/9230979) in the Google Workspace Admin Help documentation. |

## Common search issues

If your search doesn't return the file you're looking for or if the
Gemini Enterprise web app reports that no matching Google Drive files
were found, check the following issues and solutions.

### Gemini Enterprise access to Google Workspace data is disabled

**Symptom:** The Gemini Enterprise web app reports that no matching
Google Drive files were found, or search requests sent through the
[Search API](https://docs.cloud.google.com/gemini/enterprise/docs/preview-search-results.md.txt) return a `403 Permission
Denied: Workspace access for Agentspace disabled by organization admin.` error
(or warning). You can also inspect data store error logs in Cloud Logging;
see [Troubleshoot Gemini Enterprise data
stores](https://docs.cloud.google.com/gemini/enterprise/docs/connectors/troubleshoot-data-stores).

**Issue:** The **Allow Gemini Enterprise to access Google Workspace
data** setting is turned off in the Google Admin console for the
user's Google Workspace organization.

**Solution:** Ask a Google Workspace administrator for the user's organization
to turn on [Allow Gemini Enterprise to access Google Workspace
data](https://support.google.com/a/answer/16479199). In cross-organization
setups, an administrator in each Google Workspace organization whose users
query Google Drive must turn on this setting.

### User and data store belong to different Google Workspace organizations

**Symptom:** Users who sign in from a different Google Workspace organization
than the Google Cloud project don't receive Google Drive results in the
Gemini Enterprise web app, or requests sent through the [Search
API](https://docs.cloud.google.com/gemini/enterprise/docs/preview-search-results) return a `403 Permission Denied: User
does not belong to the same organization as the Workspace data store. Workspace
data store is configured for customer ID ... while user belongs to customer ID
...` error. To check for `403` errors in logs, see [Access Gemini Enterprise
connector error logs with Cloud Logging](https://docs.cloud.google.com/gemini/enterprise/docs/cloud-logging).

**Issue:** By default, Gemini Enterprise only lets users search a
Google Drive data store when the user's Google Workspace customer ID matches
the organization of the Google Drive data store and Google Cloud project.

**Solution:** Complete the cross-organization setup:

1. Contact [Cloud Customer Care](https://cloud.google.com/support) to add the customer ID of each Google Workspace organization whose users access Gemini Enterprise to the allowlist for your Google Cloud project.
2. Have a Google Workspace administrator in each Google Workspace organization turn on [Allow Gemini Enterprise to access
   Google Workspace data](https://support.google.com/a/answer/16479199).
3. If users need to find documents owned outside their own organization, enable **Include cross-domain documents** in [Manage web app
   features](https://docs.cloud.google.com/gemini/enterprise/docs/manage-web-app-features).

### Keywords beyond the 1 MB text extraction limit aren't searchable

**Symptom:** Searching for keywords that appear later in a large file doesn't
return the file.

**Issue:** Google Drive only extracts 1 MB of text and formatting data from
your file to make it searchable. Keywords exceeding the 1 MB index limit aren't
searchable.

**Solution:** Search using terms that appear within the first 1 MB of the file,
or split large documents into smaller files.

### Files exceeding size or PDF page limits aren't indexed

**Symptom:** Specific large files or long PDFs don't appear in search results.

**Issue:** Files exceeding Google Drive size or page limits aren't indexed and
won't appear in search results:

- For most file types, file size can't exceed 10 MB, with the following exceptions:
  - XLSX files: up to 20 MB.
  - PDF files: up to 30 MB.
  - Text files: up to 100 MB.
- Optical character recognition (OCR) in PDF files is limited to 80 pages. Google Drive doesn't index any PDF that is larger than 50 MB or 80 pages.

**Solution:** Reduce the file size or split files and PDFs that exceed these
indexing limits.

## What's next

- To create and configure a data store with Google Drive, see [Set up a Google Drive data store](https://docs.cloud.google.com/gemini/enterprise/docs/connectors/gdrive/set-up-data-store.md.txt).