Skip to main content

Overview

OpenSRE can write investigation findings directly to Google Drive as formatted Google Docs — creating a persistent, shareable record of each incident investigation linked to your team’s existing Drive folder.

Environment recipe

Google Docs is a hosted Google API. There is no local Docker stack. You need a Google Cloud project, a service account JSON key, and a Drive folder that account can edit.

Bring up

  1. In Google Cloud Console, create or pick a project.
  2. Enable the Google Drive API and the Google Docs API.
  3. Create a service account (for example opensre-docs). Skip role assignment.
  4. Add a JSON key and download it to a path outside this repository.
  5. In Google Drive, create a folder for OpenSRE reports (or pick an existing one).
  6. Share that folder with the service account email (opensre-docs@<project>.iam.gserviceaccount.com) as Editor.
  7. Copy the folder ID from the Drive URL: https://drive.google.com/drive/folders/<folder-id>.

Credentials

Auth uses a service account only (Docs + Drive API scopes) — not end-user OAuth.

Tear down

Then:
  1. Unshare the Drive folder from the service account (or delete the folder if it was created only for OpenSRE).
  2. In Google Cloud Console, delete the service account key (and the service account if nothing else uses it).
  3. Delete the JSON file from disk.

Setup

Option 1: Interactive CLI

Provide the credentials file path and folder ID when prompted. Setup verifies Drive access before saving.

Option 2: Onboarding wizard

Select Google Docs when prompted.

Option 3: Environment variables

Add to your .env:

Option 4: Persistent store

Investigation tools

Verify

Expected output:
Verification probes Drive access to the configured folder.

Troubleshooting

Security

  • Keep the service account JSON file outside of your repository — add it to .gitignore.
  • Grant the service account access only to the specific Drive folder it needs.
  • Rotate the service account key periodically via Google Cloud Console.