CASE 13
Inbox Triage Pipeline
The inbox used to take the first hour of the day, and urgent threads could still go unread. Now a nightly run leaves a ranked briefing and action list before work starts, with a separate alert if the run is missing.
- Before
- Sorting email took the first hour, while urgent messages could sit unread for hours.
- After
- A ranked briefing waits before work starts, with an alert if the nightly run is missing.
- Role
- Triage design, briefing logic, and reliability controls
- Year
- 2026
- Updated
- Stack
- Automation · Email triage · Dashboard
- Status
- Live in production
Email took the first hour
I started each day sorting email, finding threads that needed an answer, and spotting a deadline three messages down. That work took the first hour before the rest of the day could begin. An urgent message could still sit unread for hours among newsletters and receipts.
Read the priorities before work
I built a nightly pipeline that collects a full day of email across every label. Plain rules remove obvious noise before paid sorting reads the retained threads. Those threads are ranked into four tiers: high, medium, low, and noise.
The pipeline writes a ranked briefing and a short action list, then publishes them to a dashboard, a message, and a dated archive. The first sort is ready before work starts, with the highest-priority items at the top.
A missed run raises an alert
If sorting output fails validation, a fallback retries it. Unresolved items stay visible. The pipeline can publish usable results with flagged warnings, keeping the briefing available without presenting an incomplete run as clean.
Three layers protect the day’s record from an identical duplicate run. The day’s threads identify a repeat run, the database rejects a second identical write, and a rule refuses to overwrite real counts with zeros.
A separate job checks the database to confirm that the nightly record landed. It raises an alert if the record is missing. The repository carries 179 tests across the pipeline paths.
Start with the list ready
At the start of the day, I review a short, ranked list instead of doing the first triage pass myself. The briefing and action list are already available, with warnings visible where attention is needed.
If the nightly run is missing, the separate check reports it. A missing briefing becomes an explicit alert, so I can distinguish a quiet inbox from a run that did not finish.
Frequently asked questions
Can automated email triage run overnight instead of in real time?
Yes. The scheduled job runs at 8 PM, collects the full day across every label, and sorts it into four tiers. A ranked briefing and short action list wait for morning.
What happens if email sorting returns an invalid response?
A fallback retries output that fails validation. If unresolved items remain, the usable briefing can publish with a warning flag that makes them visible.
How do you know an automated pipeline actually ran?
A separate job checks the database for the night’s record and alerts if it is missing. It checks the saved result independently of the pipeline’s own report. The pipeline has 179 tests.
How does an email triage pipeline keep processing costs down?
Plain rules remove obvious noise first, so paid sorting reads only retained threads. The combined rules and sorting still cover the full inbox.
· How it works
- 01
Collect the day's email
Run at 8 PM and pull the full day of email across every label.
- 02
Remove obvious noise
Apply plain rules first so paid sorting reads only the retained threads.
- 03
Rank each thread
Sort retained threads into high, medium, low, and noise. Retry invalid output through a fallback.
- 04
Prepare the briefing
Publish a ranked briefing and short action list to a dashboard, a message, and a dated archive.
- 05
Check the run
A separate job checks that the nightly record landed and raises an alert if it did not.
· Results
- Pipeline tests
- 179
- Thread sorting
- Primary + fallback
- Production status
- Live in production
1. A fallback retries sorting output that fails validation. Unresolved items remain visible.
2. Three checks protect against duplicate runs: identify the day's threads, reject an identical saved run, and block real counts from being overwritten with zeros.
3. Soft warnings publish with a flag. A separate job checks the database for the nightly record. The pipeline has 179 tests.