aiintermediate15 min setupby Mantle
Inbox triage: classify and route email
Every 15 minutes, fetch the next unread email, classify it (urgent / billing / general) and route urgent ones to the on-call inbox with an auto-acknowledgement.
Drag to pan, pinch to zoom. This is the real graph the template installs.
How it works
What it does
- Runs on a 15-minute schedule, pulls the next unread inbox message via Gmail and marks it read.
ai.classifypicks exactly one ofurgent | billing | general(deterministic, temperature 0).- The Urgent? branch escalates urgent mail to the on-call address; everything else gets a polite auto-acknowledgement.
Setup
- Choose the Gmail connection on Fetch next unread email (adjust
label/queryto narrow the mailbox). - Choose an AI provider connection on Classify email; edit the label set to match your queues.
- Set the on-call address and a SendGrid / SMTP connection on both send nodes.
- Publish — the scheduler registers the interval automatically.
Nodes 6
- 01Every 15 minutestrigger.scheduleTrigger
- 02Fetch next unread emailmail.fetchDestination
- 03Classify emailai.classifyAI
- 04Urgent?control.branchLogic
- 05Escalate to on-callmail.sendDestination
- 06Auto-acknowledgemail.sendDestination
View template JSON
{
"format": "mantle-workflow/v1",
"id": "ai-email-triage",
"name": "Inbox triage: classify and route email",
"graph": {
"nodes": [
{
"id": "schedule",
"type": "trigger.schedule",
"label": "Every 15 minutes",
"config": {
"interval_sec": 900,
"timezone": "UTC"
},
"connection_id": null,
"worker_type": "generic-worker",
"position": {
"x": 60,
"y": 220
}
},
{
"id": "gmail_fetch",
"type": "mail.fetch",
"label": "Fetch next unread email",
"config": {
"label": "inbox",
"unread_only": true,
"max_scan": 10,
"mark_read": true
},
"connection_id": null,
"worker_type": "generic-worker",
"position": {
"x": 380,
"y": 220
}
},
{
"id": "ai_classify",
"type": "ai.classify",
"label": "Classify email",
"config": {
"model": "claude-haiku-4-5",
"labels": [
"urgent",
"billing",
"general"
],
"text": "Subject: {{ steps.gmail_fetch.subject }}\nFrom: {{ steps.gmail_fetch.from }}\n\n{{ steps.gmail_fetch.text }}",
"temperature": 0
},
"connection_id": null,
"worker_type": "ai-worker",
"position": {
"x": 700,
"y": 220
}
},
{
"id": "branch_urgent",
"type": "control.branch",
"label": "Urgent?",
"config": {
"mode": "first_match"
},
"connection_id": null,
"worker_type": "generic-worker",
"position": {
"x": 1020,
"y": 220
}
},
{
"id": "send_escalation",
"type": "mail.send",
"label": "Escalate to on-call",
"config": {
"to": "oncall@example.com",
"subject": "[URGENT] {{ steps.gmail_fetch.subject }}",
"body_text": "From: {{ steps.gmail_fetch.from }}\n\n{{ steps.gmail_fetch.text }}"
},
"connection_id": null,
"worker_type": "generic-worker",
"position": {
"x": 1340,
"y": 30
}
},
{
"id": "send_ack",
"type": "mail.send",
"label": "Auto-acknowledge",
"config": {
"to": "{{ steps.gmail_fetch.from }}",
"subject": "Re: {{ steps.gmail_fetch.subject }}",
"body_text": "Thanks — we received your message and will reply within one business day."
},
"connection_id": null,
"worker_type": "generic-worker",
"position": {
"x": 1340,
"y": 410
}
}
],
"edges": [
{
"from": "schedule",
"to": "gmail_fetch"
},
{
"from": "gmail_fetch",
"to": "ai_classify"
},
{
"from": "ai_classify",
"to": "branch_urgent"
},
{
"from": "branch_urgent",
"to": "send_escalation",
"branch": "true",
"condition": {
"match": "all",
"rules": [
{
"left": "response.label",
"op": "equals",
"right": "urgent"
}
]
},
"label": "urgent"
},
{
"from": "branch_urgent",
"to": "send_ack",
"branch": "false",
"label": "everything else",
"priority": 1
}
]
}
}Use it, then make it yours.
Templates install as drafts. Change anything, and Workflow Health re-checks the graph on every save.