▶ Stepthrough Courses All tutorials Blog Glossary Prompts Videos Visual guides Cheat sheets Comparisons Start Learning Free

Invoice data extraction prompt: free ChatGPT template

SOPs and operationsAccountingFinanceOperationsWorks in ChatGPT, Claude, Gemini and Copilot

Updated · By Robert Breen

Use this when vendor invoices arrive as PDFs, scans or email text and someone retypes them into an AP sheet or accounting system. An invoice carries more than a receipt: a due date, terms, a PO number and line items you will later match to the order. A model reading a smudged scan still produces a value for every field, so this prompt has it mark what it can't read, keep bank numbers out and check the math. It copies; approving and coding stay with you.

The prompt

Copy it into ChatGPT (or Claude, Gemini or Copilot) and replace every [BLANK] with your own details. It uses the four parts from Prompt Writing 101: Role, Context, Task and Format.

Role: You are an accounts payable data entry assistant for [BUSINESS]. You copy what an invoice says and never guess.
Context: Header fields: [HEADER FIELDS]. Line item fields: [LINE FIELDS]. Copy values exactly. Write "Unreadable" (and which part) for smudged or cut-off values, and "Not shown" for missing fields. Never copy bank account or routing numbers; write "Bank details present". Extra rules: [EXTRA RULES].
Task: Fill a header table and a line items table for each invoice. Check that quantity times unit price equals each line total and that lines plus tax and freight equal the total. List every mismatch, then every Unreadable or Not shown field.
Format: Per invoice: a two-column header table, a line items table, a "Checks" list and a "Look up" list. Dates as YYYY-MM-DD. No commentary.

Invoices (attached, or pasted below):
[INVOICES]

Fill in the blanks

[BUSINESS]
Your business name.
[HEADER FIELDS]
Invoice-level fields, such as vendor, invoice number, dates, PO number, terms, subtotal, tax, freight, total.
[LINE FIELDS]
Columns for each line, such as item code, description, quantity, unit price, line total.
[EXTRA RULES]
Anything specific to you, such as your PO number format, or "none".
[INVOICES]
Attach the PDFs or paste the text.

Example, filled in

A made-up example from the free lesson Build an AI Vendor Follow-Up Agent in n8n. Ridgeline Supply Co. is the made-up distributor from the operations lessons, where Corrugo Box Supply has no ship date yet for PO 4480. Here the boxes have arrived with a scanned invoice that has one smudged digit. The invoice details are made up.

Role: You are an accounts payable data entry assistant for Ridgeline Supply Co. You copy what an invoice says and never guess.
Context: Header fields: vendor, invoice number, invoice date, due date, PO number, terms, subtotal, tax, freight, total. Line item fields: item code, description, quantity, unit price, line total. Copy values exactly. Write "Unreadable" (and which part) for smudged or cut-off values, and "Not shown" for missing fields. Never copy bank account or routing numbers; write "Bank details present". Extra rules: our PO numbers are four digits, so flag any other format.
Task: Fill a header table and a line items table for each invoice. Check that quantity times unit price equals each line total and that lines plus tax and freight equal the total. List every mismatch, then every Unreadable or Not shown field.
Format: Per invoice: a two-column header table, a line items table, a "Checks" list and a "Look up" list. Dates as YYYY-MM-DD. No commentary.

Invoices (attached, or pasted below):
CORRUGO BOX SUPPLY. Invoice INV-77310. Date 10/02/2026. Terms Net 30. Due 11/01/2026. Customer PO 4480.
RSC-1818 single-wall box 18x18x18, qty 400, unit 1.12, total 448.00
RSC-2416 single-wall box 24x16x12, qty 3?0 (smudged), unit 0.98, total 294.00
Subtotal 742.00. Freight 45.00. Tax 0.00. Total 787.00.
Remit to: Lakeview Bank, account ending 2290.

What a good answer looks like

  • Header shows INV-77310, 2026-10-02, due 2026-11-01, PO 4480 and Net 30.
  • The second quantity is "Unreadable (middle digit)". At most it notes that 300 would match; it doesn't enter 300.
  • Checks confirm 742.00 plus 45.00 freight equals 787.00.
  • Remit-to shows "Bank details present", not the account.

How to check it before you use it

An AI draft can sound right and still say something you never told it. Use the habit from the Reply Faster lesson: check every promise, name, date and number against what you gave it before anything goes out.

  • Compare every number with the scan. Reading images (OCR) can misread a digit silently.
  • Match the invoice to PO 4480 and the receiving count before approval: the three-way match.
  • If the remit-to details differ from your vendor file, use the vendor bank change verification prompt before paying.
  • Only use an AI tool your company has approved for vendor data.

Why this prompt works

This is data extraction with rules for the hard cases. Software that does it at volume is called intelligent document processing, and the AI Receipt Extractor lesson builds a small version in n8n.

Practice it in the free lesson

AI Receipt Extractor: Receipts to Google Sheets with n8n: 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. You do every step yourself in a practice copy of n8n, and nothing touches your real accounts.

Start the free lesson

Also useful: Build an AI Vendor Follow-Up Agent in n8n

Terms used here

More sops and operations prompts

All free prompt templates · AI glossary