-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
Description
Summary
Implement gmail.getTrackingData operation that queries KV-stored open tracking events by campaign ID. Returns aggregated open data including per-recipient status. Worker-only operation (requires KV binding).
Context
- Repository: ~/Projects/local-mcps/gdrive
- GitHub: AojdevStudio/gdrive
- Plan Doc:
docs/plans/2026-03-10-email-outreach-features.md(Task 6) - Relevant Files: src/modules/gmail/tracking.ts (new), src/sdk/spec.ts, src/sdk/runtime.ts
- Related Issues: Depends on CF Worker tracking pixel endpoint + KV schema
Current Behavior
N/A — new feature. No way to query email open tracking data.
Expected Behavior
gmail.getTrackingData accepts a campaignId and returns: { campaignId, totalSent, totalOpened, openRate, recipients: [{ email, opened, openedAt?, openCount? }] }. Uses KV prefix listing to gather all open events for the campaign.
Acceptance Criteria (max 3)
- AC-1: Returns aggregated tracking data (totalSent, totalOpened, openRate) for a given campaignId
- AC-2: Per-recipient detail includes open status, timestamp of first open, and total open count
- AC-3: Gracefully handles campaigns with no tracking data (returns zeroed aggregates)
Scope
In scope: getTrackingData operation, KV query logic, SDK spec + runtime, unit tests
Out of scope: Real-time streaming, historical trend analysis, click tracking data
Reactions are currently unavailable