NexAura

Case Study: Automated Email Classification & Routing Agent

An intelligent system that monitors a shared Outlook inbox, automatically classifying, prioritising, and routing incoming emails to the right teams — or sending an automated acknowledgement — within seconds.

Project Type

AI & Automation

Core Technologies

n8n, LLMs, Outlook

Sector

Public Services / General Business Operations

Impact

Faster Responses,
Reduced Admin Overhead

The Business Challenge

Shared inboxes often receive a large volume of mixed queries — from citizen service requests to complaints, procurement issues, and IT tickets. Staff must manually read, categorise, and escalate these messages, which is slow, inconsistent, and prone to error. Urgent safety-related messages risk being buried, and repetitive acknowledgement emails consume valuable time.

The Solution: An AI Email Triage Assistant

We developed an automated workflow in n8n that transforms a public inbox into a smart triage system. Incoming emails are automatically parsed, analysed by an LLM, validated against a strict schema, and routed with conditional logic. This ensures urgent cases get flagged, routine queries get acknowledged instantly, and staff only spend time on tasks that require human judgment.

The Automated Workflow:

1. Trigger on Incoming Emails

The workflow connects to Outlook via IMAP and runs automatically when a new email arrives. Key details such as sender name, email address, subject, and body are parsed into structured variables.

2. LLM Classification & Prompting

A carefully engineered prompt is sent to an OpenAI model with controlled temperature (0.2) and strict JSON output enforcement. The model classifies the email into one of several categories (e.g. Citizen Service, Complaint, Procurement, IT Help), assigns a priority (RED, YELLOW, GREEN), and generates a concise one-sentence summary.

3. Schema Validation & Normalisation

The workflow applies custom parsing and JSON schema validation to guarantee the output conforms to the required structure. This ensures reliable downstream routing regardless of model quirks.

4. Conditional Routing

A Switch node checks the classification priority.
RED (Urgent): Forwarded immediately to the appropriate response team with all details included.
YELLOW (Review): Routed to a review team for manual triage with context attached.
GREEN (Routine): An automated acknowledgement is sent back to the original sender confirming receipt and logging of their query.

n8n Workflow for Automated Email Classification & Routing Agent

Key Outcomes & Business Impact

  • Rapid Prioritisation: Urgent cases (public safety, outages, threats) are instantly escalated, reducing risk and response delays.
  • Consistent Categorisation: All messages are classified under standard categories, improving reporting and routing accuracy.
  • Reduced Workload: Routine acknowledgements are automated, saving staff hours of repetitive typing each week.
  • Scalable Process: The workflow can be easily extended with new categories, additional routing logic, or integrations with ticketing systems.
  • Professional Communication: Automated replies maintain a consistent, clear, and professional tone with citizens and stakeholders.

Have a challenge for us?

Let's discuss how our expertise can be applied to solve your organisation's unique data and AI challenges. Schedule a complimentary call today.