How I dug a year of lost receipts out of my inbox with AI agents

How I dug a year of lost receipts out of my inbox with AI agents — they do the digging, I keep the judgement. The pattern + the prompt for any search-and-file backlog.

How I dug a year of lost receipts out of my inbox with AI agents

This week I cleared a job I’d been dreading: a year of business expenses logged in my accounts with the actual receipts missing — 36 of them. Hunting each one by hand would have eaten a miserable day. Instead I pointed a couple of AI agents at the pile. They did the digging, I made the judgement calls, and between us we recovered 24 and worked out why the other 12 couldn’t be found. Here’s the pattern, which works for any backlog that’s really a search-and-file job.

💡 An AI agent can take actions for you — search your files, open a web page, save a document. Point it at boring admin and it does the legwork while you make the decisions.

Two robots did the digging, I did the deciding

One agent — a coding assistant called Codex — read back through my email archive and pulled out 19 receipt PDFs.

https://github.com/openai/codex

A second, a browser agent, opened three receipts that only existed as web pages and saved them as PDFs. Everything then got filed against the right expense in my bookkeeping tool, Invoice Ninja, and named consistently.

https://www.invoiceninja.com

I caught two more the agents had missed (24 recovered so far), and the last twelve turned out to be genuinely gone — billed dashboard-only with no emailed receipt, or, in one case, not mine to claim at all. That’s the full 36 accounted for.

💡 A note on tools: Codex is a developer tool that runs in a terminal. If that’s not you, the same job works with any AI assistant that can search your files. The pattern below is what matters; the specific tool is interchangeable.

What an “agent” is (and what I mean by “co-agents”)

A chatbot answers questions. An agent goes a step further: it can read through a folder, open a web page, download a file, rename it. Using more than one for different parts of a job is what I mean by co-agents — one is good at reading your files, another at driving a browser, and you sit on top deciding what’s right.

Your admin backlog is really a search-and-file job

Almost every admin pile is secretly a search-and-file problem — receipts, contracts, invoices, statements, signed forms. That’s exactly the shape of work an agent is good at and you are not: thousands of items, dull pattern-matching, no real judgement needed until the very end. Hand over the digging, keep the deciding, and a day’s dread becomes an afternoon’s review.

How to run the same play

  1. Point an agent at where the documents live — your mail archive, a folder, a cloud drive — and tell it plainly what you’re looking for.

  2. Match on the durable detail. Most software bills you through a payment company, so the email comes from “Stripe” or “Paddle” rather than the brand you recognise. Match on the vendor and the date; ignore the amount, since currency conversion means it rarely lines up.

  3. Turn web-page receipts into files. Some receipts only exist as a web page. A browser agent can open each one and save it as a PDF, which is what your records and your accountant actually want.

  4. File on a consistent naming scheme so future-you can find anything — date, vendor, done.

  5. Keep the judgement calls. What’s genuinely missing, what’s deductible, what isn’t yours to claim — that stays with you. A clean “this one can’t be found, and here’s why” is a useful result in its own right.

A prompt to set it going

Search my email (and [folder / Drive]) for receipts and invoices from the last
12 months. Note: most services bill through a payment company, so the sender is
often "Stripe" or "Paddle" rather than the brand — match by vendor name and
date, and ignore the amount (currency conversion means it rarely matches). For
each one you find, save the PDF named YYYY-MM-DD_vendor.pdf into [folder]. If a
receipt is only a web page, open it and save it as a PDF. Give me one list of
what you found and a separate list of what you couldn't, each with the reason.

Where to stop the robot

I tried to push the browser agent further — to log into accounts on its own and fetch the receipts that only live behind a login. Don’t. A robot logging into your accounts unsupervised is a security problem. Knowing when to stop one is part of running it. Let it do the open, public digging; you handle anything that needs a password.

This week I cleared a job I’d been dreading: a year of business expenses logged in my accounts with the actual receipts missing — 36 of them. Hunting each one by hand would have eaten a miserable day. Instead I pointed a couple of AI agents at the pile. They did the digging, I made the judgement calls, and between us we recovered 24 and worked out why the other 12 couldn’t be found. Here’s the pattern, which works for any backlog that’s really a search-and-file job.

💡 An AI agent can take actions for you — search your files, open a web page, save a document. Point it at boring admin and it does the legwork while you make the decisions.

Two robots did the digging, I did the deciding

One agent — a coding assistant called Codex — read back through my email archive and pulled out 19 receipt PDFs.

https://github.com/openai/codex

A second, a browser agent, opened three receipts that only existed as web pages and saved them as PDFs. Everything then got filed against the right expense in my bookkeeping tool, Invoice Ninja, and named consistently.

https://www.invoiceninja.com

I caught two more the agents had missed (24 recovered so far), and the last twelve turned out to be genuinely gone — billed dashboard-only with no emailed receipt, or, in one case, not mine to claim at all. That’s the full 36 accounted for.

💡 A note on tools: Codex is a developer tool that runs in a terminal. If that’s not you, the same job works with any AI assistant that can search your files. The pattern below is what matters; the specific tool is interchangeable.

What an “agent” is (and what I mean by “co-agents”)

A chatbot answers questions. An agent goes a step further: it can read through a folder, open a web page, download a file, rename it. Using more than one for different parts of a job is what I mean by co-agents — one is good at reading your files, another at driving a browser, and you sit on top deciding what’s right.

Your admin backlog is really a search-and-file job

Almost every admin pile is secretly a search-and-file problem — receipts, contracts, invoices, statements, signed forms. That’s exactly the shape of work an agent is good at and you are not: thousands of items, dull pattern-matching, no real judgement needed until the very end. Hand over the digging, keep the deciding, and a day’s dread becomes an afternoon’s review.

How to run the same play

  1. Point an agent at where the documents live — your mail archive, a folder, a cloud drive — and tell it plainly what you’re looking for.

  2. Match on the durable detail. Most software bills you through a payment company, so the email comes from “Stripe” or “Paddle” rather than the brand you recognise. Match on the vendor and the date; ignore the amount, since currency conversion means it rarely lines up.

  3. Turn web-page receipts into files. Some receipts only exist as a web page. A browser agent can open each one and save it as a PDF, which is what your records and your accountant actually want.

  4. File on a consistent naming scheme so future-you can find anything — date, vendor, done.

  5. Keep the judgement calls. What’s genuinely missing, what’s deductible, what isn’t yours to claim — that stays with you. A clean “this one can’t be found, and here’s why” is a useful result in its own right.

A prompt to set it going

Search my email (and [folder / Drive]) for receipts and invoices from the last
12 months. Note: most services bill through a payment company, so the sender is
often "Stripe" or "Paddle" rather than the brand — match by vendor name and
date, and ignore the amount (currency conversion means it rarely matches). For
each one you find, save the PDF named YYYY-MM-DD_vendor.pdf into [folder]. If a
receipt is only a web page, open it and save it as a PDF. Give me one list of
what you found and a separate list of what you couldn't, each with the reason.

Where to stop the robot

I tried to push the browser agent further — to log into accounts on its own and fetch the receipts that only live behind a login. Don’t. A robot logging into your accounts unsupervised is a security problem. Knowing when to stop one is part of running it. Let it do the open, public digging; you handle anything that needs a password.