Case study · Finance operations
AI invoice and expense automation that files itself
Invoices and receipts arrived by email and someone had to open each one, type the details into a system and save the file in the right folder. We built an automation that reads every invoice email, pulls out the data with AI, files the document and records it, then gives the team one app to see all invoices.
The challenge
What wasn’t working
Invoice and expense emails had to be handled by hand: opened, read, typed into a record and the attachment saved to Drive.
It was slow, repetitive work, and keeping documents filed the same way every time depended on whoever happened to be doing it.
The team wanted the routine work automated, and one place where anyone could look up an invoice.
The solution
What we built
Email intake
Every incoming invoice or expense email is picked up automatically.
AI data extraction
Gemini reads each invoice and receipt, pulls out the key details and assigns each one a category.
Drive that files itself
Documents are filed by vendor, then by year and month. When a new vendor appears, its folder is created on the spot.
A proper database
Every extracted record is stored in PostgreSQL along with a link to the original file in Drive.
Invoice app for the team
An internal app that lists every invoice in one place, so nobody has to dig through email or folders.
Linked to the original file
Every record keeps a link to its document in Google Drive, so the original invoice is always one click away.
How it works
How an invoice moves through the system
- 1
Email arrives
An invoice or expense email lands in the inbox and Zapier picks it up.
- 2
AI reads it
Gemini extracts the details from the attachment and assigns a category.
- 3
Filed in Drive
The document is saved under the vendor’s folder, sorted by year and month, with a new folder created if needed.
- 4
Recorded
The data and the Drive link are written to PostgreSQL.
- 5
Visible to the team
The invoice appears in the internal app, ready to search and review.
The result
What changed
- Invoice and expense details are no longer typed in by hand
- Every document is filed the same way, by vendor, year and month
- New vendors are handled automatically, with no folder admin
- The whole team can find any invoice from one internal app
More work
More case studies
Have a project like this?
Tell us what you need to build. In 30 minutes we’ll map what to build first and follow up with a fixed-scope estimate.
Official Retool Agency Partner5.0 on Clutch, 8 verified reviewsBuilding software since 2015Reply within one business day