# Triage Gmail inbox, route emails with Jev, and draft replies with OpenAI

> Quick overview This workflow monitors unread Gmail inbox messages, uses TypeSafe AI Jev to score urgency and route each email to a department label, and, when a reply is needed, uses OpenAI to generate a Gmail draft reply and logs all decisions to an n8n Data Table. How it works 1. Triggers every minute when a new unread email arrives in your Gmail inbox. 2. Extracts key fields (sender, subject, body, thread ID) and builds a condensed email context for downstream processing. 3. Uses TypeSafe AI Jev to score the email’s urgency and estimate whether it needs a personal reply and whether the sender is upset. 4. Uses TypeSafe AI Jev to route the email to Sales, Support, Billing, Partnerships, Newsletters, Spam, or a low-confidence “To review” path. 5. Adds the corresponding Gmail label to the message and records the chosen department and routing confidence. 6. If Jev predicts the email needs a reply (and it is not Spam or Newsletters), OpenAI generates a short reply draft and saves it as a

- **Domain**: `n8n-workflow-20705.n8n.io`
- **Provider**: n8n.io (https://n8n.io)
- **Kind**: workflow
- **Live-responds (last probe)**: None
- **Signed card**: False
- **Streaming**: False
- **Quality score**: 40%

## URLs
- Agent card: https://n8n.io/workflows/20705
- Page (HTML): https://agenstry.com/agents/n8n-workflow-20705.n8n.io
- Documentation: https://n8n.io/workflows/20705
