Import Google Drive Documents into AI Memory

Google Drive holds years of your team's knowledge in Docs, Sheets, and Slides. REM Labs turns all of it into searchable AI memory -- indexed semantically so you find documents by meaning, not just filename. This guide covers OAuth setup, selective folder imports, and incremental sync.

Supported File Types

The Google Drive integration handles the file types where most organizational knowledge lives:

Connect via OAuth

In the REM Labs Console, go to Integrations and click Connect Google Drive. You will authorize REM Labs to read files from your Drive. You can scope access to specific folders rather than granting full Drive access.

After authorization, select the folders you want to sync. The initial import processes files in batches of 50, with typical throughput of 200 documents per minute.

Import via API

For programmatic imports or custom pipelines, use the Drive import endpoint with a Google OAuth token.

curl -X POST https://api.remlabs.ai/v1/memory/sync/gdrive/import \ -H "Authorization: Bearer sk-slop-..." \ -H "Content-Type: application/json" \ -d '{ "google_token": "ya29.a0AfH6SM...", "folder_id": "1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlms", "recursive": true, "file_types": ["document", "spreadsheet", "pdf"], "sync_mode": "incremental" }'

Setting recursive: true traverses all subfolders. The file_types filter lets you skip file types you do not need. Incremental mode uses Drive's modifiedTime to only process changed files.

Folder-Scoped Search

After import, you can search across all Drive content or scope searches to specific folders. This is useful when your Drive has distinct knowledge domains -- engineering docs, sales materials, HR policies -- and you want to query within a domain.

curl -X POST https://api.remlabs.ai/v1/integrations/gdrive/search \ -H "Authorization: Bearer sk-slop-..." \ -H "Content-Type: application/json" \ -d '{ "query": "onboarding process for new engineers", "folder": "Engineering/Onboarding", "limit": 10 }'

Sheets as Structured Knowledge

Google Sheets get special treatment. Each row is stored as an individual memory with the column headers as property keys. This means a spreadsheet tracking customer feedback becomes a set of searchable memories with structured metadata like customer, date, sentiment, and feature_request -- all filterable during retrieval.

API Endpoints Reference

EndpointMethodDescription
/v1/memory/sync/gdrive/importPOSTImport files from Google Drive folders
/v1/memory/sync/gdrive/filePOSTImport a single file by ID
/v1/integrations/gdrive/statusGETCheck sync status and last import timestamp
/v1/integrations/gdrive/searchPOSTSearch within the Google Drive namespace

Rate limits: The integration respects Google Drive API quotas automatically. For large Drive accounts (10,000+ files), the initial sync runs as a background job -- you will receive a webhook when it completes. See Google Drive integration docs.

Turn your Drive into AI memory

Free tier. Semantic search across Docs, Sheets, and Slides.

Get started free →