We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create a digest view that summarizes all emails within a Smart Category for a given time period.
We currently have Smart Categories that automatically categorize emails from certain senders (e.g., Newsletters, Updates, etc.).
We'd like to add a summary (digest) of all emails in a category in a certain time period.
For example, a summary of all newsletters I received in the last 24 hours. In the future, this digest could be sent to users on a recurring basis.
// types.ts interface DigestEmail { sender: string; subject: string; timestamp: Date; summary: string; // AI-generated summary } interface CategoryDigest { category: string; // e.g. "Newsletters" timespan: string; // e.g. "Last 24 hours" emails: DigestEmail[]; overallSummary: string; // AI summary of all emails combined } // digest-service.ts async function generateCategoryDigest( category: string, timeRange: { start: Date; end: Date } ): Promise<CategoryDigest> { // 1. Get all emails in category within time range const emails = await emailProvider.listMessages({ category, after: timeRange.start, before: timeRange.end }); // 2. Generate summaries for each email const digestEmails: DigestEmail[] = await Promise.all( emails.map(async email => ({ sender: email.from, subject: email.subject, timestamp: email.date, summary: await generateEmailSummary(email.content) })) ); // 3. Generate overall category summary const overallSummary = await generateOverallSummary(digestEmails); return { category, timespan: "Last 24 hours", emails: digestEmails, overallSummary }; }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Create a digest view that summarizes all emails within a Smart Category for a given time period.
Background
We currently have Smart Categories that automatically categorize emails from certain senders (e.g., Newsletters, Updates, etc.).
We'd like to add a summary (digest) of all emails in a category in a certain time period.
For example, a summary of all newsletters I received in the last 24 hours. In the future, this digest could be sent to users on a recurring basis.
Tasks
UI Implementation
Backend Implementation
Testing
Technical Notes
Future Enhancement (Separate Issue)
Done when
Example Implementation (AI generated)
The text was updated successfully, but these errors were encountered: