salesintermediate20 min setupby Mantle
Sales inbox: qualify and route
Poll the sales mailbox, classify each email as lead / existing customer / vendor, create Iris records for new leads and forward the rest to the right team.
Drag to pan, pinch to zoom. This is the real graph the template installs.
How it works
What it does
- Every 10 minutes fetch the next unread sales email.
- Classify into
new_lead | existing_customer | vendor | other. - new_lead → map → create an Iris record (
entity_type: leads); anything else is forwarded to the account team with the label in the subject.
Setup
- Gmail connection on Fetch sales inbox; AI connection on the classifier; Iris connection on Create Iris lead; SendGrid/SMTP on Forward to account team.
- Change
entity_typeand the mapping to your Iris schema.
Nodes 7
- 01Every 10 minutestrigger.scheduleTrigger
- 02Fetch sales inboxmail.fetchDestination
- 03Lead, customer or vendor?ai.classifyAI
- 04Routecontrol.branchLogic
- 05Lead recorddata.mapData
- 06Create CRM leadhttp.requestHTTP
- 07Forward to account teammail.sendDestination
View template JSON
{
"format": "mantle-workflow/v1",
"id": "sales-inbox-lead-router",
"name": "Sales inbox: qualify and route",
"graph": {
"nodes": [
{
"id": "schedule",
"type": "trigger.schedule",
"label": "Every 10 minutes",
"config": {
"interval_sec": 600,
"timezone": "UTC"
},
"connection_id": null,
"worker_type": "generic-worker",
"position": {
"x": 60,
"y": 220
}
},
{
"id": "gmail_fetch",
"type": "mail.fetch",
"label": "Fetch sales inbox",
"config": {
"label": "inbox",
"unread_only": true,
"max_scan": 20,
"mark_read": true
},
"connection_id": null,
"worker_type": "generic-worker",
"position": {
"x": 380,
"y": 220
}
},
{
"id": "ai_classify",
"type": "ai.classify",
"label": "Lead, customer or vendor?",
"config": {
"model": "claude-haiku-4-5",
"labels": [
"new_lead",
"existing_customer",
"vendor",
"other"
],
"text": "From: {{ steps.gmail_fetch.from }}\nSubject: {{ steps.gmail_fetch.subject }}\n\n{{ steps.gmail_fetch.text }}",
"temperature": 0
},
"connection_id": null,
"worker_type": "ai-worker",
"position": {
"x": 700,
"y": 220
}
},
{
"id": "branch_route",
"type": "control.branch",
"label": "Route",
"config": {
"mode": "first_match"
},
"connection_id": null,
"worker_type": "generic-worker",
"position": {
"x": 1020,
"y": 220
}
},
{
"id": "map_lead",
"type": "data.map",
"label": "Lead record",
"config": {
"mappings": {
"email": "steps.gmail_fetch.from",
"subject": "steps.gmail_fetch.subject",
"notes": "steps.gmail_fetch.snippet",
"leadSource": "'sales-inbox'"
}
},
"connection_id": null,
"worker_type": "generic-worker",
"position": {
"x": 1340,
"y": 30
}
},
{
"id": "create_lead",
"type": "http.request",
"label": "Create CRM lead",
"config": {
"method": "POST",
"url": "https://crm.example.com/api/leads",
"json": {}
},
"connection_id": null,
"worker_type": "generic-worker",
"position": {
"x": 1660,
"y": 30
}
},
{
"id": "send_forward",
"type": "mail.send",
"label": "Forward to account team",
"config": {
"to": "accounts@example.com",
"subject": "FWD: {{ steps.gmail_fetch.subject }} ({{ steps.ai_classify.response.label }})",
"body_text": "From: {{ steps.gmail_fetch.from }}\n\n{{ steps.gmail_fetch.text }}"
},
"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_route"
},
{
"from": "branch_route",
"to": "map_lead",
"branch": "true",
"condition": {
"match": "all",
"rules": [
{
"left": "response.label",
"op": "equals",
"right": "new_lead"
}
]
},
"label": "new lead"
},
{
"from": "map_lead",
"to": "create_lead"
},
{
"from": "branch_route",
"to": "send_forward",
"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.