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
- Open a graph and add a Google Drive source.
- Connect Google Drive if the account is not connected yet.
- Select one or more files in Google Picker.
- Breakdown creates one source node for each selected file.
- 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 Type | How It Is Used |
|---|---|
| Docs | Exported as Markdown or plain text for graph context. |
| Sheets | Fetched as bounded table content for prompts and downstream analysis. |
| Presentations | Exported 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
- Open a graph in the hosted app.
- Add a Google Drive source.
- Connect Google Drive if prompted.
- Pick one private Doc, Sheet, and Presentation.
- Refresh each source without making the file public.