Mail Reader
This flow is used to format Gmail messages following a template
graph TD
%%{init: {'theme': 'mc','layout': 'elk'}}%%
GmailMesageComponent-bmwjc[<div><img src="/_astro/gmail.CLxyIGOu.svg" style="height: 20px !important;width: 20px !important"/></div>Google Gmail Message]
style GmailMesageComponent-bmwjc stroke:#a170ff
ParseData-xilwf[<div><img src="/_astro/braces.Djq0PW4_.svg" style="height: 20px !important;width: 20px !important"/></div>Parse Data]
style ParseData-xilwf stroke:#a170ff
Prompt-w8v41[<div><img src="/_astro/square-terminal.BMOXc-nZ.svg" style="height: 20px !important;width: 20px !important"/></div>Prompt]
style Prompt-w8v41 stroke:#a170ff
TextOutput-tafyq[<div><img src="/_astro/type.Dy26vmDy.svg" style="height: 20px !important;width: 20px !important"/></div>Text Output]
style TextOutput-tafyq stroke:#a170ff
GmailMesageComponent-bmwjc -.- ParseData-xilwf
linkStyle 0 stroke:#a170ff
ParseData-xilwf -.- Prompt-w8v41
linkStyle 1 stroke:#a170ff
Prompt-w8v41 -.- TextOutput-tafyq
linkStyle 2 stroke:#a170ff
Mail Reader
The Mail Reader workflow automates the extraction and formatting of Gmail messages.
It retrieves a message from Gmail, parses the content into plain text, builds a prompt from that text, and presents the final output in a readable form.
⚙️ Main Features
- Retrieves one or more Gmail messages according to a specified query.
- Transforms the raw email data into clean, structured text.
- Constructs a prompt using a user‑defined template.
- Displays the resulting prompt text to the user.
🔄 Workflow Steps
| Component Name | Role in the Workflow | Key Inputs | Key Outputs |
|---|---|---|---|
| Google Gmail Message | Obtains raw email data from the user’s Gmail account. | Operation, mail ID, number of emails, query, and other Gmail‑specific parameters. | Raw email data (Data). |
| Parse Data | Converts the raw email data into plain text following a defined template. | Email data, template string, separator, metadata options. | Parsed text (Message) and processed data (Data). |
| Prompt | Builds a prompt message from the parsed text. | Parsed text message. | Prompt message (Message). |
| Text Output | Presents the prompt to the user in the Playground. | Prompt message. | Final text output (Message). |
🧠 Notes
- The workflow requires valid Gmail API credentials; the user must grant access to read messages.
- Only the “Get Message” operation is used in the current configuration; other Gmail operations are available but not connected.
- OCR and attachment processing options are present but are disabled by default; enabling them would extend the workflow to extract text from attachments.
- The “Parse Data” component can be configured to rename or filter metadata, but the default settings simply extract the email body.
- The final text output is intended for display in the Playground; further processing (e.g., sending a reply) would require additional components.