Extract data from PDFs
Pull dates, amounts and names from a folder of invoices or bills into Excel.
The prompt
Read every PDF in ~/Documents/Bills. For each one, extract the date, vendor, invoice number, total amount and tax. Put the results in a new Excel file called bills-summary.xlsx with one row per PDF and a total at the bottom. List any PDF you could not read.
What the AI will do
- Checks which installed program it can use for PDFs and Excel.
- Pulls the date, vendor, invoice number, total and tax from each PDF.
- Saves bills-summary.xlsx with a total row and lists any PDF it could not read.
On Windows, Mac and Linux
All three: needs a program like Python installed. Scanned PDFs also need tesseract (Windows installer, Homebrew on Mac, Linux package manager).
How to use it
- Make sure Shellway is connected in ChatGPT, Claude or Cursor.
- Paste the prompt and change the folder names or paths to match your computer.
- Review the plan your AI shows before you confirm any changes.
Example reply
An illustration of a typical answer. Your AI will show the real files, names and numbers from your computer.
Read 38 of 40 PDFs. Saved bills-summary.xlsx: Date Vendor Invoice Total Tax 2026-10-02 Airtel AX-2231 1,179 180 2026-10-05 Office Mart 7781 4,720 720 ... Total 86,412 13,180 Could not read: scan-07.pdf, photo-bill.pdf (images, no text).
Tips
- Scanned PDFs need OCR. Ask it to check whether tesseract is installed first.
Good to know
Your AI shows its plan before it changes anything, and your rules on the computer still apply: read-only mode, allowed folders and blocked commands, with a backup before each file edit (safety rules). Works in ChatGPT, Claude, Claude Code and Cursor; the free plan gives 50 actions a day (pricing).