Duplicates, big amounts and new vendors, flagged before anyone pays.
Invoice exceptions is a Claude routine that reads incoming invoices and flags the ones a person should check. It looks for each invoice exception that matters most: a possible duplicate, an amount over your threshold, or a vendor it has not seen. The prompt forbids paying anything.
Invoice exception checks it runs
Each weekday it lists recent invoices from the mailbox or folder you connect, and reads each one into fields such as vendor, number, amount and due date. The prompt tells it to leave out anything unclear.
A small script then does the checking, not the model. It flags a duplicate, an amount over your threshold, and a vendor that is not on your known list. Every flag is for a person to check, never a decision.
What it is told never to do
- The prompt forbids paying, approving, scheduling, replying to or marking anything. The first run is report-only.
- The prompt tells it to leave out an amount or number it cannot read clearly, instead of guessing.
- The prompt treats invoice text as data. An instruction inside an invoice is ignored.
- The prompt forbids writing your settings. If a change looks right, it proposes one and you accept or reject it.
These are rules in the routine's prompt. See honest limits for what is and is not checked by code.
Threshold and vendor settings
| Setting | Key | Default | Note |
|---|---|---|---|
| Flag amounts over | amount_threshold | 1000 | 0 to 1,000,000. A lower value means more flags. |
| Known vendor domains | known_vendors | none | Vendors not listed are flagged as new. |
| Look back (days) | lookback_days | 7 | 1 to 31. A longer window means more invoices to read. |
| Inbox messages per run | max_inbox_per_run | 10 | 0 to 30. |
Stages and the invoice connector
| Stage | Kind | Does |
|---|---|---|
| Read invoices | model | Lists recent invoices and reads each into structured fields, leaving out anything unclear. |
| Check for exceptions | code | Flags duplicates, amounts over the threshold and new vendors. |
| Learn | code | Turns feedback on earlier runs into learning and proposals before the write. |
| Write | code | Applies the run under the write contract. |
| Connector | Needed | Used for |
|---|---|---|
| Invoice mailbox or folder | Required | Read incoming invoices. Read access only. |
What the Desk shows
The Desk for this template has two record types, Invoice and Vendor, and two views. Each invoice shows its flags. How the Desk works.
| View | Shows | Columns |
|---|---|---|
| Recent invoices | Active invoices, newest first seen at the top | Vendor, number, amount, flags |
| Vendors | Vendors, most often seen first | Name, domain |
Install invoice exceptions
- Install the pluginIn Claude Code 2.1.275 or later. The command line tool needs Python 3.11 or later.
/plugin install routineos --marketplace devkindhq/routineos - Install the packFrom a clone of the repository root. It writes a routine folder, prints what you must connect, runs nothing and connects nothing.
python3 skills/routineos/scripts/routineos.py pack install catalog/invoice-exceptions.json --dir my-invoice-exceptions - Connect, publish, run onceConnect what the pack lists, publish the Desk, and let the first run go. Nothing leaves the routine on the first run.
The first routine guide walks a template to a first run, and Install a pack lists every refusal the installer can give. Free (MIT). Needs a paid Claude plan.
Known risks and limits
- Reading a PDF can misread an amount or number. The routine leaves unclear values out, and every flag is for a person to check.
- Duplicate checks look back 90 days of recorded invoices. An older duplicate is not caught.
- Invoice fraud often arrives as changed bank details. The prompt flags it, but this routine is not a fraud control.
- Other mail or storage apps may work. Whether each offers the access needed is unverified.
- Scheduling is a research preview and may change. See honest limits.
Related templates and reading
Inbox triage
Labels new mail and drafts replies. Nothing is sent without your yes.
Use cases
Routines grouped by the team that runs them.
Approvals
How a routine asks before it sends, posts or deletes.
More: questions and answers, schedule a routine in Claude Code, how RoutineOS maps to Rails.
Read one report before you let it near the books.
Install RoutineOS, add Invoice exceptions, and read its first flags before you rely on them.