> ## Documentation Index
> Fetch the complete documentation index at: https://docs.neuralfactory.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Google Drive

> Connect Google Drive as a datasource for your knowledge base.

# Google Drive Integration

Neural Factory can connect to Google Drive to index documents from your organization's Drive folders. Agents can then search and cite content stored in Google Drive.

## Prerequisites

* A Google Cloud service account with the Drive API enabled, and its JSON key
* The Drive folder shared with the service account's email address

## Connecting Google Drive

**1. Open the knowledge base**

Navigate to **Knowledge Bases** and open the knowledge base where you want to add Google Drive content.

**2. Add a Google Drive datasource**

Click **Add Datasource** and select **Google Drive** from the datasource type options.

**3. Enter the service account**

Fill in the client ID, client email, project ID, private key ID and private key from the service account's JSON key.

**4. Enter a folder**

Enter the ID of the folder you want to index, the last part of its address in Google Drive. The PDF files in the folder and its subfolders are indexed. Leave it empty to index the PDFs of every folder the service account can read.

**5. Configure sync settings**

Choose sync behavior:

* **Manual** — Only syncs when you trigger it
* **Automatic** — Periodically checks for new or updated files

**6. Save and sync**

Click **Save** to create the datasource. The initial sync begins and indexes all documents in the selected folder.

## Supported content

* PDF files. Other files in the folder, Google Docs, Sheets and Slides included, are not indexed.

## Troubleshooting

* **Authentication errors** — Edit the datasource and enter the service account's key again; saving starts a sync that checks it.
* **Missing files** — Ensure the files are PDFs in the selected folder. Trashed files are not indexed.
* **Permission issues** — The authenticated account must have at least read access to the folder.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.