Operations

Extract Invoice and Receipt Data from Email Attachments into a Spreadsheet

Published

Forward receipts and invoices to your Bot's email address, or let it read a connected inbox. A routine opens each PDF attachment, extracts vendor...

Answer first: Forward receipts and invoices to your Bot's email address, or let it read a connected inbox. A routine opens each PDF attachment, extracts vendor, date, amount, currency, tax and invoice number, and adds a row to an .xlsx on its computer. Ask for a monthly summary and the updated file whenever you need them.

Test status: the box has the tools this needs (pdftotext and the Python openpyxl library, checked 2026-10-16). Not tested on real mail, because the Bot has no email address in this environment and claiming one is permanent.

Who it's for

Freelancers and small-business owners who dread their monthly expense report.

Steps

  1. Claim the Bot's email address (see Claim and Use Your Bot's Email Address), then forward receipts to it or set up auto-forwarding.
  2. Paste the prompt to create a routine that fires on mail from anyone, or only from your own address.
  3. On the 1st of each month, ask for the summary and the file.

Copy-paste prompt

Set up a routine: when email arrives in your inbox from <MY ADDRESS> (forwarded receipts),
open each PDF/image attachment and extract: vendor, invoice/receipt number, date, total, currency, tax, category guess.
Append a row to expenses-<YYYY>.xlsx with the email date and file name. Convert to <HOME CURRENCY> only if I ask.
If a field is unreadable, leave it blank and mark the row "check".
Post a one-line confirmation per receipt.

Expected result

A one-line confirmation per receipt and a growing spreadsheet, with unreadable fields flagged instead of guessed.

Gotchas

  • Attachment limits: up to 10 per message, 10 MB each and 25 MB total. Larger files are skipped.
  • Scanned image receipts are harder than text PDFs. Expect more "check" rows.
  • Forwarded mail from your own address must pass sender authentication to trigger the routine.
  • It won't pay anything. It only records.

FAQ

Can it send the report to my accountant? It can draft the email with the file attached. You approve the send.