[Integration] Map & test Google Drive document storage integration #36

Open
opened 2026-03-23 09:35:47 -07:00 by pyr0ball · 0 comments
Owner

Google Drive — Resume & Cover Letter Storage

Automatically save generated cover letters and resume PDFs to a configured Google Drive folder.

Current state

scripts/integrations/google_drive.py exists (31 lines, 4 methods, 1 stub).

Tasks

Mapping

  • Document OAuth2 credential flow (same client_id/secret as Google Calendar — can share)
  • Define folder structure: Peregrine/{company}/{role}/cover_letter.pdf
  • Decide: create Peregrine folder automatically on first use?
  • Config: config/integrations/google_drive.yaml — store folder_id

Implementation

  • Implement GoogleDriveIntegration.connect() — store OAuth credentials + folder ID
  • Implement GoogleDriveIntegration.test() — list files in root to validate token
  • Implement GoogleDriveIntegration.upload(filename, content_bytes, mime_type)
  • Hook upload into Apply Workspace: after PDF generated → upload to Drive
  • Handle token refresh

Testing

  • Integration test: upload a test PDF → verify it appears in Drive folder
  • Test folder creation on first use
  • Test graceful failure: Drive unavailable → PDF still saved locally

Acceptance criteria

  • Settings → Integrations shows Google Drive card
  • Cover letter PDFs auto-upload to configured Drive folder after generation
  • Local PDF still exported even if Drive upload fails
## Google Drive — Resume & Cover Letter Storage Automatically save generated cover letters and resume PDFs to a configured Google Drive folder. ### Current state `scripts/integrations/google_drive.py` exists (31 lines, 4 methods, 1 stub). ### Tasks **Mapping** - [ ] Document OAuth2 credential flow (same client_id/secret as Google Calendar — can share) - [ ] Define folder structure: `Peregrine/{company}/{role}/cover_letter.pdf` - [ ] Decide: create Peregrine folder automatically on first use? - [ ] Config: `config/integrations/google_drive.yaml` — store folder_id **Implementation** - [ ] Implement `GoogleDriveIntegration.connect()` — store OAuth credentials + folder ID - [ ] Implement `GoogleDriveIntegration.test()` — list files in root to validate token - [ ] Implement `GoogleDriveIntegration.upload(filename, content_bytes, mime_type)` - [ ] Hook upload into Apply Workspace: after PDF generated → upload to Drive - [ ] Handle token refresh **Testing** - [ ] Integration test: upload a test PDF → verify it appears in Drive folder - [ ] Test folder creation on first use - [ ] Test graceful failure: Drive unavailable → PDF still saved locally ### Acceptance criteria - Settings → Integrations shows Google Drive card - Cover letter PDFs auto-upload to configured Drive folder after generation - Local PDF still exported even if Drive upload fails
pyr0ball added this to the Paid Tier GA milestone 2026-03-23 09:35:47 -07:00
pyr0ball added the
feature-request
label 2026-03-23 09:35:47 -07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Circuit-Forge/peregrine#36
No description provided.