# Categorize Business Expenses with AI: A Year-End Cleanup

> Categorize business expenses with AI: an n8n agent sorts each one into a fixed list, flags unclear ones as Needs Review and logs them for a bookkeeper.

Source: https://learn.ynteractive.com/content/blog/categorize-business-expenses-with-ai · Updated 2026-11-03 · Free from Stepthrough (https://learn.ynteractive.com)

Quick answer

To [categorize business expenses](https://learn.ynteractive.com/content/glossary/expense-categorization) with AI, give an [AI agent](https://learn.ynteractive.com/content/glossary/ai-agent) a closed list of categories, a Needs Review option for anything unclear, and a rule never to change amounts, then have a person check every row before it's posted. This guide is for bookkeepers and owners facing a pile of uncategorized transactions at year-end, and it follows the free [AI Expense Categorizer](https://learn.ynteractive.com/content/n8n-ai-agent-categorize-business-expenses-google-sheets) lesson, which builds that agent in n8n for Maple Street Bookkeeping, a made-up firm.

Last updated November 3, 2026

[Take the free module →](https://learn.ynteractive.com/courses/ai-for-finance/12)Module 12 of the free [AI for Finance Teams](https://learn.ynteractive.com/courses/ai-for-finance) course, about 12 minutes. No account needed.

By [Robert Breen](https://learn.ynteractive.com/content/about) · Published November 3, 2026 · Updated November 3, 2026 · 6 min read

Finance · Bookkeeping · n8n

## Watch: the idea in 0:47

### Categorize expenses with AI

Explainer · 0:47 · with captions

Categorize business expenses with AI: an n8n agent sorts each one into a fixed list, flags unclear ones as Needs Review and logs them for a bookkeeper.

**Transcript**

You can ask ChatGPT what category an expense goes in. But for the books, it can't make up its own. It needs your list. The agent may only use six categories. Office Supplies, Software & Subscriptions, Meals, Travel, Utilities, and Needs Review. If an expense could fit more than one category, the agent uses Needs Review, and says why. Without that option, it would guess. With it, you get a flag. One rule protects the numbers. Do not change amounts or invent details. And no tax advice. That's your accountant's call. Test with three expenses you already know. Read the reply before you say save. Add a vague transfer, and check it lands in Needs Review. Then a bookkeeper checks each row before posting. Try it yourself, free, in AI Expense Categorizer.

The categories in this post are examples, not tax guidance. Which account an expense belongs in, and how it's treated on a return, is your accountant's decision.

## Why use AI to categorize expenses at year-end?

Because the uncategorized pile is repetitive work with a clear pattern, and AI can make the first pass while a bookkeeper keeps the final say. Most lines are obvious (toner is office supplies, a monthly software charge is a subscription), and only a few need a person to think. An agent that sorts the obvious ones and flags the rest lets you spend your time on the flagged ones.

The point is a faster first draft, not hands-off books. Every row the agent writes lands in a sheet for review.

## Should AI pick its own categories or use a fixed list?

Use a fixed list for bookkeeping. An agent that invents categories will file the same kind of expense under different names, and your reports won't add up.

Two Stepthrough lessons show the difference:

|  | AI Receipt Extractor | AI Expense Categorizer |
| --- | --- | --- |
| Instruction | "Come up with a category." | "Use only these categories" |
| Result in the lesson | Files a Corner Mart receipt as Groceries | Sorts three expenses into Office Supplies, Software & Subscriptions and Meals |
| Good for | Getting receipts off paper quickly | Consistent categories a bookkeeper can post |

The [AI Receipt Extractor](https://learn.ynteractive.com/content/ai-receipt-extractor-n8n-google-sheets) is great for turning photos into rows, and [Get Receipts into Google Sheets with AI](https://learn.ynteractive.com/content/blog/receipts-to-google-sheets-ai) covers it. For year-end cleanup, the closed list is the one you want.

## What does the expense categorizer's system prompt say?

The Maple Street [system prompt](https://learn.ynteractive.com/content/glossary/system-prompt) names the firm, the reviewer, the allowed categories, the fields to return and three hard rules. The parts that matter most:

```text
Use only these categories:
- Office Supplies
- Software & Subscriptions
- Meals
- Travel
- Utilities
- Needs Review

For each expense, return:
- Date
- Vendor
- Amount
- Category
- Note (one sentence: what it was for, and anything the bookkeeper should check, like a missing receipt)

If an expense could fit more than one category, or the details are unclear, use Needs Review and say why.

Do not give tax advice. Do not change amounts or invent details.
```

Each line does a job:

- **The closed list** keeps every row in categories you already use. Swap in your own client's categories when you build it.
- **Needs Review** gives the agent a safe place to put anything it isn't sure about, so it doesn't force a guess.
- **"Say why"** means a flagged row tells you what to look at, instead of just a label.
- **The Note** asks for one sentence plus anything to check, like a missing receipt.
- **"Do not change amounts or invent details"** protects the one thing that must never be creative: the numbers.

The prompt also says the audience is "the bookkeeper who reviews every entry before it is posted," which sets the expectation for everything the agent writes.

## How do you build the expense categorizer in n8n?

The lesson's agent is five pieces on an n8n canvas, about 12 minutes and 72 steps in the practice copy:

1. **On chat message** trigger, so you can paste a batch of expenses into a chat.
2. **AI Agent**, with the system prompt added under **Add Option**, **System Message**.
3. **OpenAI Chat Model**, using **gpt-5-mini**, with your OpenAI API key saved as a credential.
4. **Simple Memory**, so "save those expenses" refers to the batch you just sent.
5. **Google Sheets Tool**, set to **Append Row** on an **Expense Log** sheet with Date, Vendor, Amount, Category and Note headers. Each column uses the **✦** button so the model fills it in.

The headers must match the five fields the system prompt returns. That match is how the agent knows what goes where.

## Try it free, step by step

**Build an AI Agent That Categorizes Business Expenses**. Build an AI agent for Maple Street Bookkeeping that sorts business expenses into categories, writes a short note for each and saves them to Google Sheets — chat trigger, AI Agent, system prompt… You do every step yourself in a practice copy of n8n, it checks your work as you go, and “Do it for me” finishes any step you get stuck on. Free, and nothing touches your real accounts.

[Start the free lesson](https://learn.ynteractive.com/modules/n8n-ai-agent-finance)

[Or read the full step-by-step guide](https://learn.ynteractive.com/content/n8n-ai-agent-categorize-business-expenses-google-sheets)

## How do you test the categorizer before using it on real books?

Send a small batch you already know the answers to, read the agent's reply, then tell it to save. The lesson's test batch:

```text
Categorize these expenses: Sep 22, Corner Office Supply, $64.18, printer paper and toner. Sep 23, CloudLedger, $45.00, monthly accounting software. Sep 24, Harbor Street Cafe, $38.50, lunch with a client.
```

The agent returns Office Supplies, Software & Subscriptions and Meals, each with a short note. Then "Yes, save those expenses to the sheet" writes three rows to the Expense Log. Before trusting it with a real backlog, add a test line that should land in Needs Review, such as a vague transfer, and confirm it does.

## How should you work through a year-end backlog?

In small batches, with the review built in. A routine that fits the lesson's design:

1. **Export the uncategorized transactions** from your accounting software to a list with date, vendor, amount and description.
2. **Paste one batch at a time** into the n8n chat, the same way as the test.
3. **Read the reply before you say "save."** If something is off, tell the agent in the same chat.
4. **Review the Expense Log.** Sort by Category, check the Needs Review rows first, and compare a few amounts with the source.
5. **Post only what you've checked.** The sheet is a worklist, not the books.

Rows the agent can't place, plus anything that needs the client's answer, become the list you send the client. [Year-End Bookkeeping Checklist for Your Clients](https://learn.ynteractive.com/content/blog/year-end-bookkeeping-client-checklist) shows how to track those answers with owners and dates.

## What should you keep out of the expense agent?

Paste only what categorizing needs: date, vendor, amount and a short description. Leave out full card and account numbers, tax IDs and anything personal, follow your firm's policy on AI tools, and keep client data in accounts your firm controls.

On cost: the lesson is free and runs in a practice copy. A real build needs n8n (n8n Cloud is paid after a free trial, or self-host it), a Google account and an OpenAI API key, which is pay-as-you-go and billed separately from ChatGPT plans; the lesson suggests $10 of credit. More lessons are on the [finance page](https://learn.ynteractive.com/content/industry/finance). For employee reimbursements against a policy, see [Automate Expense Reimbursement Requests with AI](https://learn.ynteractive.com/content/blog/expense-reimbursement-form-ai).

## Key takeaways

- AI can categorize business expenses reliably when it must use a closed list of categories plus a Needs Review option.
- The Maple Street Bookkeeping agent writes a one-sentence note for each expense that says what to check, such as a missing receipt.
- The system prompt forbids changing amounts, inventing details and giving tax advice.
- In the lesson, three test expenses are sorted into Office Supplies, Software & Subscriptions and Meals and saved to an Expense Log sheet.
- A bookkeeper reviews every row, starting with Needs Review, before anything is posted.

## Frequently asked questions

**Can AI categorize expenses without a person checking?**

It shouldn't. The lesson's agent is written for a bookkeeper who reviews every entry before it is posted, and unclear expenses go to Needs Review.

**Can I use my own expense categories?**

Yes. Replace the list in the system prompt with your own categories and keep Needs Review as the catch-all.

**Will the AI change the amounts?**

The system prompt says "Do not change amounts or invent details." Still compare a sample of rows with the source during review.

**Is Maple Street Bookkeeping a real firm?**

No. Maple Street Bookkeeping and its test expenses are made-up examples used in the lesson.

## Free lessons in this post

- [Build an AI Agent That Categorizes Business Expenses](https://learn.ynteractive.com/content/n8n-ai-agent-categorize-business-expenses-google-sheets): Build an AI agent for Maple Street Bookkeeping that sorts business expenses into categories, writes a short note for each and saves them to Google Sheets — chat…
- [AI Receipt Extractor: Receipts to Google Sheets with n8n](https://learn.ynteractive.com/content/ai-receipt-extractor-n8n-google-sheets): Drop a photo of a receipt into an n8n chat. An AI agent reads it, pulls out the date, vendor and amount, picks a category, and adds a row to Google Sheets.

## Watch it in a free lesson: AI Receipt Extractor: Receipts to Google Sheets with n8n

### AI Receipt Extractor: video walkthrough

Full walkthrough · 5:35 · with captions

Drop a photo of a receipt into an n8n chat. An AI agent reads it, pulls out the date, vendor and amount, picks a category, and adds a row to Google Sheets. The whole lesson narrated step by step, recorded in Stepthrough’s simulated practice environment.

[Watch it with chapters and the full transcript](https://learn.ynteractive.com/content/ai-receipt-extractor-n8n-google-sheets#watch)

From the free lesson [AI Receipt Extractor: Receipts to Google Sheets with n8n](https://learn.ynteractive.com/content/ai-receipt-extractor-n8n-google-sheets)

## Related terms

Plain-English definitions, each with an example from a free lesson.

[Expense categorization](https://learn.ynteractive.com/content/glossary/expense-categorization) · [AI agent](https://learn.ynteractive.com/content/glossary/ai-agent) · [System prompt (system message)](https://learn.ynteractive.com/content/glossary/system-prompt) · A/B testing · Accounts payable · [AI evals](https://learn.ynteractive.com/content/glossary/ai-evals) · [API key](https://learn.ynteractive.com/content/glossary/api-key) · [Append row](https://learn.ynteractive.com/content/glossary/append-row)

[The full AI glossary](https://learn.ynteractive.com/content/glossary)

## Related prompts

- [AI pilot plan prompt](https://learn.ynteractive.com/content/prompts/ai-pilot-plan-prompt): Plan a small, time-boxed trial of an AI tool: one task, a few people, success criteria you choose up front, how you'll measure…
- [Case study interview questions prompt](https://learn.ynteractive.com/content/prompts/case-study-interview-questions-prompt): Plan a client interview that gets a case study's before, during and after story in their own words, with follow-up probes and…
- [Duplicate invoice check prompt](https://learn.ynteractive.com/content/prompts/duplicate-invoice-check-prompt): Scan the bills in a payment run for likely duplicates: same vendor and amount, near-matching invoice numbers and bills already…
- [Email subject lines prompt](https://learn.ynteractive.com/content/prompts/email-subject-lines-prompt): Get ten honest subject lines for a finished email, each with preview text and a character count, grouped by approach so you can…

[All free prompt templates](https://learn.ynteractive.com/content/prompts)

## Visual guides

The same ideas as quick visual guides: swipe through the slides, or read each one as text.

- [Receipts to Google Sheets with an AI agent in n8n](https://learn.ynteractive.com/content/visual/receipt-extractor-spot-check): A box of paper receipts at the end of the month. Typing them in is slow and easy to get wrong.
- [5 Steps to an AI Agent That Categorizes Business Expenses](https://learn.ynteractive.com/content/visual/5-steps-ai-expense-categorizer): A visual guide: an n8n agent sorts expenses into a fixed list of categories, flags unclear ones as Needs Review and saves them to Google Sheets.
- [5 Steps to Turn a Receipt Photo into a Google Sheets Row](https://learn.ynteractive.com/content/visual/5-steps-receipt-photo-to-google-sheets): A visual guide: an n8n AI agent reads a receipt photo, pulls out the date, vendor and total, picks a category and adds a row to Google Sheets.

[All visual guides](https://learn.ynteractive.com/content/visual)

## Keep reading

- [What Is a Chart of Accounts? Give Your AI the Categories](https://learn.ynteractive.com/content/blog/what-is-a-chart-of-accounts): A chart of accounts is the list of accounts your books use. What it is, why AI expense tools need yours, and how to put it into an n8n agent's prompt.
- [AI for Bookkeepers: How to Use AI for Bookkeeping (Free)](https://learn.ynteractive.com/content/blog/ai-for-bookkeepers): How to use AI for bookkeeping: AI agents that sort expenses, read receipts and check reimbursements for your review, plus client emails. Free lessons.
- [Get Receipts into Google Sheets with AI and n8n](https://learn.ynteractive.com/content/blog/receipts-to-google-sheets-ai): Receipts to Google Sheets without typing: build an n8n agent that reads a receipt photo, picks a category and adds a row. Plus an expense categorizer.

[All blog posts](https://learn.ynteractive.com/content/blog) · [All free tutorials](https://learn.ynteractive.com/content)
