Google Drive Integration

Sync files from Google Drive to keep your agent's knowledge base up-to-date automatically

Google Drive Integration#

Connect Google Drive to automatically sync documents into your agent's knowledge base. When files change in Google Drive, your agent's knowledge stays up-to-date.


Connecting Google Drive#

  1. Go to your agent's dashboard
  2. Click Sources in the sidebar, then open GDrive
  3. Click Connect Google Drive
  4. Sign in with your Google account
  5. Grant access to view your files

Connection States#

StateMeaning
Not ConnectedNo Google Drive integration set up yet
ConnectedToken is valid -- you can browse and link files
BrokenToken expired or permissions were lost (you will see a refresh prompt)

If your connection shows as broken, click the refresh button to re-authorize.


Browsing and Linking Files#

After connecting:

  1. Click Link Files to open the file browser
  2. Navigate folders using the breadcrumb navigation ("My Drive" as root)
  3. Click folders to browse their contents
  4. Select files using checkboxes
  5. Click Link Selected

Supported File Types#

  • PDF documents
  • Word documents (.docx)
  • Excel spreadsheets (.xlsx)
  • CSV files
  • Text files

Lazy Linking#

Files are linked with metadata only at first. The actual content is downloaded and processed when the source is synced, reducing upfront storage requirements.


Excel Sheet Configuration#

For Excel files with multiple sheets:

  1. Link the Excel file
  2. Click Configure on the file
  3. The system auto-analyzes sheets (detects headers, data ranges, columns)
  4. Select which sheets to include
  5. Override header row detection per sheet if needed
  6. Set data ranges (start and end rows) per sheet
  7. Assign column roles:
    • Primary Key: Unique identifiers for exact lookups
    • Searchable: Included in search and retrieval
    • Filterable: Stored as metadata for filtering
    • Ignore: Excluded from indexing
  8. Choose chunk format: key-value, CSV, or JSON
  9. Save configuration

Managing Linked Files#

File Status#

StatusMeaning
NewFile linked, waiting for first sync
TrainingContent is being processed for the knowledge base
TrainedContent is up-to-date and in the knowledge base
ErrorDownload or processing failed
RemovedFile was deleted from Google Drive
Quota ExceededStorage quota reached

File Actions#

  • Search linked files by name
  • Sort by name, date, or size
  • Bulk select for delete or restore operations
  • Preview file contents

Automatic Syncing#

Linked files sync automatically:

  • On Sync: Files are re-downloaded when you run the sync/process flow
  • Change Detection: AlonChat detects when files are modified in Google Drive
  • Manual Sync: Click Sync Now to force a re-download

File metadata (modification time, size) is tracked to detect changes without downloading content every time.


Best Practices#

  1. Keep files organized in a dedicated folder in Google Drive
  2. Use descriptive filenames so they are easy to identify in the GDrive list
  3. Avoid very large files (files over 10MB may take longer to process)
  4. Check permissions if sync fails -- make sure the file is shared with your Google account
  5. Configure Excel sheets to include only the columns and sheets that are relevant to your agent

Troubleshooting#

"File not found" error:

  • The file may have been deleted or moved in Google Drive
  • Check if you still have access to the file

"Permission denied" error:

  • Re-authorize the Google Drive connection
  • Ensure the file is shared with the Google account you used to connect

"Sync failed" error:

  • Try unlinking and re-linking the file
  • Check if the file format is supported

Connection shows "Broken":

  • Your Google OAuth token has expired
  • Click the refresh button to re-authorize
  • If the problem persists, disconnect and reconnect Google Drive