DEV Community

Abe Turan
Abe Turan

Posted on Originally published at deepusecase.com

How to Set Up AI for Expense Management (A Practical Guide)

Tired of Manual Expense Tracking? Here’s the Fix.

Your shoebox of receipts is a liability. So is that half-finished spreadsheet you update once a quarter. Manually entering expense data is a soul-crushing task that costs you hours and introduces errors. Most off-the-shelf expense apps are either too simple or too bloated for a solo operator. I'm going to show you how to build your own automated system that actually works, using a few powerful tools that connect together. By the end of this, you'll have a pipeline that turns a photo of a receipt into a perfectly categorized entry in a database, with almost no effort on your part.

This isn't a theoretical overview. It's a production-ready workflow I've built and used myself. It saves me from ever having to stare at a pile of receipts again.

The Core Stack: What You Actually Need

Forget about finding one magic app that does everything. The right approach is to chain a few specialist tools together. Each one does its job exceptionally well, and an automation platform acts as the glue. Here’s the setup:

  • An Email Inbox: You need a digital entry point. I use a dedicated alias, receipts@mydomain.com, that I forward all digital receipts to. For paper receipts, I just snap a photo and email it to that address from my phone. Simple.
  • An OCR Tool (Nanonets): OCR stands for Optical Character Recognition. It's the tech that reads text from images. We'll use Nanonets. It has a decent free tier and its API is straightforward. Its job is to ingest the receipt image or PDF and spit out the raw text it sees.
  • An LLM for Structuring (OpenAI): This is the most important piece, and the one most people miss. Raw OCR text is a mess. We'll feed that text to an LLM—specifically OpenAI's GPT-4o via its API—to intelligently extract, clean, and categorize the data. The API costs are trivial for this use case, we're talking a dollar or two a month.
  • An Automation Platform (Make (formerly Integromat)): This is the engine that connects everything. When a new email with a receipt arrives, Make.com will trigger the workflow, send the file to Nanonets, pass the text to OpenAI, and then put the structured data where it belongs. I prefer Make.com over Zapier automations for this because its visual interface is better for multi-step workflows and its pricing is more predictable. The free plan is enough to process around 200 receipts a month.
  • A Database (Airtable): This is where your clean expense data will live. A simple Airtable base is perfect. It's way more flexible than a spreadsheet and the free plan is more than generous enough for this.

That's the entire stack. No custom code, no servers to manage. Just a handful of powerful, low-cost services connected together.

Step-by-Step: Building the Receipt-to-Airtable Pipeline

Let's build this thing in Make.com. The process is logical: trigger, read, understand, save.

Step 1: The Trigger (Email)

In a new Make.com scenario, your first module is the trigger. Choose the Email module and select Watch Emails. Connect it to your receipts inbox. I recommend setting it to watch for emails with attachments in a specific folder. This keeps it from firing on every single email you receive. Set it to run every 15 minutes.

Step 2: The OCR (Nanonets)

Next, add the HTTP module to call the Nanonets API. You'll need to create a free Nanonets account and set up a new OCR model. This sounds intimidating, but it's not. You just upload about 10 sample receipts and draw boxes on the fields you care about: vendor, date, and total. My one gripe with Nanonets is that this initial training UI can be a bit fiddly, but you only have to do it once. Once trained, you get an API endpoint.

In the Make.com HTTP module, configure it to make a POST request to your Nanonets API endpoint. You'll send the email attachment from the first module as the file in your request. Nanonets will process it and return a block of raw, unstructured text. It’s ugly, but it contains the necessary information.

Step 3: The LLM Parser (OpenAI)

This is where the magic happens. Add the OpenAI module and choose the Create a Completion action. You'll feed the messy text from Nanonets into a carefully crafted prompt. This prompt is the brain of the operation.

Here is a solid starting prompt. You'll want to use the GPT-4o model for the best results.

You are an expert bookkeeper. Your task is to extract and structure data from OCR text from a receipt. The text is often messy and contains irrelevant information.

OCR Text:---{{2.data}} // This maps the raw text output from the Nanonets module---

Extract the following fields and return ONLY a valid JSON object with these exact keys: "vendor_name", "transaction_date", "total_amount", "category".

