Finance & Accounting

How to automate receipt capture and categorization

The short answer

To automate receipt capture and categorization, give people one easy way to send receipts (an email address, a shared folder or a WhatsApp number), read each image with a vision model, match it to the card or bank transaction by amount, date and merchant, and suggest an expense account based on how that merchant was categorized before. Confident matches are attached and categorized in QuickBooks Online or Xero automatically, and the rest go to the bookkeeper as a short review list.

What this automation does

Receipts stop living in wallets and inboxes, and every card charge ends up with a receipt and an account.

  1. Capture. People forward receipts to a receipts email address, drop photos into a shared folder, or send them to a WhatsApp Business number. Each receipt is tagged with who sent it and when.
  2. Read. A vision model extracts merchant, date, total, tax, tip, the last four digits of the card if printed, and the purchased items.
  3. Match. The workflow searches posted card and bank transactions in QuickBooks Online or Xero, or transactions in a card platform like Ramp, for the same amount within a few days and a similar merchant name. Tips and currency conversion are allowed within a small tolerance.
  4. Categorize. The categorizer suggests an expense account, and class or job where you track them, using the merchant’s history in your books and the items on the receipt.
  5. Post or ask. Confident matches have the receipt image attached and the category applied. Low-confidence or unmatched receipts go to the bookkeeper, and missing details go back to the submitter as a single question.
  6. Chase missing receipts. Weekly, the workflow lists card charges with no receipt and messages each cardholder with their own list.

When it is worth building

It pays off when someone spends hours each month matching receipts to charges, or when month end means chasing a dozen people for photos. Field-heavy businesses such as construction, property management and hospitality feel it most, since receipts are generated on job sites and in vehicles.

It is also a strong fit for accounting firms that handle receipts for many clients, where the same pipeline can serve each client file. For firms, pair it with client document collection. If your company uses one spend platform for every card and its receipt matching works, you do not need this. If the issue is reviewing employee reimbursement claims against policy, see expense report review instead.

Architecture

LayerWhat we useWhy
Capture channelsGmail for a receipts address, Google Drive for a shared folder, the WhatsApp Business Platform for photosPeople use whatever is easiest on the day, and all channels feed one queue
ReadingOpenAI’s GPT models or Claude through the API, with vision inputHandles crumpled, faded and angled photos without templates
Transaction sourceQuickBooks Online through n8n’s built-in node, Xero bank transactions and Ramp through their APIs using n8n’s HTTP Request nodeReceipts must match transactions already in the books or card feed
CategorizerAn LLM call with merchant history, receipt items and the chart of accountsMost merchants follow history, and the model handles the ambiguous ones
Pending queuePostgres or Google SheetsHolds receipts that arrived before their charge and drives retries
ReviewA review sheet or Slack message for the bookkeeperOnly exceptions need eyes

The WhatsApp pattern uses the same messaging approach as our n8n messaging and intelligence workflows, adapted to receipts.

How to build it

  1. Pick the channels. Start with an email address and one mobile option. More channels mean more edge cases, so add them after the core is stable.
  2. Build the extraction schema. Define fields, including a receipt type that separates itemized receipts from card slips, and test on a few hundred real receipts including faded thermal paper.
  3. Build merchant history. Export the last year of categorized transactions and build a table of normalized merchant name to account, class and how consistent that pairing has been.
  4. Write the matcher. Match on amount within a tip and currency tolerance, a date window and fuzzy merchant similarity. Use the last four card digits when printed to break ties between cardholders.
  5. Write the categorizer. If the merchant maps consistently to one account, use it without a model call. Otherwise, send the items, merchant history and chart of accounts to the model and require an account from the list, with a confidence.
  6. Attach and post. Upload the image as an attachment on the matched transaction and apply the category. In QuickBooks Online this is the attachments feature, and in Xero the files API.
  7. Run the weekly chase. List unmatched charges per cardholder and send each person their own short list with a reply link.

The downloadable starter template below covers the email capture, receipt extraction and transaction matching steps for Gmail and QuickBooks Online.

What breaks in production

  • Receipt before the charge. Hotel and fuel charges often post days later or at a different amount than the pre-authorization. Keep receipts pending and widen the window for those categories.
  • Same receipt twice. People email a receipt and also photograph it. De-duplicate on extracted merchant, date and total before matching.
  • Split purchases. One receipt covers business and personal items, or two jobs. Let the submitter split it in their reply, and post as separate lines.
  • Ambiguous retailers. Big-box and online retailers sell everything. Merchant history is unreliable for them, so always read the items, and ask when a purchase could be equipment rather than supplies.
  • Chart of accounts changes. Accounts are renamed or retired and the categorizer keeps suggesting the old one. Refresh the account list each run and drop history that points to inactive accounts.
  • Unreviewed bank feed items. Charges still waiting in the QuickBooks Online or Xero bank feed are generally not visible to the API until someone accepts them. Either accept feed items daily or match against the card platform or a bank export instead.
  • Unreadable photos. Low light and folded paper produce partial reads. Reply to the submitter right away asking for a new photo, while they still have the receipt.

Timeline and cost

One company with email and one mobile channel posting to QuickBooks Online or Xero typically takes one to three weeks. Lumeor builds it for $2,500 to $8,000, depending on the number of capture channels, entities or client files, and whether jobs or classes need to be assigned. Running costs are low because most receipts are categorized from merchant history without a model call. The posting side overlaps with QuickBooks data entry automation, and many teams build both together.

How to measure success

  • Share of card charges with a receipt attached at month end
  • Share of receipts matched and categorized without a person
  • Bookkeeper recategorizations per 100 receipts
  • Days from purchase to categorized transaction
  • Cardholders on the weekly missing-receipt list, trending down

Free starter template

Import a working n8n workflow that implements the core of this guide, then adapt it to your systems.

Frequently asked questions

Doesn't QuickBooks already capture receipts?

QuickBooks Online and Xero both let you upload or photograph receipts, and card platforms like Ramp, Brex and Expensify capture them by text or email. If everyone uses one of those, start there. A custom workflow helps when receipts arrive through many channels, across several entities or clients, or need categorization rules the built-in tools do not apply.

How does the AI pick the right expense account?

It looks at how the same merchant was categorized in your books before, the items printed on the receipt, and your chart of accounts. For a gas station it is usually obvious. For a general retailer, where one receipt might be office supplies and the next materials for a job, it reads the items and asks the submitter when it is still unsure.

What happens when the receipt arrives before the card charge?

The receipt waits in a pending list and the matcher retries for several days as new transactions post. If nothing matches after that window, the receipt goes to review, since it may have been paid personally or charged to a different card.

Can employees just text a photo of the receipt?

Yes, if you set up a WhatsApp Business number or an SMS number through Twilio. The workflow replies to confirm what it read, such as merchant and total, and asks one question if something is missing, such as which job or client the purchase was for.

Is categorization by AI accurate enough for tax purposes?

It is accurate enough to remove most of the typing, not to replace the bookkeeper's review. Categories your accountant treats differently for tax, such as meals, travel and fixed assets, should always be in the review list until you have confirmed the suggestions are consistently right.

Next steps