n8n Intermediate: Real Business Workflows · Module 7 of 11

AI Receipt Extractor

n8nIntermediate~12 min practice71 steps

Why this matters

Robert’s intro to this module

Receipts pile up in photos, email attachments and the bottom of a bag. Typing the date, the store and the total into a spreadsheet one at a time is slow, and one slipped digit means the books do not match the card statement at month-end.

If a client or a team sends you thirty receipts a month, that is an hour of copying that adds nothing. The real cost is that it gets skipped, and then the receipts are gone when the tax return or the expense report is due.

In this module you build an agent in n8n that does the copying. You drop a photo of a receipt into a chat, and it reads the date, store and total, picks a category, and adds a row to a Google Sheet.

What you’ll build

A working n8n workflow: a chat window you can drop a receipt photo into, an AI agent that reads it, and a Google Sheet called Invoices with the columns Date, Category, Vendor and Amount.

The test is a Corner Mart grocery receipt for $31.57. After you send it, a new row appears in the sheet: 04/24/2024, Groceries, Corner Mart, 31.57.

What you need

  • An n8n accountThe lesson uses n8n Cloud, which has a free trial. You already set this up in the n8n AI agent module.
  • An OpenAI API key with a little creditCreate one on platform.openai.com. It is the same key as in the n8n AI agent module. Never paste it into a chat or share it.
  • A Google accountFor Google Sheets. The workflow asks you to connect it once.
  • A sample receipt photoThe sample Corner Mart receipt is at /templates/receipt.png. After the test, use a photo of your own.

Concepts

3 ideas you’ll use in the practice.

A trigger starts it, an agent decides

Every n8n workflow starts with a trigger. Here it is a chat message, because the chat lets you attach a file.

The AI agent next to it reads the receipt and decides what to do. A chat model is its brain, and memory lets it remember the conversation.

A tool lets the agent act

The agent cannot write to a sheet on its own. You give it a Google Sheets tool, point it at the Invoices sheet, and tell it in its instructions to use the tool to add each receipt.

The instructions are short and plain: extract the date, vendor and amount, come up with a category, and add the receipt to the sheet.

Test with one, then check the row

Run a single known receipt first, so you can compare the row to the paper. Check the date, the vendor and the amount against the photo.

The agent picks the category, so skim those too. If one is wrong, tighten the instructions with the categories you actually use.

Practice

Do every step yourself in a practice copy of the real tool. It checks your work, and “Do it for me” finishes any step you get stuck on.

n8nAI Receipt Extractor71 steps · ~12 min · nothing touches your real accounts

Do it for real

Now repeat it in your own account. Tick each step as you go.

Downloads

Quick check

3 questions to check you’ve got it.

1. Why does the workflow start with a chat trigger?

  • Chat lets you attach a receipt photo
  • It is the only trigger n8n has
  • It sends emails
Show the answer

Chat lets you attach a receipt photo. You drop the photo into the chat and the agent reads it.

2. What lets the agent add a row to the sheet?

  • The chat model alone
  • A Google Sheets tool you connect and point at the sheet
  • The memory node
Show the answer

A Google Sheets tool you connect and point at the sheet. The tool is what writes to the sheet. The instructions tell the agent to use it.

3. After the test, what do you check?

  • Only that a row appeared
  • That the date, vendor and amount match the paper receipt
  • Nothing, AI is always right
Show the answer

That the date, vendor and amount match the paper receipt. A wrong digit would flow straight into your books. Compare the row to the receipt.

Up next · Module 8

n8n: AI Email Responder for Gmail

Start module 8 →