Skip to content

Google Drive Sensor

What it ingests

Files under a specific Drive folder — Docs, Sheets, and Slides — optionally descending into nested folders.

Credential

References a google_service_account_json credential by id — the same vault type as the Google Meet sensor (both read the same service-account key JSON shape). Leave it blank to use application-default credentials (ADC).

bash
curl -sS -X POST https://your-corveil-host/api/credentials \
  -H "Authorization: Bearer <admin>" -H "Content-Type: application/json" \
  -d '{"type":"google_service_account_json","name":"acme-drive-sa","secret":"{ ...key json... }"}'

Config fields

KeyRequiredNotes
folder_idyesDrive folder ID to ingest. Files under this folder (and descendants, if recursive) are pulled.
recursivenoDescend into nested folders. Defaults to true.

The folder ID is the last path segment of the folder's Drive URL (https://drive.google.com/drive/folders/<folder_id>).

Provider-side setup

  1. Create a service account and download its key JSON.
  2. Enable the Google Drive API on the project.
  3. Give the service account read access to the folder — either share the folder directly with the service account's email, or enable domain-wide delegation with the Drive readonly scope and impersonate a user who can see the folder.

Wire-up

POST /api/sensors

json
{
  "sensor_type": "googledrive",
  "name": "Acme Eng Docs",
  "config": { "folder_id": "1AbCdEfGhIjKlMnOpQrStUvWxYz", "recursive": true },
  "credentials": { "service_account_json": "<google_service_account_json credential id>" }
}

Verify

Run Test connection to confirm the folder is reachable with the supplied credential. Once polling, new or modified files in the folder appear as document events.

Drive stamps events with modifiedTime, which the sensor records as an ingest-fallback occurred-at (eligible for title-date inference) rather than a true source event time.