- Home
- Skills
- Workflow Automation
- Invoice PDF to Spreadsheet (OCR + Gmail automation)
More screenshots
Works with the AI Agents you already use
Invoice PDF to Spreadsheet (OCR + Gmail automation)
Typing invoices into a spreadsheet by hand is slow, and regex-based parsers break the moment a supplier changes their template.
Free
Invoice PDF to Spreadsheet (OCR + Gmail automation)
Example session with this skill installed
I've got this month's supplier invoices in ./november (a couple are scanned). Log them into invoices.xlsx and tag them with my client rules in rules.json.
- Read your context and instructions
- Compiled the invoice pdf to
Summary
Logged
3 invoices from ./november into invoices.xlsx. One was a scan and went through OCR. 0 duplicates skipped.
1 row needs your review.
| # | Date | Invoice | Issuer | Client | Total | Category | Review |
|---|---|---|---|---|---|---|---|
| 1 | 2026-11-03 | F-2026-0412 | Talleres Norte S.L. | ACME Iberia S.A. | 1,452.00 € | Client | ok |
| 2 | 2026-11-05 | INV-88231 | Cloudbyte Hosting Ltd | ACME Iberia S.A. | 883.30 € | Client | ok |
| 3 | 2026-11-12 | 2026/187 | Imprenta Sol S.L. | Grupo Ejemplo Holding S.L. | 484.00 € | Intercompany | ⚠ review |
Totals (EUR): subtotal 2,330.00 · VAT 489.30 · total 2,819.30
How each file was read
talleres-norte_F-2026-0412.pdf: text layercloudbyte_INV-88231.pdf: text layer (English invoice, VAT IE…)imprenta-sol_2026-187.pdf: scanned, so OCR (spa+eng)
Needs review
- 2026/187 · Imprenta Sol S.L. The client's tax ID is unreadable in the scan (OCR read
899887766, which is likelyB99887766). I leftclient_tax_idempty instead of guessing. Amounts check out (400.00 + 84.00 = 484.00).
Classification
Rules matched on client_name: "ACME" → Client / 430001 / CC-ACME (×2), "Grupo Ejemplo" → Intercompany / 430900 / CC-GROUP (×1).
Next steps
- Confirm the tax ID for 2026/187 and I'll update the row.
- Running this again on the same folder is safe: existing invoices are skipped.
- Want new invoices logged automatically as they arrive by email? I can set up the Gmail → Google Sheets automation.
Connects securely to your tools. The creator never sees your data.
About this skill
Typing invoices into a spreadsheet by hand is slow, and regex-based parsers break the moment a supplier changes their template. This skill lets your agent do it properly: it reads the PDF (running OCR when it's a scan), pulls out every field itself, and appends clean, deduplicated rows to your ledger.
What it does
- Reads any PDF invoice. Digital PDFs use the text layer; scanned ones fall back to local OCR (tesseract). Works with Spanish and English invoices out of the box, and any language tesseract supports.
- Extracts the fields with the agent, not with regex. Invoice number, date (ISO), issuer and client with tax IDs (NIF/CIF/VAT), description, subtotal, tax, total and currency. European number formats (
1.234,56) are normalised. - Never invents data. Missing or unreadable values are left empty and the row is flagged
needs_review. Rows where subtotal + tax doesn't match the total are flagged too. - Classifies by client or supplier. A small
rules.jsonmaps names to your own columns: category, account code, cost centre, anything you like. - Safe to re-run. Invoices already in the ledger (same number + issuer) are skipped.
- Fits your existing sheet. It keeps your header and column order, can insert rows above a totals row (and stretches the
SUMformula), and can write the same rows to a second ledger.
Two modes
- Process now: "Log the invoices in this folder into invoices.xlsx". Your agent runs the bundled scripts and gives you a short summary plus the list of rows to review.
- Hands-off Gmail automation: your agent tailors the bundled Google Apps Script to your invoices (writes and tests the extraction patterns against a sample) and walks you through installing it. From then on, invoices that arrive by email are OCR'd and logged in Google Sheets on a timer, with no agent needed.
What's inside
SKILL.md: the workflow and extraction rulesscripts/extract_text.py: text layer or OCR fallback, JSON outputscripts/append_rows.py: classify, dedupe and append to CSV/XLSXreference/apps-script/: the Gmail → Sheets script and setup guidereference/rules.example.json
Privacy
Everything runs locally and makes no network calls. Invoice data never leaves your machine unless you explicitly ask for it.
Scanned PDFs need Tesseract and Poppler installed locally, and OCR quality depends on the scan: unclear values are left empty and flagged, never guessed. Withholdings (e.g. IRPF) are only subtracted if you ask. Writing straight to Google Sheets needs a Sheets tool in your agent or the Gmail/Apps Script mode; otherwise you get an XLSX/CSV to import. Tested mainly with Spanish and English invoices.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Free to use
No account required to browse
Trust & safety
Security scan
Security scan passed 4 days ago
- Free with an Agensi account
- Software
- Python 3.10+ with pypdf and openpyxl
- Optional
- Google account (Gmail → Google Sheets automation mode)Tesseract OCR with Spanish language pack (scanned PDFs only)Poppler utils (scanned PDFs only)
Install the Python packages with: pip install pypdf openpyxl. On macOS: brew install tesseract tesseract-lang poppler.
Permissions
File Scopes
Shell runs the two bundled Python scripts. Read Files reads the PDFs you point it at. Write Files writes or updates your CSV/XLSX ledger. No network access: invoice data never leaves your machine.
What's inside
Frequently Asked Questions
New in Workflow Automation
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Workflow Automation.