Skip to main content
Connect a Google Drive account, choose the files or folders you want, and make that content searchable through the same unified Nia workflows used for other source types.

How It Works

1

Connect a Drive Account

Authenticate with Google OAuth using read-only Drive access. Each successful connection creates an installation representing that Google account.
2

Choose What to Index

Browse My Drive and shared drives, then pick specific files or folders. Folder selections recurse through all children, and Drive shortcuts resolve to their targets.
3

Search It Like Any Other Source

Once indexed, Drive content works with the same search, read, grep, and tree flows as other Nia sources.
4

Keep It Fresh with Sync

After the first full index, incremental sync updates only changed files instead of rebuilding everything.

Account Model

  • Users connect Google Drive through Google OAuth with read-only Drive scopes.
  • Each connection creates an installation tied to that Google account.
  • Multiple Google accounts can be connected per user or organization.

Supported File Types

TypeHow Nia handles it
Google DocsExported as plain text
Google SheetsExported as spreadsheets
Google Slides and DrawingsExported as PDFs
PDFs, CSVs, Excel filesIndexed directly
Plain text filesMarkdown, JSON, YAML, XML, HTML, code files, and similar text-compatible formats
Unsupported binary filesSkipped automatically

What Gets Indexed

Each selected file is downloaded, chunked, and embedded. Chunks preserve the original folder structure as file paths, and each chunk carries metadata such as:
  • file path
  • modification time
  • link back to the original Drive file

Search Experience

Semantic Search

Ask natural-language questions across all indexed Drive content or alongside your other Nia sources.

Read

Retrieve the content of specific Drive-backed files through the same source-reading flow as other indexed content.

Grep

Run regex pattern matching across indexed Drive files.

Tree

Browse the indexed file structure with the original folder hierarchy preserved.

Sync Behavior

After the initial full index, Nia tracks changes in Drive and re-indexes only affected files when content is modified, added, or deleted. Sync scopes are tracked separately for user change logs and shared drives so the system can keep Drive content current without rebuilding the entire source each time.

API Surface

EndpointPurpose
POST /google-drive/installStart the Google OAuth install flow
POST /google-drive/install/callbackComplete OAuth and create the installation
GET /google-drive/installationsList connected Drive accounts
GET /google-drive/installations/{installation_id}/browseBrowse Drive files and folders
GET /google-drive/installations/{installation_id}/selectionView the current indexing selection
POST /google-drive/installations/{installation_id}/selectionUpdate which Drive items should be indexed
POST /google-drive/installations/{installation_id}/indexTrigger the initial indexing run
GET /google-drive/installations/{installation_id}/statusCheck indexing status
POST /google-drive/installations/{installation_id}/syncTrigger incremental sync
Google Drive content becomes searchable through the same unified search and source APIs used for repositories, docs, PDFs, datasets, Slack, and local sources.