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#
- Go to your agent dashboard
- Navigate to Sources > Google Drive
- Click Connect Google Drive
- Sign in with your Google account
- Grant access to view your files
Connection States#
| State | Meaning |
|---|---|
| Not Connected | No Google Drive integration found |
| Connected | Token valid, can browse and link files |
| Broken | Token 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:
- Click Link Files to open the file browser
- Navigate folders using the breadcrumb navigation ("My Drive" as root)
- Click folders to browse their contents
- Select files using checkboxes
- 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:
- Link the Excel file
- Click Configure on the file
- The system auto-analyzes sheets (detects headers, data ranges, columns)
- Select which sheets to include
- Override header row detection per sheet if needed
- Set data ranges (start/end rows) per sheet
- 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
- Choose chunk format: key-value, CSV, or JSON
- Save configuration
Managing Linked Files#
File Status#
| Status | Meaning |
|---|---|
| New | File linked, waiting for first training |
| Training | Content being processed |
| Trained | Content is up-to-date and in knowledge base |
| Error | Download or processing failed |
| Removed | File was deleted from Google Drive |
| Quota Exceeded | Storage 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#
- Keep files organized in a dedicated folder
- Use descriptive filenames for easier management
- Avoid very large files (over 10MB may take longer to process)
- Check permissions if sync fails
- 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