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.

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

1

Set Up Drive Integration

Create a Google Cloud project and configure OAuth credentials. We'll guide you through the setup process.

2

Select Your Files

Choose which Drive files to connect. Our integration respects your permissions and only accesses the files you explicitly select.

3

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:

  1. Go to Google Cloud Console
  2. Create a new project or select an existing one
  3. Enable required APIs:
    • Google Drive API
    • Google Docs API
    • Google Picker API
  4. Configure OAuth consent screen:
    • For Workspace/Enterprise users:
      • Choose Internal user type (only visible to users in your organization)
      • Faster verification
      • No submission required
    • 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
    • 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)
  5. 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
  6. Create API key for Google Picker
  7. 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:

  1. Create a new Drive connection to get an authorization URL
  2. Open the URL in a browser for the user to authorize
  3. 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
  4. 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)