weekly maintenance: email the report via gws Google Workspace CLI#31
Merged
Conversation
stevepridemore
added a commit
that referenced
this pull request
May 10, 2026
Adds Step 12 (email the report) between report-write and lock-release. Uses the locally-installed gws (Google Workspace CLI) to send via the authenticated user@example.com Gmail account, with the report body inline as plain text and the .md file attached for searchable archive. Subject line includes prune count and action-item count so the email is triageable from the inbox list without opening: "Weekly Graph Maintenance — YYYY-MM-DD (N pruned, M action items)" The email step is best-effort. Failures (auth expired, network, quota) are logged to weekly-maintenance-errors.log but do NOT abort the run — the report file is already written on disk and the lock release in step 13 must still happen. Common failure mode (invalid_rapt — Google periodic re-auth required) is called out in the prompt so the morning report-check makes the cause obvious. Step 13 (release lock) renumbered from the old step 12. The lock- release rule's exit-path enumeration updated to include email failure. No script, no new dependencies, no app passwords, no env vars. The gws OAuth setup (already in place locally, refresh token in OS keyring) handles auth. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds Step 12 to the weekly-maintenance routine: email the generated report to `user@example.com` via the locally-installed `gws` (Google Workspace CLI). One command, no script, no new deps, no app passwords.
What changed
`prompts/weekly-maintenance.md`:
Why `gws` and not other options
Considered:
Test plan
🤖 Generated with Claude Code