Section: AI Automation

A PDF invoice holds rows of data that you then retype into a spreadsheet, which is slow and easy to get wrong. ChatGPT accepts PDFs and spreadsheets directly, so the workflow is: upload the invoice, ask for the line items as rows with named columns, then check the totals against the page. This guide covers the prompt, the output format that pastes cleanly, and the checks that catch a bad extraction.
What the workflow is, and is not
The workflow turns a document into rows. It does not decide whether the invoice is correct, and it cannot know that a supplier billed you twice. Treat the output as typing you did not have to do, not as an audit.
The second half of the job is verification, and it belongs in the sheet: a row count, a total, and a quick comparison against the PDF. That is the difference between a shortcut and a mess.

What you can upload
OpenAI's help page on uploading files lists the formats it works with. Documents and text include PDF, DOCX, TXT, Markdown and RTF. Spreadsheets include XLSX, XLS, CSV, TSV and OpenDocument Spreadsheet. Presentations are PPTX and ODP.
The same page gives the steps: attach the file with the plus icon in the message box, choose Add photos & files, then describe what you want done with it. It also notes that document and spreadsheet uploads are available on Free and paid plans, subject to plan limits and account settings.
One caveat from that page is worth repeating: what a tool can do with a file depends on its contents, the model you select and the tools available in the chat. A scanned PDF is an image, and reading it is a harder job than reading a PDF exported from an accounting system.

The prompt
Ask for the columns you want, in the order you want them, one row per line item, and nothing else:
Extract the line items from this invoice into CSV with these columns: invoice_number, line_date, description, quantity, unit_price, line_total. One row per line item, no header comments, no totals row. Quote any description that contains a comma. If a field is missing on the page, leave it empty rather than guessing. Return only the CSV inside a code block.
Each instruction has a job. The column list fixes the shape. "No totals row" stops the model appending a row that breaks your SUM. The quoting rule protects descriptions with commas. The empty-field rule is the important one: a guess in a price column is worse than a blank.
Getting it into the sheet
Ask for CSV inside a code block, then copy that block into a cell and let Sheets split it. If the rows arrive in one cell, SPLIT with a comma delimiter breaks the first row, and Data then Split text to columns handles a pasted block.
Name the columns before you paste, so the first row of data lands under the right headers. A CSV pasted into an unnamed block is how a price ends up in the quantity column.

Check the extraction
- Row count. Count the line items on the page and compare with the number of rows.
- Line totals. Multiply quantity by unit price for each row and compare with the line total on the invoice.
- Invoice total. SUM the line totals and compare with the total printed on the page. A difference usually means a missing row or a discount line.
- Dates. Check that the line dates are the invoice's dates, not today's.
- Text that should be numbers. Currency symbols make a column text. Strip them and re-check the SUM.
When the total matches and the row count matches, the extraction is good enough to use. When it does not, fix the row rather than the total.
Several invoices at once
Upload them one at a time and keep one CSV per invoice, with the invoice number in every row. That single column is what lets you reconcile later, and it is the same discipline that makes categorising expenses work: a stable key in every row.
If the invoices share a layout, the same prompt works each time, which is the point of asking for a fixed column list. The cleaning habits in cleaning data with ChatGPT apply to the rows once they land.

Common problems
- The output is prose, not rows. The prompt did not ask for CSV. Ask again with the column list and the code-block instruction.
- A totals row appears in the data. Say explicitly that there should be no totals row.
- Prices are wrong. A scanned page or a two-column layout confuses the read. Check row by row, or retype that page.
- Columns are misaligned after pasting. The description held a comma. Quote descriptions in the prompt, or split on a rarer delimiter.
- Some rows are missing. Long invoices get truncated. Ask for the second half separately.
- Nobody can tell which invoice a row came from. Add the invoice number to the column list.
Questions and answers
Can ChatGPT read a PDF invoice?
Yes, PDF is one of the document formats its file upload supports, subject to your plan and the model you use.
Can it fill a spreadsheet directly?
It can produce rows in CSV, XLSX or a table you paste. Getting them into your sheet is still your step.
Is the extraction reliable?
Reliable enough to save typing, not reliable enough to skip the checks. Compare row counts and totals with the page.
What if the invoice is a scan?
A scan is an image. Reading it is harder and less reliable than a PDF exported by the supplier's system.
How should I ask for the output?
CSV, inside a code block, with the columns named and no totals row.
