Inbox Summarizer
Inbox Summarizer
+2
graph TD
%%{init: {'theme': 'mc','layout': 'elk'}}%%
ChatOutput-qsrsy[<div><img src="/_astro/messages-square.BaSDmT6g.svg" style="height: 20px !important;width: 20px !important"/></div>Chat Output]
style ChatOutput-qsrsy stroke:#a170ff
Prompt-cu2bi[<div><img src="/_astro/square-terminal.BMOXc-nZ.svg" style="height: 20px !important;width: 20px !important"/></div>Prompt]
style Prompt-cu2bi stroke:#a170ff
ParseData-6kq7u[<div><img src="/_astro/braces.Djq0PW4_.svg" style="height: 20px !important;width: 20px !important"/></div>Extract Text]
style ParseData-6kq7u stroke:#a170ff
GmailMesageComponent-oada2[<div><img src="/_astro/gmail.CLxyIGOu.svg" style="height: 20px !important;width: 20px !important"/></div>Get Messages]
style GmailMesageComponent-oada2 stroke:#a170ff
OpenAIModel-efuet[<div><img src="/_astro/openAI.BhmuxEs3.svg" style="height: 20px !important;width: 20px !important"/></div>OpenAI]
style OpenAIModel-efuet stroke:#a170ff
ParseData-6kq7u -.- Prompt-cu2bi
linkStyle 0 stroke:#a170ff
GmailMesageComponent-oada2 -.- ParseData-6kq7u
linkStyle 1 stroke:#a170ff
Prompt-cu2bi -.- OpenAIModel-efuet
linkStyle 2 stroke:#a170ff
OpenAIModel-efuet -.- ChatOutput-qsrsy
linkStyle 3 stroke:#a170ff
Inbox Summarizer
The Inbox Summarizer automatically retrieves recent emails from a user’s Gmail inbox, extracts the text content, and produces concise bullet‑point summaries using an OpenAI language model. The workflow saves time by presenting key information from multiple messages in a single, easily readable list, eliminating the need to sift through each email individually.
Main Features
- Automatically fetches the most recent ten emails from a specified Gmail label.
- Converts raw email data into plain text, stripping out formatting and unnecessary attachments.
- Generates a single prompt that instructs the model to summarize each email in concise bullet points.
- Uses an OpenAI model to produce the summaries with minimal user input.
- Displays the final summaries in a chat‑style interface for quick review.
Workflow Steps
| Component Name | Role in the Workflow | Key Inputs | Key Outputs |
|---|---|---|---|
| Get Messages | Retrieves emails from Gmail. | Gmail credentials, operation type (Get Message), number of emails to read, label filter (INBOX), optional query filter. |
Raw email data (Data). |
| Extract Text | Converts the raw email data into plain text using a template. | Raw email data (Data). | Text string containing the concatenated email bodies. |
| Prompt | Builds a prompt that includes the extracted email text and instructions for summarization. | Text string of email bodies. | Prompt message ready for the language model. |
| OpenAI | Generates the summary text using the provided prompt. | Prompt message. | Summarized text (Message). |
| Chat Output | Displays the generated summary to the user. | Summarized text (Message). | Chat message shown in the interface. |
Notes
- The workflow requires valid Google API credentials with Gmail scope and an OpenAI API key.
- Only the most recent ten emails are processed unless the
Number of Emails to readparameter is modified. - Attachments are ignored; only the email body is considered for summarization.
- The model is set to a low temperature to produce deterministic, concise summaries.
- Privacy is respected; raw email content is never stored beyond the execution of the workflow.
- The summarization format follows the example in the prompt template and may be adapted by editing the template text.