Google Drive Sources

Breakdown connects to Google Drive so users can select specific Docs, Sheets, and Presentations as source nodes in a reasoning graph.

User Flow

  1. Open a graph and add a Google Drive source.
  2. Connect Google Drive if the account is not connected yet.
  3. Select one or more files in Google Picker.
  4. Breakdown creates one source node for each selected file.
  5. Refresh a source node or run the graph to fetch current file contents.

Access Model

Breakdown uses the https://www.googleapis.com/auth/drive.file scope. That keeps access focused on files the user selects or otherwise uses with the app rather than broad Drive browsing.

Refresh tokens are stored server-side and encrypted. The browser receives only the access needed to open Google Picker and select files.

File TypeHow It Is Used
DocsExported as Markdown or plain text for graph context.
SheetsFetched as bounded table content for prompts and downstream analysis.
PresentationsExported as slide text for source refreshes.

Deployment Checklist

  • Enable the Google Drive API in the Google Cloud project used by the app.
  • Configure an OAuth consent screen with openid, email, profile, and drive.file scopes.
  • Add the hosted and local callback URLs for /api/integrations/google-drive/callback.
  • Restrict the Picker API key to the app origins that will load the browser picker.
  • Apply the google_drive_connections database migration before connecting hosted users.
  • Set the Google Drive and encryption environment variables before building the app.

Smoke Test

  1. Open a graph in the hosted app.
  2. Add a Google Drive source.
  3. Connect Google Drive if prompted.
  4. Pick one private Doc, Sheet, and Presentation.
  5. Refresh each source without making the file public.