Skip to content
Aldridge Dagos Get in touch

CASE 10

Inbox Triage Pipeline

The inbox used to be the first hour of the day. Now a pipeline reads a full day of email every night and leaves a ranked briefing waiting before work starts.

Role
Design, build, automate
Year
2026
Stack
Automation · AI · Dashboard
Status
Live in production

01 The problem

The inbox ate the first hour of every day. Sorting what mattered from what did not, finding the thread that needed an answer, noticing the deadline buried three messages down. The work happened before the real work even started, and none of it needed a person. Worse, an urgent message could sit unread for hours behind a wall of newsletters and receipts, and I would not know until it was already late.

02 The system

A pipeline that does it overnight. Every evening it pulls the full day of email across every label, drops the obvious noise with plain rules so the expensive step only reads what matters, then hands the rest to a language model that reads each thread and sorts it into four tiers. It writes a ranked briefing and a short action list, then leaves them on a dashboard, in a message, and in a dated archive. By the time I sit down, the sorting is done and the one email that mattered is at the top.

03 How it holds up

It runs on two models, not one. The primary sorts every thread, and a second takes over the moment the first returns anything broken, so the briefing never comes up blank. Three separate layers stop a duplicate run from overwriting a good day with a bad one. It publishes on soft warnings and flags them rather than failing into an empty screen, so I always get a briefing even on an off night. A separate watchdog confirms each night’s run actually landed and raises an alert if it did not, which means the system watches itself instead of waiting for me to notice a gap. 179 tests cover the parts that matter.

04 The result

I got the first hour of every day back. The inbox sorts itself before work starts, so what is left is a short, ranked list of what actually needs a person and a briefing already waiting. I stopped missing the one email that mattered, and the pipeline tells on itself the rare time something slips, so the briefing is always there.

· How it works

  1. 01

    It runs every night

    A scheduled job fires at 8 PM and pulls the whole day of email across every label.

  2. 02

    Cheap pass first

    Plain rules drop the obvious noise before any model runs, so the expensive step only reads what matters.

  3. 03

    Sort into tiers

    A model reads each thread and sorts it into high, medium, low, and noise, with a second model taking over if the first returns anything broken.

  4. 04

    Write the briefing

    It builds a ranked briefing and a short action list, then publishes to a dashboard, a message, and a dated archive.

  5. 05

    Watch the watcher

    A separate job checks that the night's run actually landed, and raises an alert if it did not.

· Results

Tests
179
Models
GPT-5 + Claude
Status
Live in production

1. Two models, not one. A primary model sorts every thread, and a second model takes over automatically the moment the first returns anything that fails to parse, so a bad response never blanks the report.

2. Three layers stop a double run from corrupting a day: a fingerprint of the day's threads, a database key that rejects the second identical write, and a trigger that refuses to overwrite real counts with zeros.

3. It publishes on soft warnings and flags them, instead of hard-failing into an empty dashboard, and a separate watchdog checks the database rather than trusting the pipeline to report on itself. 179 tests sit behind it.