cd /news/ai-agents/turn-photos-of-invoices-into-an-exce… · home › topics › ai-agents › article
[ARTICLE · art-179233] src=dev.to ↗ pub= topic=ai-agents verified=true sentiment=↑ positive

Turn photos of invoices into an Excel register with Claude Code

A developer published a walkthrough for automating invoice data entry using Claude Code combined with three free tools: the invoice-organizer skill for renaming and sorting scanned files by month, Anthropic's xlsx skill for building a formula-driven Excel register, and Nanonets' DocStrange package for extracting fields from PDFs, scans and photos. The workflow extracts fields against a user-defined JSON schema, marks unreadable values as "[check]" rather than guessing amounts, and routes problem documents to a separate review sheet, leaving human verification in place.

recommendation

Define a JSON extraction schema with explicit types and "[check]" rules for unreadable values, and require the agent to show a rename plan and wait for approval before touching files.

more in playbook: Designing agent systems
by read5 min views6 publishedDec 1, 2026

An accountant gets a stack of invoices, delivery notes and receipts, and retypes them into a spreadsheet. Hours of work where nobody uses their experience.

This setup replaces the retyping. You point it at a folder of scans and phone photos. You get back one Excel register, files renamed and sorted by month, and a "to check" list for the unreadable ones. The data entry is automated. The checking stays with a person.

Three free pieces working together:

invoice-organizer renames and sorts files. xlsx builds the Excel file with formulas. You need Claude Code (a paid Claude plan), Python, and 10 to 20 sample documents. Copies, not originals.

DocStrange has two modes:

docstrange login (Google sign-in) or with a free API key. Documents go to the server of Nanonets, the developer. What to extract is a decision for you and whoever owns the documents. Ask any strong LLM to write it down in a machine-readable form. Fix the bracketed parts:

I am setting up an agent that reads invoices and delivery notes of a client [accounting firm / logistics company] and moves the data into a table.
I need:
1. A list of fields to extract: document number, date, supplier, supplier tax ID, amount without VAT, VAT, total amount, currency, purpose. Add [my own fields].
2. A JSON schema where every field has a type: "string" or "number", for example {"invoice_number": "string", "total_amount": "number"}. Give document line items as a list of objects.
3. Rules for disputed cases: mark an unreadable value as "[check]", never guess an amount, and move duplicates and documents outside the reporting period to a separate list.
4. A short list of questions I need to clarify with the client.

Save the JSON as schema.json. Show the field list to the document owner. It also tells you what matters to them.

Make a folder such as scan-test, open Claude Code in it and paste:

Prepare the environment for working with documents.
1. Install the Python package docstrange (pip install docstrange).
2. Download the invoice-organizer skill (https://aiskills.team/en/claude-skills/invoice-organizer) and put its folder into ~/.claude/skills/invoice-organizer.
3. Take the official `xlsx` skill from Anthropic's `anthropics/skills` repository and put its folder into ~/.claude/skills/xlsx.
Before each step say what you are about to do. If a skill asks to install extra programs, ask me. Do not change or delete anything outside these folders. After installation read the SKILL.md of each skill and briefly retell what it can do, and check that the docstrange command runs.

You should get a short report on three items. The Excel skill recalculates formulas with LibreOffice, so Claude Code may ask to install it. Allow it.

For cloud mode, sign in once:

docstrange login

A browser opens, you sign in with Google. Or use a free API key from your DocStrange account. Treat the key like a password and never paste it into a chat.

Put the 10 to 20 document copies into an incoming folder, then give Claude Code this:

In the incoming folder there are invoices and delivery notes: PDFs, scans and photos. Work step by step.
1. For each file, extract the fields from the schema in schema.json through docstrange (cloud mode) and save the result in the data folder. Mark unreadable values "[check]" and do not guess amounts.
2. With the invoice-organizer skill, show a plan: how you will rename the files by the template "YYYY-MM-DD Supplier - Invoice - Description" and sort the copies into folders by month. Do not touch the originals. Wait for my "yes".
3. After "yes", carry out the plan and with the xlsx skill build the file reestr.xlsx: a "Register" sheet with all rows, a "Totals by month" sheet with formulas, and a "To check" sheet with problem documents.
At the end write how many files were processed and how many went to "To check".

First you see the renaming plan. After "yes" you get month folders and reestr.xlsx. Then open the table and compare 10 documents with the originals by hand: amount, date, supplier. Do this every time.

For a stack of receipts there is a separate expense-report skill that flags missing receipts, limit overruns and duplicates. It needs the company's expense policy as input.

Dozens of files fit the flow above. For thousands, look at Unstract. You describe fields in plain words (a tool called Prompt Studio), send a document through an API, and get JSON back. It has a pipeline that picks files from a folder or cloud storage.

According to its README you need Linux or macOS, Docker, 8 GB of memory, and a key for an AI model or a local Ollama. It starts with one command:

./run-platform.sh

The default login is unstract/unstract. Change the password immediately. The licence is AGPL-3.0, so read its terms before you modify the code and offer it as a service.

docstrange not found. A folder of mixed scans becomes reestr.xlsx with a register, monthly totals with formulas, and a "To check" sheet. Files are renamed YYYY-MM-DD Supplier - Invoice - Description and sit in month folders.

The full walkthrough with all three prompts is on our blog: Agent that turns documents into a table

Scan or photograph 10 of your own old receipts or invoices, drop them in incoming, and run step 3. Then count how many landed in "To check" and which field failed most often. That tells you what to fix in schema.json.

This article was written with the help of AI and fact-checked by the AI SKILLS team.

── more in #ai-agents 4 stories · sorted by recency
── more on @claude code 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/turn-photos-of-invoi…] indexed:0 read:5min 2026-12-01 · —