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

# Google Drive

> Index a Google Drive folder or shared drive so its documents are searchable in Knowledgebase.

The Google Drive integration indexes one folder or shared drive into [Knowledgebase](/knowledgebase). Once connected, Keldyn reads the documents in that folder on a schedule and turns them into searchable, cited passages — so a policy or design note in Drive can be found without leaving Keldyn.

This is a **knowledge** connector. It does not collect [control evidence](/evidence-and-audits). For IAM and Workspace identity evidence, use the separate [Google Cloud](/integrations/google-cloud) integration.

## What it's used for

Keldyn uses Drive as a source of organisational documents: policies, procedures, architecture notes, and other files your team already keeps in a shared folder. After the first sync, those files appear under **Drive** in the Knowledgebase index browser, and questions in Knowledgebase or AI Chat can cite them with a link back to the file in Drive.

Choose a folder that is already meant to be shared with compliance and security reviewers. The folder — not the Google account — is what limits what Keldyn reads.

## Before you begin

<Steps>
  <Step title="Use a Google account that can open the folder">
    You connect with your own Google account. Keldyn only ever reads what that
    account can already open. Connecting does **not** grant Keldyn access to
    anyone else's Drive.
  </Step>

  <Step title="Pick one folder or shared drive">
    Decide which folder should be searchable. A dedicated shared folder (for
    example `Policies` or `Security`) is safer than a personal My Drive root.
    Without a folder selected, Keldyn indexes **nothing**.
  </Step>

  <Step title="Keldyn only ever reads">
    The connection requests read-only Drive access. Keldyn never creates,
    edits, moves, or deletes files in your Drive.
  </Step>
</Steps>

## Set up the integration

<Steps>
  <Step title="Open Integrations">
    In the Keldyn web app, go to **Integrations**, filter to **Knowledge**, and
    select **Google Drive**.
  </Step>

  <Step title="Choose the folder to index">
    Select the Drive folder or shared drive Keldyn should read. This is
    recorded before you grant access, so you state what you are exposing
    before Google asks for consent.
  </Step>

  <Step title="Connect">
    Select **Connect** and complete the Google sign-in and consent screen.
    Review the requested read-only access and approve it.
  </Step>

  <Step title="Run the first sync">
    After Google returns you to Keldyn, wait for the first backfill or select
    **Sync now**. Open [Knowledgebase](/knowledgebase) and search for a phrase
    that appears only in that folder to confirm the documents landed.
  </Step>
</Steps>

<Tip>
  Documents appear in the index browser under `Drive/{folder}/…`, mirroring
  the subfolders in Drive. **Show in index** from a search result opens that
  file's folder.
</Tip>

## What Keldyn indexes

Keldyn indexes files it can turn into readable text. Everything else is skipped rather than force-converted — a spreadsheet flattened into garbled text would pollute every later search.

| Indexed                 | Skipped                           |
| ----------------------- | --------------------------------- |
| Google Docs             | Google Sheets                     |
| Word (`.docx`)          | Google Slides and PowerPoint      |
| PDF                     | Images, video, and other binaries |
| Markdown and plain text | Files larger than 25 MB           |

Nested subfolders are included. A file that cannot be read (for example, access withdrawn on one document) is recorded against that file; the rest of the folder still syncs.

## What data Keldyn collects and why

Keldyn requests **read-only** access and never writes to Drive. It collects only the data needed to search and cite the files you selected.

| Data collected       | What it contains                                                              | Why Keldyn collects it                                                    | Refresh                              |
| -------------------- | ----------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------ |
| **File contents**    | The text of supported files under the chosen folder                           | So Knowledgebase can retrieve and cite the wording                        | Every 5 minutes (changed files only) |
| **File metadata**    | Name, folder path, last-modified time, owner display name, and the Drive link | To browse the index, rank by freshness, and link a citation back to Drive | With each sync                       |
| **Account identity** | The email of the Google account that connected                                | To show who authorised the connection                                     | At connect time                      |

### Permissions and scopes

Keldyn requests these OAuth scopes. All are read-only.

| Scope                                            | Purpose                                                    |
| ------------------------------------------------ | ---------------------------------------------------------- |
| `openid`, `email`, `profile`                     | Identify the signed-in Google user                         |
| `https://www.googleapis.com/auth/drive.readonly` | List files under the chosen folder and read their contents |

The Drive scope is account-wide. The **folder you select** is what stops Keldyn walking the rest of My Drive. If no folder is set, the connector reports that it is not configured and does not list or download anything.

## Who can read indexed files

Anyone on the team who can open Knowledgebase can read every file from the connected folder, including files that were shared only with a few people in Drive. Source-side sharing settings do not carry over. See [Knowledgebase privacy](/knowledgebase-privacy).

If a file should not be searchable, keep it out of the connected folder, or use **Remove from index** in the Knowledgebase browser. Removing it from the index does not delete it from Drive.

## Keeping the index current

Keldyn checks the folder about every **five minutes** and re-reads files that changed since the last successful sync. You can also trigger an immediate pull with **Sync now**.

* Editing a file in Drive updates its passages on the next sync.
* Moving a file out of the folder, trashing it, or withdrawing access unpublishes it. It stops appearing in search; an existing citation still resolves.
* Reconnecting forces a full re-read, which is how a file that previously failed conversion gets another attempt.

<Note>
  Disconnecting Google Drive unpublishes the Drive documents from Knowledgebase.
  It does not delete anything in Drive. Reconnecting and syncing restores them.
</Note>

## Troubleshooting

A search that should have hit a Drive file usually means one of the following:

* **No folder selected** — the connector is connected but indexes nothing until you choose a folder.
* **Unsupported type** — spreadsheets, slides, and files over 25 MB are skipped.
* **Wrong Google account** — Keldyn can only read what the connecting account can open.
* **Reauth required** — access was revoked in the Google account. Select **Reconnect**, and if Google does not return a refresh token, remove Keldyn's access in your [Google account permissions](https://myaccount.google.com/permissions) first, then connect again.

## Next steps

<CardGroup cols={2}>
  <Card title="Knowledgebase" icon="book-search" href="/knowledgebase" arrow={true}>
    Search cited passages and browse the index after the first sync.
  </Card>

  <Card title="Confluence" icon="file-text" href="/integrations/confluence" arrow={true}>
    Index selected Confluence spaces the same way.
  </Card>
</CardGroup>
