This page describes how to create a data store and connect Google Drive to Gemini Enterprise. This connection allows Gemini Enterprise to directly retrieve information from Google Drive. Since data isn't copied into the Vertex AI Search index, you don't need to manage data storage.
Before you begin
You must be signed into the Google Cloud console with the same account that you use for the Google Drive instance that you plan to connect. Gemini Enterprise uses your Google Workspace customer ID to connect to Google Drive.
To enforce data source access control and secure data in Gemini Enterprise, ensure that you have configured your identity provider.
Verify that all the documents are accessible, either by placing them in a shared drive that is owned by the domain or by assigning the ownership to a user in the domain.
Enable Google Workspace smart features in other Google products to connect Google Drive data to Gemini Enterprise. For information, see Turn Google Workspace smart features on or off.
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) 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. Also review examples like Choose the region where data is stored and Digital sovereignty. Customer-managed encryption keys (CMEK) Your keys only encrypt data within Google Cloud. Cloud Key Management Service controls don't apply to data stored in Google Drive. Access Transparency 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 in the Google Workspace Admin Help documentation.
Create the Google Drive data store
To create the Google Drive data store, perform the following steps:
In the Google Google Cloud console, go to the Gemini Enterprise page. Gemini Enterprise
Select or create a Google Cloud project.
In the navigation menu, click Data stores.
Click Create data store.
In the Source section, search for Google Drive, and click Select.
In the Data section:
Specify the drive source for your data store:
- All: To add your entire drive to the data store.
- Specific shared drive(s): Add the shared drive's folder ID.
- Specific shared folder(s): Add the shared folders' ID.
To locate the shared drive's folder ID or a specific folder ID, navigate to the shared drive or folder and copy the ID from the URL. The URL follows this format:
https://drive.google.com/corp/drive/folders/ID.For example,
https://drive.google.com/corp/drive/folders/123456789012345678901.
Click Continue.
In the Configuration section:
- From the Multi-region list, select the location for your data connector.
- In the Data connector name field, enter a name for your connector.
- If you selected
USorEUas the location, configure the Encryption settings:- Select Google-managed encryption key or Cloud KMS key.
- If you selected Cloud KMS key:
- In the Key management type list, select the appropriate type.
- In the Cloud KMS key list, select the key.
Click Continue.
In the Billing section, select General pricing or Configurable pricing. For more information, see Verify the billing status of your projects and Licenses.
Click Create. Gemini Enterprise creates your data store and displays your data stores on the Data Stores page.
To verify the state of the data store, do the following:
- Navigate to the connector in the data store list and monitor its state until it changes to Active.
- When the data store state changes from Creating to Active, the Google Drive connector is ready to be used.
After creating the data store, create an app and connect it to the Google Drive data store before executing the query.
Query execution
After you authorize Google Drive, when you enter a search query:
Gemini Enterprise sends your search query to the Google Drive API.
Gemini Enterprise blends the results with those from other sources and displays them.
Error messages and troubleshooting
The following table describes error messages, including HTTP error codes and suggested troubleshooting steps, that you might encounter when working with this Google data source.
| Error code | Error message | Description | Troubleshooting |
|---|---|---|---|
| 403 Permission Denied | Searching using service account credentials isn't supported for Google Workspace data stores. | The engine being searched has Google Workspace data stores, and the credentials passed are of a service account. Searching using service account credentials on Google Workspace data stores isn't supported. | Call search using user credentials, or remove Google Workspace data stores from the engine. |
| 403 Permission Denied | Consumer accounts aren't supported for Google Workspace data stores. | Search is called using a consumer account (@gmail.com) credential, which isn't supported for Google Workspace data stores. | Remove Google Workspace data stores from the engine or use a managed Google Account. |
| 403 Permission Denied | Customer id mismatch for data store | Search is only allowed for users who belong to same organization as Google Workspace data stores. | Remove Google Workspace data stores from the engine or contact support if the user and Google Workspace data stores are meant to be in different organizations. |
| 403 Permission Denied | Workspace access for Agentspace disabled by organization administrator. | A Google Workspace administrator has disabled access to Google Workspace data for Gemini Enterprise. | Contact your Google Workspace administrator to [enable access](https://support.google.com/a/answer/16479199). |
For common search issues that you encounter when querying your Google Drive data, see Common search issues.
What's next
- To provide a user interface for querying your data, create an app and connect it to the Google Drive data store.
- To preview how your search results appear after your app is set up, see Get search results.
- To enable alerts for the data store, see Configure alerts for third-party data stores.