Invoice Approval Routing
Build an internal tool that routes incoming invoices to the right approver based on amount, department, and GL code, then chases down stalls with reminders and escalation - so approvals stop dying in email.
A login-protected approval tool: import invoices, auto-assign the right approver(s) by your matrix, email an approve/reject request, send reminders and escalate stalls, and export approved invoices plus a complete approval log - with a hard rule that nothing is ever marked approved without the required sign-offs.
Before you start
- A free Vercel account
- A free Supabase account
- A free Resend account (and a sender address you can use)
- An invoices CSV (vendor, amount, department, GL code)
- An approval-matrix sheet (thresholds -> approvers)
The problem this kills
Invoices land in someone's inbox and then... wait. Who has to approve this one? Does the $14,200 capital purchase need a second sign-off, or just the department head? Did Dana actually approve it, or did she just reply "looks fine" on a forwarded thread? Is this the second time we're about to pay the same invoice?
In most AP teams the "approval workflow" is a tangle of forwarded emails, a shared spreadsheet someone updates by hand, and a lot of nudging people in the hallway. Things stall for days because nobody is sure it's their turn. Over-threshold invoices slip through with one signature instead of two. Duplicates get paid. And when the auditor asks "show me who approved this and when," you're scrolling through six months of email.
This tool replaces the email limbo with a clear, enforced routing process - and a clean record of every decision.
What you'll build
A small internal web app, just for your team, that:
- Imports a batch of invoices from a CSV (vendor, amount, department, GL code).
- Reads your approval matrix - the rules that say which dollar thresholds route to which approvers - and assigns the correct approver(s) to each invoice automatically.
- Emails each approver a clean approve / reject request with a comment box, via Resend.
- Requires a second approver on anything over your threshold before it can ever be marked payable.
- Sends reminders when an invoice has been sitting, and escalates to a backup or manager when it stalls past your limit.
- Lets you reassign an invoice when an approver is out of office.
- Dedupes on invoice ID so the same invoice can't sneak through twice.
- Exports the approved invoices (ready to hand to your payment system) plus a full approval log of who did what and when.
What's inside the Implementation Plan
The plan is a single markdown file you paste into Claude Code (a free AI coding agent). It walks the agent through building the whole tool, step by step, each step ending with a ready-to-paste prompt.
The most important part: the plan opens by interviewing you about your business. Before it writes a single line, the agent asks how invoices reach you today, what your approval matrix actually looks like, the real field names and codes in your data, your typical and peak invoice volumes, your exact threshold and second-approver rules, and your messiest edge cases (credit memos, foreign currency, split GL coding, an approver who left). It reads a short tailored spec back to you, you confirm it, and only then does it build - so you get a tool shaped to your AP process, not a generic template you have to bend to fit.
Inside you'll find:
- The discovery interview and how the agent turns your answers into the data model.
- The full build: database, login, CSV import with duplicate guards, the routing engine, the approval screens, the email + reminder + escalation flow.
- The hard human approval gate and multi-level sign-off logic.
- Verification steps so you can prove it works, and the CSV-export fallback so it's fully usable even before you connect it to your accounting system.
The governance it includes (this is the point)
This isn't a toy. The plan builds in the controls a finance team actually needs:
- Login so only your team can see or touch anything.
- Row-level security so people only see the invoices and approvals that belong to your organization.
- A complete audit trail - every assignment, approval, rejection, reminder, escalation, and reassignment is logged with who and when.
- A hard human-in-the-loop gate - the AI routes and drafts, but a real approver must review and approve; nothing is ever auto-approved.
- Required sign-offs enforced in code - an over-threshold invoice physically cannot reach "approved" without its second approver.
- Duplicate guards so the same invoice ID can't be processed or paid twice.
Who it's for
AP clerks, AP managers, controllers, and ops/BPM folks whose invoice approvals keep getting stuck in email limbo - and who want a real, auditable routing tool without hiring a developer or buying a heavyweight AP platform. You don't need to write code. You need your invoices CSV, your approval matrix, and an afternoon-to-a-weekend.
You've got this - paste the first prompt and let the agent interview you.