Google Drive
Kapa provides an integration that enables pulling content from your Google Drive. This integration allows you to leverage your existing documents, shared files, and collaborative content stored in Google Drive to power your AI assistant with accurate information.
Prerequisites
- A Google Workspace account
- Access permissions to the folders and files you want to sync
- At least one folder or file to include in the sync
Kapa inherits the authenticated user's Google Drive access permissions. The integration can only access files and folders that the authenticated user has permission to view.
Data ingested
When you connect Kapa to Google Drive, Kapa ingests the following:
- File URLs (direct links to files)
- File names
- Full file content converted to markdown
- File metadata including modification timestamps
Supported file types:
- Google Docs (exported as Word format)
- Microsoft Word documents (.docx)
- PDFs (.pdf)
- Text files (.txt)
- Markdown files (.md)
Kapa has read-only access to your Google Drive and cannot modify, delete, or create files.
Setup
Step 1: Authenticate with Google OAuth
To give Kapa access to your Google Drive, you need to authenticate using Google OAuth:
- Go to the Sources tab in the Kapa platform.
- Click Add new source.
- Enter a SOURCE NAME.
- Select Google Drive from the list of available sources.
- Click Connect Google Drive. You will be redirected to Google's OAuth consent screen.
- Click Allow to grant permissions. You will be redirected back to the Kapa platform.
Kapa requires the drive.readonly scope, which provides read-only access to your files. The integration gains access to all files the authenticated user can access, including personal drive files and shared drives.
Step 2: Configure folder and file selection
Unlike some other Kapa integrations, Google Drive requires you to explicitly specify at least one folder or file to include in the sync.
Selecting folders to include
To include entire folders and their contents:
- Use the Folders to include search field.
- Type to search for folders by name from your Google Drive.
- Select folders from the search results. Kapa indexes all files and subfolders within the selected folders.
Selecting individual files to include
To include specific files:
- Use the Files to include search field.
- Type to search for files by name from your Google Drive.
- Select specific files from the search results.
- This is useful for including individual documents outside of selected folders.
Optional step: Exclude folders or files
Optionally, you can exclude specific folders or files:
- Folders to exclude: Search and select folders to prevent indexing of specific subfolders
- Files to exclude: Search and select specific files to skip. Kapa skips all excluded files, even if they're in included folders.
Only files with supported file types appear in the search results.
Configuration options
The following configuration options are available for the Google Drive integration:
| Option | Description | Default | Required |
|---|---|---|---|
| Connected User | Email address of the authenticated Google account (auto-populated after OAuth) | None | Yes |
| Folders to Include | Search and select folders from your Google Drive. Kapa indexes all files and subfolders. | None | At least one of Folders to Include or Files to Include must be specified. |
| Files to Include | Search and select specific files from your Google Drive to sync individually | None | At least one of Folders to Include or Files to Include must be specified. |
| Folders to Exclude | Search and select folders to skip during traversal. | None | No |
| Files to Exclude | Search and select specific files to skip during sync. Kapa skips all excluded files, even if they're in included folders. | None | No |
Exclusion behavior
- Folder exclusions take precedence (excluded folders are completely skipped).
- File exclusions apply even if the file is in an included folder.
- Subfolders of included folders are automatically traversed unless explicitly excluded.
Sync behavior
Kapa automatically syncs your Google Drive content using the following process:
Initial sync:
- Downloads and indexes all supported files
- Converts file content to markdown format
Incremental updates (every 10 minutes):
- Detects new files added to included folders
- Identifies modified files via modification timestamps
- Downloads and re-indexes changed content
- Removes deleted files from the index
Best practices
Use a dedicated crawler account
For production deployments, consider creating an account specifically for Kapa:
- Create a dedicated Google account (for example,
kapa-crawler@company.com). - Share relevant folders and files with this account.
- Use this account to authenticate the integration.
Advantages:
- Permissions can be applied more selectively and centrally managed
- Integration remains stable when individual employees leave
- Easier to audit what content Kapa can access
Be cautious with folder selection
- Only include folders containing relevant knowledge base content.
- Avoid syncing personal files, downloads folders, or unrelated content.
- Consider creating a dedicated knowledge base folder in Google Drive for better organization.
- Use a dedicated folder or folder naming conventions to make it clear which folders are shared. This helps avoid people adding sensitive documents to shared folders.
Keep content up to date
- Remove outdated documents from included folders.
- Archive old content using folder exclusions.
- Kapa automatically syncs changes every 10 minutes.
Shared drives
The authenticated user's access to shared drives is automatically included.
- Ensure the user has appropriate permissions to shared content.
- Use folder selection from shared drives just like personal drive folders.
Troubleshooting
Authentication errors
Problem: Invalid credentials or Authentication failed error.
Solutions:
- Re-authenticate by removing and re-adding the Google Drive source.
- Ensure the Google account has active access (not suspended or deleted).
- Check that the user hasn't revoked Kapa's OAuth access in Google Account settings.
- Check that your Google Workspace admin hasn't blocked third-party app access.
Missing files after sync
Problem: expected files don't appear in Kapa's search results.
Solutions:
- Verify the folder or file is selected in the configuration.
- Ensure the authenticated user has view access to the files.
- Check that files aren't in excluded folders or file lists.
- Confirm the file type is supported.
- Wait 10 minutes for the incremental sync to complete after adding new files.
- Some large Google Docs may exceed Google's export size limits. These are automatically skipped.