Connect to Gmail

Use the following steps to create a data store that connects to Gmail in Google Cloud console. After connecting the data store, you can attach the data store to your search app and search over your Gmail data.

Before you begin

  • You must be signed into the Google Cloud console with the same account that you use for the Google Workspace instance that you plan to connect. Agentspace Enterprise uses your Google Workspace customer ID to connect to Gmail.

Limitations

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

    Security control Note the following
    Data Residency (DRZ) Agentspace Enterprise only guarantees data residency in Google Cloud. For information about data residency and Gmail, see Google Workspace compliance guidance and documentation—for example, 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 Gmail.
    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 a Gmail data store

Console

To use the console to make Gmail data searchable, follow these steps:

  1. In the Google Cloud console, go to the Agentspace page.

    Agentspace

  2. In the navigation menu, click Data stores.

  3. Click Create data store.

    Create a new data store
    Create a new data store.
  4. On the Select a data source page, select Google Gmail.

    Select the Google Gmail source
    Select the Google Gmail source.
  5. Choose a region for your data store.

  6. Enter a name for your data store.

  7. Click Create.

    Configure the new connector
    Configure the new connector.
  8. Follow the steps in Create a search app and attach the created data store to an Agentspace Enterprise app.

Error messages

The following table describes error messages that you might encounter when working with this Google data source, and includes HTTP error codes and suggested troubleshooting steps.

Error code Error message Description Troubleshooting
400 (Failed precondition) 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.
400 (Failed precondition) 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.

Next steps

  • To preview how your search results appear after your app and data store are set up, see Preview search results.