Skip to main content

Google Drive (Knowledge Base)

This section explains how to connect Google Drive as a Knowledge Base data source in DataDios. It is a read-only connector: you browse the shared folder/file tree, and the platform ingests document text into RAG so it is searchable through Hybrid Search.

Supported document types for retrieval are Google Docs, .txt / .md notes, and .pdf files. Google Sheets, Slides, and images are not extracted.


Prerequisites

Google Drive is authenticated with a service-account JSON key, and the service account only sees files that are explicitly shared with it. Set this up once in the Google Cloud Console:

  1. Create (or pick) a GCP project.
  2. Enable the Google Drive API for that project (APIs & Services → Library → Google Drive APIEnable). This is easy to miss and connection will fail without it.
  3. Create a service account (IAM & Admin → Service Accounts → Create service account).
  4. Create a JSON key for that service account (Keys → Add key → Create new key → JSON) and download it.
  5. Share your Drive folders/files with the service-account email (the client_email in the JSON, e.g. my-sa@my-project.iam.gserviceaccount.com). Give it Viewer access.
The #1 setup gotcha

A service account has its own empty Drive. It can only see what you explicitly share with its email address. If browsing shows nothing, you almost certainly haven't shared the folder with the service-account email.


Steps to Create and Test a Google Drive Data Source

Step 1: Create a Data Source

  1. Navigate to the Data Sources tab in DataDios
  2. Click + CREATE SOURCE
  3. In the data source type dropdown, expand Knowledge Base and select Google Drive

Step 2: Fill Connection Details

Google Drive uses a single connection field — there are no separate project_id / client_email / private_key boxes. You paste the whole service-account key into one field:

  • key_data: Paste the entire contents of the downloaded service-account JSON key file (required, stored encrypted). This field is paste-only — file upload is not supported.
  • schedule_sync: (Optional) 15 Minutes, Hourly, or Daily for metadata synchronization

JSON Configuration

In the Form view you paste the JSON key straight into the key_data field. If you use the Json toggle instead, key_data holds that same key as a nested object:

{
"key_data": {
"type": "service_account",
"project_id": "my-project",
"private_key_id": "...",
"private_key": "-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\n",
"client_email": "my-sa@my-project.iam.gserviceaccount.com",
"client_id": "...",
"token_uri": "https://oauth2.googleapis.com/token"
},
"schedule_sync": ""
}

The individual keys above (project_id, client_email, private_key, …) come straight from the file Google generated — you don't fill them in one by one; the whole object goes into key_data.


Step 3: Test Connection

  1. Click TEST CONNECTION
  2. A valid key with the Drive API enabled returns Status: OK. The service-account key is never echoed back in any response or log.
  3. If the test fails, verify the Drive API is enabled and that at least one folder is shared with the service-account email.

Step 4: Save Data Source

  1. Click CREATE to save the data source
  2. It appears on the Data Sources listing page under Knowledge Base

  1. Expand the data source to browse the shared folders and files at the root, then descend into folders to see sub-folders and files.
  2. Document content (Docs, .txt, .md, .pdf) is ingested into RAG and becomes searchable through Hybrid Search.