Instructions:- For "vendor_name", find the merchant's name. Clean it up if necessary (e.g., "SQ *THE COFFEE PLACE" should be "The Coffee Place").- For "transaction_date", find the date and format it as YYYY-MM-DD.- For "total_amount", find the final total amount as a number, without currency symbols or commas.- For "category", categorize the expense into one of the following: "Software", "Office Supplies", "Travel", "Meals", "Marketing", "Utilities", "Other". Use your best judgment based on the vendor name.

If you cannot confidently determine a value for any field, use null.

The OpenAI module will return a clean JSON object. Add a JSON module in Make.com with the Parse JSON action to convert this text response into structured data you can use in the next step.

Step 4: The Destination (Airtable)

The final step is to add an Airtable module and choose Create a Record. Connect it to your Airtable account and select the Base and Table you set up for your expenses. Now, you simply map the data from the parsed JSON to the corresponding fields in your Airtable table: vendor_name from the AI goes to your Vendor column, total_amount goes to your Amount column, and so on. My concrete love here is how Make.com lets you just drag and drop these data pills. It's incredibly satisfying to see it all connect visually.

And that's it. You now have a running automation.

What do you do when the AI gets it wrong?

It will get things wrong sometimes. Don't expect 100% perfection. An OCR model might misread a number, or the LLM might miscategorize a new vendor. The goal isn't perfection; it's to eliminate 95% of the manual work. For the last 5%, you need a simple review process.

This is easy to build. In your Airtable base, add a checkbox field called "Needs Review".

Then, go back to your Make.com scenario. After the OpenAI module, add a Router. A router creates conditional paths. Create two paths:

  • The "Good" Path: If the total_amount is not null AND the vendor_name is not null, it proceeds to the Airtable module as before. In this Airtable module, ensure the "Needs Review" checkbox is set to false.
  • The "Bad" Path: Create a filter on the second path. If total_amount is null OR vendor_name is null, the data goes down this path. Add another Airtable Create a Record module here. Map the data you have, but this time, set the "Needs Review" checkbox to true.

Now, in Airtable, you can create a new View called "Review Queue". Filter this view to only show records where "Needs Review" is checked. Once a week, you can spend two minutes checking this view, manually fixing the few entries that the AI wasn't sure about, and unchecking the box. This human-in-the-loop system gives you the best of both worlds: massive automation with a simple, manageable safety net.

The Biggest Mistake: Relying Only on OCR

Many people try to automate expenses and fail. They usually make the same mistake: they think OCR is enough. They buy a dedicated receipt scanning app or use a simple OCR tool and expect clean, structured data to come out. It never does.

OCR is just a text reader. It's a dumb tool. It will read "SUBTOTAL 19.99" and "TOTAL 21.50" and treat them both as just numbers on a page. It can't tell you which one is the one you actually need to record for your books. It will see a logo for "Stripe" and the merchant name "Bob's Widgets Inc." and might pull "Stripe" as the vendor.

This is why the LLM layer is not optional. It's the core of the system.

The LLM provides the reasoning that OCR lacks. It understands the context of a receipt. It knows that "Total" is more important than "Subtotal". It can infer that an expense from "GoDaddy" belongs in the "Software" or "Utilities" category. It can clean up messy data from payment processors. Skipping this step and piping raw OCR text into a spreadsheet is a recipe for a bigger mess than the one you started with.

Is it Worth The Cost?

Let's break down the monthly cost for a typical solopreneur processing, say, 50 receipts per month.

  • Make.com: Your workflow uses about 5 operations per receipt. 50 receipts x 5 ops = 250 operations. The free plan includes 1,000. So, this is $0.
  • Nanonets: The free plan gives you 100 pages/month. So, this is also $0.
  • OpenAI API (GPT-4o): The amount of text we're processing is tiny. You'll likely spend less than $0.50 per month. It's ridiculously cheap.
  • Airtable: The free plan is more than enough. $0.

Your total monthly cost for this powerful solopreneur automation is less than a dollar. Even if you scale up and need paid plans, you're looking at maybe $20-$30 a month. The Core plan for Make.com is $9/mo, which is a fantastic deal. Compare that to the hours you'd waste doing it manually or the $500/mo you might pay a bookkeeper for basic data entry. It's a no-brainer.

You can build this entire system yourself by following the steps above. It's a satisfying project that will save you a ton of administrative headache.

For more on this exact angle, AI meeting tools coverage.

If you'd rather skip the build and deploy a working version in an afternoon, we've packaged this exact workflow as a blueprint. You can find it in the DeepUsecase Vault at deepusecase.com/vault.


Originally published at deepusecase.com

Top comments (0)