Email Automation
Handles the full lifecycle of email tasks — composing context-aware messages, classifying and routing incoming mail, summarizing threads, extracting structured data from messages, and building rule-based or AI-driven email workflows.
When to Use
- User asks to "draft", "write", or "send" an email
- User wants to automate replies to incoming messages based on content or rules
- An inbox needs to be classified, prioritized, or cleaned up
- User wants to extract data (e.g., order confirmations, meeting invites) from email bodies
- A drip campaign or follow-up sequence needs to be created
- User asks to summarize a long email thread
- User wants to set up auto-responders or filters
Process
Identify the task type:
- Compose: Draft a new email from intent, context, or a template
- Reply: Generate a reply to a provided message, matching tone and addressing all points
- Classify: Categorize messages by type (support, sales, newsletter, spam, etc.)
- Summarize: Condense a thread or message into key points and action items
- Extract: Pull structured fields (sender, date, amount, tracking number) from an email body
- Workflow: Build a rule-based pipeline (receive → classify → route → respond)
For composition and replies:
- Infer the recipient, subject, and appropriate tone (formal, casual, technical) from context
- Include all required components: greeting, body paragraphs addressing each point, call to action, and sign-off
- Match the user's voice if example emails are provided
- Flag ambiguous instructions ("mention the project") and ask for clarification before drafting
For classification:
- Define or infer the category taxonomy (e.g., Urgent / Action Required / FYI / Newsletter / Spam)
- Score each message against the categories using subject, sender domain, body keywords, and structural signals (unsubscribe links → newsletter)
- Return category, confidence score, and a one-sentence rationale per message
For summarization:
- Identify all participants and their roles in the thread
- Extract: topic, key decisions made, open questions, and action items with owners
- Order information by importance, not chronologically
For data extraction:
- Define the target schema before parsing (e.g.,
{order_id, vendor, amount, due_date})
- Use regex for structured fields (dates, amounts, tracking codes) and NLP for free-form content
- Flag fields that could not be extracted reliably (confidence < 80%)
For workflow design:
- Map out: trigger condition → classification step → action (reply / forward / label / archive)
- Produce pseudocode or implementation in the user's email platform (Gmail API, Outlook Graph API, SMTP/IMAP)
Validate output before delivering:
- Check that composed emails contain no placeholder text (e.g.,
[INSERT NAME])
- Confirm extracted data passes basic sanity checks (dates are valid, amounts are numeric)
Output Format
Composed Email
To: sarah.jones@example.com
Subject: Follow-up: Q3 Partnership Proposal
Hi Sarah,
Thank you for taking the time to speak with us last Tuesday. Following our conversation,
I wanted to share the updated proposal (attached) which incorporates the feedback you
provided on pricing and the implementation timeline.
Could we schedule a 30-minute call this week to walk through the changes? I'm available
Thursday between 2–5 PM EST or Friday morning.
Looking forward to hearing from you.
Best regards,
[Your Name]
Classification Output
[
{ "id": "msg_001", "category": "Urgent", "confidence": 0.94, "reason": "Subject contains 'URGENT' and sender is a known client." },
{ "id": "msg_002", "category": "Newsletter", "confidence": 0.98, "reason": "Contains unsubscribe link and bulk-send headers." }
]
Thread Summary
**Thread:** Q3 Budget Review
**Participants:** Alice (Finance), Bob (Engineering), Carol (Product)
**Topic:** Approval process for Q3 engineering headcount
**Decisions Made:**
- 3 new engineering hires approved for Q3
- Budget ceiling set at $450k
**Open Questions:**
- Recruiting timeline not yet confirmed (Bob to follow up)
**Action Items:**
- Bob: Share JD drafts by Friday
- Alice: Update budget tracker by EOD Monday
Examples
Example Input
Write a professional follow-up email to a client who hasn't responded to our proposal in 2 weeks. Keep it brief and not pushy.
Example Output
Subject: Checking In — Partnership Proposal
Hi [Client Name],
I hope you're doing well. I wanted to check in on the proposal I sent over on [Date].
I know things can get busy, so I'm happy to answer any questions or adjust any details
to better fit your needs.
If the timing isn't right, no worries — just let me know and we can revisit when it works for you.
Best,
[Your Name]
Boundaries
- Do NOT send emails on behalf of the user without explicit confirmation of the recipient, subject, and content.
- Do NOT access or read email accounts unless the user has configured the appropriate API credentials.
- Do NOT store or log email content beyond the immediate task — treat all email data as sensitive.
- Do NOT generate emails that are deceptive, impersonate someone, or are intended for spam or phishing.
- Always preserve the user's stated tone — do not inject formality that contradicts their request.
- If an email contains PII or sensitive business information, handle it with care and do not include it in logs or summaries that could be exposed.
1---2name: email-automation3description: Composes, sends, classifies, and summarizes emails based on rules, templates, or natural-language instructions. Invoke when asked to draft an email, automate email replies, set up email rules, classify an inbox, parse email content, or build email-based workflows.4---56# Email Automation78Handles the full lifecycle of email tasks — composing context-aware messages, classifying and routing incoming mail, summarizing threads, extracting structured data from messages, and building rule-based or AI-driven email workflows.910## When to Use1112- User asks to "draft", "write", or "send" an email13- User wants to automate replies to incoming messages based on content or rules14- An inbox needs to be classified, prioritized, or cleaned up15- User wants to extract data (e.g., order confirmations, meeting invites) from email bodies16- A drip campaign or follow-up sequence needs to be created17- User asks to summarize a long email thread18- User wants to set up auto-responders or filters1920## Process21221. **Identify the task type**:23 - **Compose**: Draft a new email from intent, context, or a template24 - **Reply**: Generate a reply to a provided message, matching tone and addressing all points25 - **Classify**: Categorize messages by type (support, sales, newsletter, spam, etc.)26 - **Summarize**: Condense a thread or message into key points and action items27 - **Extract**: Pull structured fields (sender, date, amount, tracking number) from an email body28 - **Workflow**: Build a rule-based pipeline (receive → classify → route → respond)29302. **For composition and replies**:31 - Infer the recipient, subject, and appropriate tone (formal, casual, technical) from context32 - Include all required components: greeting, body paragraphs addressing each point, call to action, and sign-off33 - Match the user's voice if example emails are provided34 - Flag ambiguous instructions ("mention the project") and ask for clarification before drafting35363. **For classification**:37 - Define or infer the category taxonomy (e.g., Urgent / Action Required / FYI / Newsletter / Spam)38 - Score each message against the categories using subject, sender domain, body keywords, and structural signals (unsubscribe links → newsletter)39 - Return category, confidence score, and a one-sentence rationale per message40414. **For summarization**:42 - Identify all participants and their roles in the thread43 - Extract: topic, key decisions made, open questions, and action items with owners44 - Order information by importance, not chronologically45465. **For data extraction**:47 - Define the target schema before parsing (e.g., `{order_id, vendor, amount, due_date}`)48 - Use regex for structured fields (dates, amounts, tracking codes) and NLP for free-form content49 - Flag fields that could not be extracted reliably (confidence < 80%)50516. **For workflow design**:52 - Map out: trigger condition → classification step → action (reply / forward / label / archive)53 - Produce pseudocode or implementation in the user's email platform (Gmail API, Outlook Graph API, SMTP/IMAP)54557. **Validate output before delivering**:56 - Check that composed emails contain no placeholder text (e.g., `[INSERT NAME]`)57 - Confirm extracted data passes basic sanity checks (dates are valid, amounts are numeric)5859## Output Format6061### Composed Email62```63To: sarah.jones@example.com64Subject: Follow-up: Q3 Partnership Proposal6566Hi Sarah,6768Thank you for taking the time to speak with us last Tuesday. Following our conversation,69I wanted to share the updated proposal (attached) which incorporates the feedback you70provided on pricing and the implementation timeline.7172Could we schedule a 30-minute call this week to walk through the changes? I'm available73Thursday between 2–5 PM EST or Friday morning.7475Looking forward to hearing from you.7677Best regards,78[Your Name]79```8081### Classification Output82```json83[84 { "id": "msg_001", "category": "Urgent", "confidence": 0.94, "reason": "Subject contains 'URGENT' and sender is a known client." },85 { "id": "msg_002", "category": "Newsletter", "confidence": 0.98, "reason": "Contains unsubscribe link and bulk-send headers." }86]87```8889### Thread Summary90```91**Thread:** Q3 Budget Review92**Participants:** Alice (Finance), Bob (Engineering), Carol (Product)93**Topic:** Approval process for Q3 engineering headcount9495**Decisions Made:**96- 3 new engineering hires approved for Q397- Budget ceiling set at $450k9899**Open Questions:**100- Recruiting timeline not yet confirmed (Bob to follow up)101102**Action Items:**103- Bob: Share JD drafts by Friday104- Alice: Update budget tracker by EOD Monday105```106107## Examples108109### Example Input110```111Write a professional follow-up email to a client who hasn't responded to our proposal in 2 weeks. Keep it brief and not pushy.112```113114### Example Output115```116Subject: Checking In — Partnership Proposal117118Hi [Client Name],119120I hope you're doing well. I wanted to check in on the proposal I sent over on [Date].121I know things can get busy, so I'm happy to answer any questions or adjust any details122to better fit your needs.123124If the timing isn't right, no worries — just let me know and we can revisit when it works for you.125126Best,127[Your Name]128```129130## Boundaries131132- Do NOT send emails on behalf of the user without explicit confirmation of the recipient, subject, and content.133- Do NOT access or read email accounts unless the user has configured the appropriate API credentials.134- Do NOT store or log email content beyond the immediate task — treat all email data as sensitive.135- Do NOT generate emails that are deceptive, impersonate someone, or are intended for spam or phishing.136- Always preserve the user's stated tone — do not inject formality that contradicts their request.137- If an email contains PII or sensitive business information, handle it with care and do not include it in logs or summaries that could be exposed.