This page describes how to configure OAuth to connect Google Calendar to Gemini Enterprise as a data store.
Set up authentication and permissions for Google Calendar
To enable Google Calendar actions, a Google Cloud administrator must perform the following steps to enable the Google Calendar API and set up authentication.
Enable the Google Calendar API
In the Google Cloud console, enable the following APIs:
Create an OAuth app and add scopes
If you don't have an OAuth app, follow these steps. If you already have an OAuth app, skip to Create an OAuth client credentials.
Click Get started.
Enter a name for your OAuth app.
In User support email, select a support email address for the users of your application to contact with questions about their consent.
Under Audience, select the user type for your app:
- External: Select External if you're creating an app for use outside of your Google Workspace organization. This makes the app publicly available to any user with a Google account.
If you selected External for user type, add test users:
- Click Audience.
- Under Test users, click Add users.
- Enter your email address and any other authorized test users, then click Save.
- Internal: Select Internal if the app is restricted to members of a specific Google Cloud organization, limiting access to Google Workspace organizational members only.
- External: Select External if you're creating an app for use outside of your Google Workspace organization. This makes the app publicly available to any user with a Google account.
If you selected External for user type, add test users:
Click Next.
Under Contact Information, enter an email address where you can be notified about any changes to your project.
Click Next.
Under Finish, review the Google API Services User Data Policy. If you agree, select I agree to the Google API Services: User Data Policy.
Click Continue.
Click Create.
After you create the app, you can update the OAuth Consent Screen settings in Branding and Audience.
Add scopes
To add the minimum required scopes, follow these steps:
- In the Google Cloud console, go to Menu .
- Select Data Access from the navigation menu.
- Click Add or Remove Scopes.
Under Manually add scopes, paste the following scopes for Google Calendar as per your requirement:
Connection mode Scope Purpose Federated search https://www.googleapis.com/auth/calendar.readonlyMinimum permission for federated search and read-only actions. Federated search and Actions https://www.googleapis.com/auth/calendar.readonlyRequired for read access when performing write actions like creating events. https://www.googleapis.com/auth/calendar.eventsRequired to create calendar events. https://www.googleapis.com/auth/calendar.calendarsRequired to update calendar event metadata. Click Add to table and then click Update.
Click Save.
Create OAuth client credentials
This procedure describes how to create a new OAuth client ID for Google Cloud actions. If you already have an OAuth client ID for Google Cloud actions, you can use that client ID and secret for Google Calendar actions instead of creating a new one.
Click Create client.
For Application type, select Web application.
In the Name field, type a name for the credential.
Skip Authorized JavaScript origins.
In the Authorized redirect URIs section, click Add URI and enter the following URI:
https://vertexaisearch.cloud.google.com/oauth-redirectClick Create. The newly created credential appears under OAuth 2.0 Client IDs. Open the client that you have created and copy the following information:
- Client ID
- Client secret