Skip to main content

Google Drive

Ingest Google Docs, Sheets, Slides, PDFs and Office files from a Google Workspace Drive, keeping Drive's sharing: a document is found only by the people it is shared with.

The Google Drive connection page

For a personal Google account, use Google Drive (personal).

Connect with Google​

  1. Integrations → Add → Google Drive.
  2. Click Connect with Google and sign in with the account whose Drive to read. It reads every file that account can open, so a dedicated account with only the right folders shared to it keeps the scope tight.
  3. Approve the access Google asks for. You come back to the connection.
  4. Choose what to ingest (below) and Save. The first sync starts.

Or: a service account​

The service account acts as one user of your domain through domain-wide delegation.

  1. Google Cloud console → APIs & Services: enable the Google Drive API in a project.

  2. IAM & Admin → Service accounts → Create service account, then Keys → Add key → JSON.

  3. Google Admin console → Security → Access and data control → API controls → Manage domain-wide delegation → Add new: the service account's client ID, with the scope:

    https://www.googleapis.com/auth/drive.readonly

    For agents that change files, use https://www.googleapis.com/auth/drive instead.

  4. On the connection, open Service account and paste the whole key file (Service account key (JSON)) and the user to act as (Impersonate user, e.g. anna@yourcompany.com).

  5. Save, then Test.

What to ingest​

SettingWhat it does
FoldersFolder ids to ingest, with everything under them. Empty: every file the account can see. A folder's id is the end of its address, after /folders/. Press Enter after each.
Shared drive idLimit to one shared drive (its id is the end of its address, after /folders/).
Respect Drive sharingOnly show a document to the people it is shared with in Drive.

Sync, OCR and exclusions: see Common settings.

What agents may do​

SwitchGives agents
Agents may list foldersA tool listing a folder as it is right now, including files not indexed yet. Anyone using such an agent sees the names of every file this account can open.
Agents may create and change filesProposed new folders and text files, content replacements, renames and moves, each run as this account once a person approves it.
Agents may delete filesProposed moves to the Drive trash, where they can be restored.

Connections made before file changes were available need a Reconnect to grant the extra access.