Home › Finance & accounting › Invoice data extraction: how to do it with AI
Invoice data extraction: how to do it with AI
From official vendor pages; selected tasks also include dated logged-out free-plan trials. Report an error.
General information only, not financial advice. A qualified professional should make the final decision.
Before you paste anything, remove names, contact details, ID numbers and other personal details, or replace them with placeholders like [Client A].
Intermediate Risk: Medium 💰 Finance & accounting
Pull vendor, invoice number, date, subtotal, tax and total from a stack of invoices or receipts into a table you can import. A bot does the extraction; you check the arithmetic and spot-check against the originals before anything goes into your books.
Who it’s for: Bookkeepers, accountants, small-business owners and office admins handling expenses.
Why medium risk: Misread digits, wrong currency or tax labels, and skipped documents can put wrong numbers into your accounts.
ChatGPT has the highest score on our published rubric (94/100) of the 4 tools listed for this task. Use a Business or Enterprise workspace for company invoices; their content isn't used for training by default.
Step by step
- Collect the invoices as PDFs or clear photos; remove card or bank numbers you don't need.
- Define the exact columns and formats: date as YYYY-MM-DD, a currency code, and the tax type (for example GST/HST or VAT).
- Upload a small batch (10 to 20 files) and ask for CSV output, with UNREADABLE for anything it can't read instead of a guess.
- Ask it to check subtotal + tax = total on every row and to list mismatches, duplicates and files it skipped.
- Spot-check at least 10% of rows, plus every flagged row, against the originals.
- Import into your accounting tool and keep each source file linked to its entry.
AI prompts to extract data from invoices
Replace the [brackets] with your details. See all prompt examples
Extract these fields from each attached invoice into CSV: file_name, vendor, invoice_number, date (YYYY-MM-DD), subtotal, tax, tax_type, total, currency. If a field is unreadable write UNREADABLE. Then check subtotal + tax = total on each row and list mismatches.
Here are the file names I uploaded: [list]. Confirm each appears exactly once in the table, and list any likely duplicates (same vendor, invoice number and total).
Add a column "category" using only these categories: [list]. If you're not sure, write "review" instead of guessing.
Illustrative example
You paste
12 supplier invoices as PDFs, two of them phone photos.
A good answer looks like
A 12-row CSV: one total marked UNREADABLE on a blurry photo, and one row flagged because subtotal + tax didn't equal the total (an 8 misread as a 3), fixed by checking the original.
Illustrative example written for this guide, not output captured from a specific tool.
Which tool to pick, and why
- Claude (incl. Claude Code): The free plan can create and edit files with code execution, so it can produce the CSV and run the totals check (claude.com/pricing). Free plan can do this Visit official website ↗
- Google Gemini: Google's plans page cites uploads of up to 1,500 pages of documents for analysis (gemini.google/subscriptions). Free plan can do this Visit official website ↗
- Mistral Vibe (formerly Le Chat): Pro ($14.99/month, excl. taxes) lists "Generate spreadsheets and slides" (mistral.ai/pricing). Visit official website ↗
- ChatGPT (incl. Work & Codex): Use a Business or Enterprise workspace for company invoices; their content isn't used for training by default. Free plan can do this Visit official website ↗
Reasons come from the capabilities, free-plan details and prices we've checked on official pages (separate from any dated trial above). Sources: claude.com/pricing · gemini.google/subscriptions/ · mistral.ai/pricing · chatgpt.com/pricing
Common mistakes
- Trusting totals without the subtotal + tax check.
- Uploading hundreds of files at once and missing the ones it skipped.
- Mixing currencies or tax types in one column.
- Leaving full card or bank numbers in the files.
Privacy tip
Invoices contain business and sometimes personal data. Use an approved work account for client or company documents, remove card and bank numbers, and keep the originals as your record.
Claude (incl. Claude Code) setting · Google Gemini setting · ChatGPT (incl. Work & Codex) setting · Sources: privacy.claude.com/en/articles/12109829-how-do-i-change-my-model-improvement-privacy-settings · support.google.com/gemini/answer/13594961 · help.openai.com/en/articles/7730893-data-controls-in-chatgpt