| name | mia:email |
| description | Manage Gmail via n8n webhooks: fetch unread, search, read details, triage, reply, draft, archive, and mark as read. Use when the user says "check my email", "email triage", "read my inbox", "search emails", "reply to", "draft an email", "archive", "/mia:email", or any request related to reading, managing, or responding to email.
|
Email Management
Manage Gmail through n8n webhook endpoints using curl.
Endpoints
Base URL: https://n8n.przbadu.dev/webhook
| Action | Method | Endpoint | Body |
|---|
| Fetch unread | GET | /fetch-emails | -- |
| Get detail | GET | /get-email?messageId=ID | -- |
| Search | GET | /search-emails?q=QUERY | -- |
| Label | POST | /label-email | {"messageId":"..","labelIds":".."} |
| Reply | POST | /reply-email | {"messageId":"..","message":".."} |
| Draft | POST | /create-draft | {"subject":"..","message":".."} |
| Archive | POST | /archive-email | {"messageId":".."} |
| Mark read | POST | /mark-read | {"messageId":".."} |
Triage Workflow
When user says "check email" or "triage":
- Fetch unread:
curl -s 'https://n8n.przbadu.dev/webhook/fetch-emails'
- Classify each email:
- Urgent: Response needed <1 hour (key stakeholders, deadlines, escalations)
- Important: Response needed <24 hours (business discussions, meeting requests)
- Routine: Batch for digest (newsletters, notifications, FYI)
- Archive: No action needed (promotions, automated alerts)
- Present summary table: sender, subject, category
- For Urgent: fetch full detail, draft response, queue for approval
- For Archive: auto-archive (confirm with user first time)
Rules
- NEVER send replies without explicit user approval
- Show draft and wait for confirmation before calling /reply-email
- Present email summaries as concise tables
- Use Gmail search syntax for /search-emails (e.g.,
from:someone@example.com, subject:invoice, after:2026/03/01)