Connect a Google Drive folder to a corpus so the files in it are indexed and the assistant can answer from them. With automatic sync on, the corpus stays up to date as files in the folder are added, changed, or deleted. | |
|---|
| What you'll set up | A Google Drive folder synced as a knowledge source for your assistant |
| Before you start | An administrator must set up Google sign-in for your organization once (see Part B below) |
| Time required | About 10 minutes |
How the Google Drive connector works#
A corpus is the set of documents an assistant searches to answer questions. See the Corpus Overview.You connect a folder from the corpus's Add Knowledge Source window, under Sync Content. You paste the folder's URL, choose whether to sync automatically, and sign in with a Google account that can open the folder. Ejento AI then indexes the folder's files into the corpus.Enable Automatic Sync on: the folder is re-indexed every 30 minutes, picking up new, changed, and deleted files.
Enable Automatic Sync off: the folder is indexed once; click Sync now in the folder's menu whenever you want to update it.
Use cases#
Team handbook in Drive: Connect the shared Drive folder that holds your team handbook, with automatic sync on, so the assistant always answers from the latest version.Course material: Connect a course's Drive folder to a study assistant so learners can ask questions about the readings.
Part A — Connect a Google Drive folder#
1. Open the corpus and click Add#
Open the corpus you want to add documents to (for an assistant's corpus: Assistants > three dots > View corpora > the corpus), then click Add at the top right.2. Choose Google Drive#
In the Add Knowledge Source window, under Sync Content, click Google Drive. The Sync Content from Google Drive window opens and shows No Google Drive folders connected yet until you connect one.3. Enter the folder URL and click Connect#
In Google Drive, open the folder you want to sync and copy its URL from the address bar. Paste it into Google Drive Folder URL. The URL must point to a folder, not a single file, for example https://drive.google.com/drive/folders/<FOLDER_ID>.Turn on Enable Automatic Sync if you want the folder re-indexed every 30 minutes, then click + Connect.4. Sign in with Google#
A Google sign-in window opens. Choose the Google account that owns or can open the folder.5. Allow access#
Google shows the access Ejento AI is asking for: read access to your Google Drive files. Review it and click Continue. If Google warns that the app is unverified, click Continue again; this is expected while your organization's Google app is still in testing.6. Check the synced documents#
You return to the corpus. The folder's files appear in the documents list with the status Completed once they're indexed.To update or remove a connected folder later, open Google Drive in Add Knowledge Source again. The connected folders are listed with who connected them and how many documents each has. Click the three dots (More actions) next to a folder, then click Sync now to re-index it now, Copy folder ID, or Delete connection. When you delete a connection, choose Remove connection only to keep the uploaded documents in the corpus (they stop syncing), or Remove connection and associated documents to delete them too.
Part B — Google Cloud OAuth configuration#
An administrator sets this up once per environment, before anyone can sign in with Google in step 4. It creates the Google app that Ejento AI uses to read Drive folders.B1. Create an OAuth 2.0 client#
Go to Google Cloud Console > Google Auth Platform > Clients and click + Create client. Select Web application as the application type.B2. Set the authorized origin and redirect URI#
In the client configuration, add these values:| Field | Value |
|---|
| Authorised JavaScript origins | {server-url} |
| Authorised redirect URIs | {server-url}/auth-service/api/v2/mcp-sso/google/callback |
To find your server URL, go to API Keys in Organization settings in Ejento AI.
After saving, copy the Client ID and Client Secret; you need them in step B5.B3. Add the Drive scope#
Go to Data access and add this scope, so the app can read Drive files:| Scope | Purpose |
|---|
https://www.googleapis.com/auth/drive.readonly | Read-only access to files and folder information in Google Drive |
B4. Add test users, or make the app internal#
If the app's publishing status (under Audience) is Testing, only test users you add can sign in. Go to Audience > Test users > + Add users and add everyone who needs access. Testing mode allows at most 100 unique users.If your organization uses Google Workspace and the project belongs to your Workspace domain, you can click Make internal on the Audience page instead. Everyone in your domain can then sign in, without a test user list or the 100-user limit.When the app is ready for everyone, click Publish app on the Audience page to remove the testing restrictions.
B5. Send the credentials to Ejento AI#
Give your Client ID and Client Secret to your account representative. They're needed to finish setting up the integration.