Google Drive Connector
Make your Google Drive documents searchable with AI. Connect your Drive to RAGaaS and instantly search across all your files with semantic understanding.
The Problem with Traditional Drive Search
Common Challenges
- Basic keyword matching misses context
- No search across file contents
- Separate search for each Drive
- Complex API integration
- Manual document syncing
Our Solution
- Semantic search understands meaning
- Full-text search across all files
- Unified search across Drives
- Simple REST API
- Automatic content sync
How It Works
Set Up Drive Integration
Create a Google Cloud project and configure OAuth credentials. We'll guide you through the setup process.
Select Your Files
Choose which Drive files to connect. Our integration respects your permissions and only accesses the files you explicitly select.
Start Searching
Use our API to search across your Drive content with AI understanding. Perfect for building internal tools, knowledge bases, or search applications.
Implementation Guide
1. Create Google Cloud Project
First, set up your Google Cloud project and configure OAuth:
- Go to Google Cloud Console
- Create a new project or select an existing one
- Enable required APIs:
- Google Drive API
- Google Docs API
- Google Picker API
- Configure OAuth consent screen:
- For Workspace/Enterprise users:
- Choose
Internal
user type (only visible to users in your organization) - Faster verification
- No submission required
- Choose
- For Personal/Free accounts:
- Choose
External
user type (available to any Google user) - Requires verification if you plan to publish publicly
- Limited to test users until verified
- Choose
- Add required app information
- Add scopes:
https://www.googleapis.com/auth/drive.readonly
(view files)https://www.googleapis.com/auth/drive.metadata.readonly
(view file metadata)https://www.googleapis.com/auth/userinfo.email
(view user email)https://www.googleapis.com/auth/userinfo.profile
(view basic profile)
- For Workspace/Enterprise users:
- Create OAuth credentials:
- Create OAuth 2.0 Client ID
- Add authorized redirect URI:
https://api.ragaas.dev/connectors/google-drive/callback
- Add authorized JavaScript origin:
https://ragaas.dev
- Create API key for Google Picker
- Note down your credentials:
Client ID
Client Secret
API Key
2. Configure RAGaaS
Add your Google Drive configuration to your RAGaaS namespace:
Configure Drive
curl -X PATCH https://api.ragaas.dev/v1/namespaces/ns_123 \
-H "Authorization: Bearer ${RAGAAS_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
"googleDriveConfig": {
"clientId": "your-google-client-id",
"clientSecret": "your-google-client-secret",
"apiKey": "your-google-api-key"
}
}'
3. Create Drive Connection
Now create a connection to your Google Drive:
- Create a new Drive connection to get an authorization URL
- Open the URL in a browser for the user to authorize
- After authorization, Google redirects back to RAGaaS where:
- The Google Drive Picker will open
- User can browse their Drive and select files/folders to share
- Selected files will be connected to RAGaaS for ingestion
- Check the connection status - it will be
ACTIVE
when ready
Create Connection
# Create Drive connection
curl -X POST https://api.ragaas.dev/v1/connections/google-drive \
-H "Authorization: Bearer ${RAGAAS_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
"name": "My Drive",
"namespaceId": "ns_123"
}'
# Open authorizationUrl in browser for user to authorize
# User selects files using Google Drive Picker
# Google redirects back to RAGaaS after file selection
# Check connection status
curl "https://api.ragaas.dev/v1/connections/google-drive?namespaceId=ns_123" \
-H "Authorization: Bearer ${RAGAAS_API_KEY}"
4. Ingest Drive Content
After creating a connection, ingest the selected files:
Ingest Content
curl -X POST https://api.ragaas.dev/v1/ingest/google-drive \
-H "Authorization: Bearer ${RAGAAS_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
"namespaceId": "ns_123",
"ingestConfig": {
"source": "GOOGLE_DRIVE",
"config": {
"connectionId": "conn_123",
"metadata": {
"source": "google-drive",
"drive": "My Drive"
}
}
}
}'
Supported File Types
Our Google Drive connector supports the following file types:
- Documents:
.pdf
,.doc
,.docx
- Spreadsheets:
.xls
,.xlsx
- Presentations:
.ppt
,.pptx
- Text files:
.txt
,.md
,.rtf
- Google Workspace files:
- Google Docs
- Google Sheets
- Google Slides
Security & Permissions
We take security seriously:
- OAuth2 ensures secure access
- We only request read-only access to files
- Users explicitly select which files to share
- Access can be revoked anytime from Google account settings
- Automatic token refresh handling
- Regular content sync to keep data up to date (Coming soon)