PlainAgent / Templates / Invoice data extraction agent
Operations templateInvoice data extraction agent
Pulls supplier, date, totals and line items from invoice PDFs into a spreadsheet.
Read invoice PDFs and write the key fields into a sheet for checking.
An invoice PDF arrives by email or lands in a folder.
Rows where totals don't add up or confidence is low.
- Invoice PDF (text or image)
- Extract fields
- Append a row to a spreadsheet
- Flag low-confidence rows
- Copy values exactly as printed.
- If a field isn't visible, return null.
How to build it
- List the exact fields you need.
- Use a model that can read PDFs or images.
- Return JSON with a confidence flag.
- Check totals add up in a formula column.
- A person approves before anything is paid.
System prompt
Replace the parts in {BRACES}. Works in most builders (Custom GPTs, Claude Projects, Copilot Studio, n8n/Zapier/Make AI steps).
Extract these fields from the invoice. Return JSON only.
{"supplier": "", "invoice_number": "", "invoice_date": "YYYY-MM-DD", "currency": "", "subtotal": 0, "tax": 0, "total": 0, "line_items": [{"description": "", "amount": 0}], "confident": true|false}
Copy values exactly. Use null for anything not visible.
Test before you switch it on
- A scanned, blurry invoice: confident should be false.
New to this? Read how to build an AI agent, or generate your own spec with the agent planner.