Inbound triage

Triage inbound email with rules and AI.

Classify inbound mail, suggest labels, score priority, prepare safe replies, and surface only the work that needs a person.

Token first

Make sure the agent has these scopes.

Create a new token or update the agent's current token before trying the calls below.

Required token scopes

email:read labels:write workflows:write llm:write task:read

Outcome

What this gives you.

Routine mail is labeled, routed, acknowledged, or held for review before it becomes a human bottleneck.

Use when

The operational shape.

  • A shared or agent-owned inbox receives repeated questions, requests, or operational exceptions.
  • You want deterministic rules first, with AI conditions only where meaning matters.
  • You need high-priority mail to appear in the agenda with the supporting context attached.

API sequence

The calls to make.

01

Enable triage enrichment

PUT/v1/enrichment/

Turn on phishing checks, label suggestions, next-step hints, and priority signals for the inbox.

Default example
Use this as the default shape for this step.
{
  "inbox_id": "inb_support",
  "model": "claude-haiku-4-5",
  "enabled_features": [
    "phishing_detection",
    "label_suggest",
    "next_step",
    "priority_scoring"
  ],
  "budget_limit": 50.00
}
02

Create triage labels

POST/v1/labels/

Define labels for urgent, customer, vendor, finance, low-priority, or needs-human categories.

Default example
Use this as the default shape for this step.
{
  "name": "Needs human review",
  "inbox_id": "inb_support",
  "label_scope": "read_write",
  "color": "#111111"
}
03

Create the triage rule

POST/v1/workflows/

Apply deterministic and AI conditions that label, draft, route, or hold matching messages.

Default example
Use this as the default shape for this step.
{
  "name": "Triage urgent customer mail",
  "trigger": "email_received",
  "conditions": [
    {"field": "from_domain", "op": "eq", "value": "customer.example"},
    {"op": "ai", "value": "The message asks for urgent help or contains a business-impacting exception."}
  ],
  "writes": [
    {"source": {"from": "event.payload"}, "target": {"type": "email.add_label", "label_id": "triage/needs-human"}},
    {"source": {"from": "event.payload"}, "target": {"type": "task"}, "contract": {"required": ["summary"]}}
  ]
}
04

Review the agenda

GET/v1/agenda/

Show pending approvals, tasks, suggested replies, and urgent follow-ups in one operator queue.

Controls

Review points.

  • Use fixed fields for cheap routing and AI conditions only when the route depends on message meaning.
  • A draft or risky action should enter approvals or agenda rather than sending directly.