Thursday, 3 Dec 2026 Global Edition
Live Wire
AI Today Daily AI journalism & intelligence
Front Page Tips & Tutorials Baca versi Indonesia

Receipts and Invoices Piling Up? Build an AI Extraction Pipeline from Paper Photos to Clean Tables

Stop typing receipts by hand. Build an AI extraction pipeline that turns paper photos into clean, verified spreadsheet tables in one weekly session.

Receipts and Invoices Piling Up? Build an AI Extraction Pipeline from Paper Photos to Clean Tables

A shoebox of receipts, a stack of supplier invoices, and a folder of payment slips share the same fate: waiting to be typed into a spreadsheet, number by number. The job is slow, tedious, and error-prone — yet the hard part is not typing, it is reading messy, inconsistent documents: faded photocopies, PDF invoices whose layouts change per vendor, handwritten slips. This is where multimodal AI chats like ChatGPT, Gemini, and Claude change roles: they read photos and PDFs visually, then turn them into structured data in seconds. This guide builds the complete pipeline — from paper photos in a drawer to clean, verified tables in your spreadsheet. You need only two things: an AI chat that accepts image uploads, and any spreadsheet app.

Design the Table Schema Before Touching the Camera

The most common mistake when using AI for data extraction: uploading a receipt without defining the output shape. Without a clear schema, the AI invents its own columns, and the format drifts every session. Reverse the order — design the master table first, then extract.

Open a blank spreadsheet and fix the columns once: date, vendor, reference number, category, subtotal, tax, total, payment method, notes. One row per document, nothing more. Need line-item detail? Create a separate second tab instead of mixing it into the same table.

Lock your category list from the start — say, materials, operations, transport, subscriptions. This schema and list go into every extraction prompt, so keep them in one easy-to-copy note. Five minutes here saves hours of cleanup later.

One Receipt, One Prompt: The First Calibration

Before processing the pile, calibrate with a single document. Photograph one receipt in decent light, upload it, and paste a prompt like this:

Attachment: a photo of a shopping receipt. Extract its data as JSON with these fields:
- date: format YYYY-MM-DD
- vendor, receipt_no, payment_method: text
- items: a list of name, qty, unit_price
- subtotal, tax, total: numbers
- needs_check: list of field names you could not read
Rules:
1. Money values as plain integers, no separators.
2. Anything unreadable becomes null and goes into needs_check.
3. Do not guess — null beats a wrong value.

The 'do not guess' rule and the needs_check field are the heart of this prompt. Models fill gaps with plausible-sounding guesses — and in financial data, a guess is a loss. Flagging unreadable parts gives you an honest worklist: which rows need the photo reopened.

Test on three to five documents from different sources: a grocery receipt, a PDF invoice, a handwritten slip. If the output is stable and the format consistent, the pipeline is ready to scale.

Scale Up: Ten Documents per Message

Extracting one by one is slow. Modern AI chats accept many images and PDFs in one message — use that. Before uploading, rename files with a date-source pattern such as 2026-11-03-supplier-abc.pdf; the filename becomes the audit trail for each data row.

Upload five to ten documents at once and ask for one table: one row per document, plus a source column holding the filename. PDF invoices from email can be attached directly. For paper piles, photograph documents one at a time, laid flat — stacked photos make models mis-split numbers.

Hundreds of documents? Work in small batches — long sessions with dozens of attachments degrade quality and get harder to check.

Normalize Before You Merge

Extracted data is almost never uniform. One invoice writes the date as 11/03/2026, another as Nov 03 2026; the same vendor appears as Supplier ABC and SUPPLIER ABC LTD — two rows that should be one. Normalization reconciles everything before the data enters the spreadsheet.

Build a second prompt with your fixed rules: dates in YYYY-MM-DD, money without separators, vendors matching an official list, categories restricted to the locked list. Paste the batch output into that prompt:

The data below is raw extraction output. Clean it with these rules:
- Dates become YYYY-MM-DD; if ambiguous, add to needs_check.
- Vendor names map to the official list.
- Categories are limited to: materials, operations, transport, subscriptions.
- Add a month column (YYYY-MM) derived from the date.
Output: one markdown table, one row per document.

Derived columns get added here too: month, quarter, project code. The more formatting logic you delegate to the AI, the fewer cleanup formulas you write.

Verification: AI Types, You Sign

AI models misread numbers on blurry photos, and the errors look supremely confident. For financial data, verification is not optional — and three cheap checks cover almost all the risk.

First, the math check: ask the AI to verify itself — do the line items sum to the subtotal, and does subtotal plus tax equal the total? A mismatch signals a misread. Second, spot-check roughly ten percent of rows against the originals. Third, every row flagged needs_check must be reopened against the photo — no exceptions.

For high-value documents like your main supplier's invoices, cross-check: send the same document to a different AI model and compare. Two different models reading the same number leaves very little residual risk.

Into the Spreadsheet: Master Sheet and Auto Recap

Move the clean output over: have the AI emit a markdown table or CSV, then paste or import it into the master sheet. Google Workspace users can also use Gemini in Sheets for the same work.

Give the master sheet three accessories so it lasts. One, conditional formatting on the needs_check column so problem rows stand out automatically. Two, a link column pointing to the original photo or PDF in a Drive folder — an audit trail without paper archives. Three, a recap tab with a few formulas: monthly totals and per-category totals using SUMIFS.

The urge to add an elaborate dashboard will come; resist it. The goal is data that is current and trustworthy.

Make It a 15-Minute Weekly Routine

Even the best system dies without a schedule. Instead of attacking the pile once a year, book one 15-minute session each week. During the week, drop every receipt and invoice into a single phone folder or one envelope. When the session arrives: photograph, upload, extract, normalize, spot-check, paste into the master sheet — done.

Keep all three prompts in one note — that note is the real system. Every week it hardens: the vendor list grows, category mapping gets sharper.

Within a month, the anxiety drawer becomes a digital archive: every dollar has a row, a source, and photo evidence you can open whenever anyone asks.

Start this week with the smallest pile — your last ten receipts are enough to test the pipeline. The schema, the rules, and final decisions stay with you; the AI is an ultra-fast typist who never complains. Clean data stops being a postponed chore and becomes a side effect of a 15-minute routine.

References

Partner Spotlight Explore today’s curated technology offers