Google Drive Integration

Sync files from Google Drive to train your AI agent

Google Drive Integration#

Connect Google Drive to automatically sync documents for training your agent.


Connecting Google Drive#

  1. Go to your agent dashboard
  2. Navigate to Sources > Google Drive
  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 found
ConnectedToken valid, can browse and link files
BrokenToken expired or permissions lost (shows 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 when you train your agent, 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/end rows) per sheet
  7. Assign column roles:
    • Primary Key: Unique identifiers for exact lookups
    • Searchable: Included in semantic search
    • Filterable: Stored as metadata for SQL filtering
    • Ignore: Excluded from training
  8. Choose chunk format: key-value, CSV, or JSON
  9. Save configuration

Managing Linked Files#

File Status#

StatusMeaning
NewFile linked, waiting for first training
TrainingContent being processed
TrainedContent is up-to-date and in 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
  • Preview file contents

Automatic Syncing#

Linked files sync automatically:

  • On Train: Files are re-downloaded when you train the agent
  • Change Detection: AlonChat detects when files are modified in Google Drive
  • Manual Sync: Click Sync Now to force re-download

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


Best Practices#

  1. Keep files organized in a dedicated folder
  2. Use descriptive filenames for easier management
  3. Avoid very large files (over 10MB may take longer to process)
  4. Check permissions if sync fails
  5. Configure Excel sheets to include only relevant columns

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 your Google account

"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
Google Drive Integration | AlonChat Docs