Skip to main content

Sync Google Drive Files

warning

Google Drive File Sync is still in its early stages and may not work as expected. Please reach out to us if you encounter any issues.

The Google Drive File Sync for OpenAI Assistants on Runbear streamlines the process of keeping your assistant's knowledge base current by directly synchronizing with files stored in Google Drive. This functionality is integral for organizations relying on up-to-date information to inform their AI-driven interactions. It eliminates the need for manual data updates—previously a time-consuming task involving exporting and uploading files after every change.

How it Works

Runbear leverages the Google Drive API to access and sync files stored in your Google Drive account. We periodically check for updates of the files you've selected to sync with your assistant. When changes are detected, we automatically update the assistant's vector store with the updated information.

Setting Up Google Drive File Sync

Service Accounts are used to authenticate and authorize access to Google Drive files. Here's how you can set up Google Drive File Sync for your OpenAI Assistant on Runbear:

Create a Service Account

  1. Go to the Google Cloud Console, and create a new project or select an existing one.
  2. Navigate to the Credentials page under the APIs & Services section
  3. Click on the "Create Credentials" button and select "Service Account" from the dropdown.
  4. Give your service account a name, grant it the "Project > Viewer" role, and click "Create".
  5. Click on the newly created service account and navigate to the "Keys" tab.
  6. Click on "Add Key" and select "JSON" to download the JSON key file. Keep this file secure as it contains sensitive information.

Enable Google Drive API

  1. Navigate to the Google API Library and search for "Google Drive API".
  2. Click on the "Enable" button to enable the API for your project.

Share Google Drive Files

note

Shared Drive files are not supported yet. Only files stored in your personal Google Drive account can be synced.

  1. Share the Google Drive files you want to sync with your assistant with the service account email address found in the JSON key file.
  2. The service account will now have access to the shared files and can sync them with your assistant.

Configure Google Drive File Sync

  1. In edit page of your LLM App in Runbear, click "Add from Google Drive" under the "File Search" section. Add from Google Drive
  2. Upload the JSON key file you downloaded earlier.
  3. Select the Google Drive files you want to sync with your assistant click "Add Files". Select Files

Runbear will then upload the selected files to your assistant and periodically check for updates to keep the assistant's knowledge base current. Let us know if your files are not syncing after 1 hour.