How adhesh23/doc-commenter-sync-using-suprsend works
Commentor Sync polls Google Docs for unresolved comments, excludes the authenticated user’s comments, and persists new comments for deduplication. A separate classification step labels stored comments through NVIDIA NIM; notification then resolves document-owner metadata, sends one idempotent SuprSend event per categorized comment, and marks accepted events sent. SuprSend batches events into a digest for the document owner. The notifier and classifier read/write SQLite directly. Digest batching is documented, but its implementation is external to this repository; the workflow spec is present in the tree.
Main entry points: notifier.py Notify pending · drive_client.py Poll & filter · classifier.py Classify comments · store.py Comment store
Components 14
Comment collection
- Poll & filter
drive_client.py - Comment store
store.py - Poll state
store.py
Comment processing
- Classify comments
classifier.py
Notification delivery
- Notify pending
notifier.py - Resolve document owner
drive_client.py - Build event payload
notifier.py - Batch digest events
suprsend_workflow_spec.md - Digest email
External services
- Google Drive
- NVIDIA NIM
- SuprSend events
Other components
- Operator
- Document owner
Connections 22
- Operator → Poll & filter: runs poll
- Poll & filter → Google Drive: lists comments
- Google Drive → Poll & filter: returns comments
- Poll & filter → Comment store: deduplicates and saves
- Poll & filter → Poll state: updates poll time
- Operator → Classify comments: runs classification
- Classify comments → Comment store: reads pending comments
- Classify comments → NVIDIA NIM: requests category
- NVIDIA NIM → Classify comments: returns category
- Classify comments → Comment store: writes categories
- Operator → Notify pending: runs notification
- Notify pending → Comment store: reads categorized comments
- Notify pending → Resolve document owner: requests owner metadata
- Resolve document owner → Google Drive: fetches document metadata
- Google Drive → Resolve document owner: returns metadata
- Notify pending → Build event payload: builds per-comment event
- Build event payload → SuprSend events: dispatches event
- SuprSend events → Batch digest events: batches events
- Batch digest events → Digest email: delivers digest
- Digest email → Document owner: sends to owner
- SuprSend events → Notify pending: returns acceptance
- Notify pending → Comment store: marks accepted sent