Finance Agent
Featured Stories Finance • Agent

Finance AgentFinance AgentFinance Agent

Photograph any invoice in WhatsApp — your agent extracts it, files it, and keeps a ledger that is ready for year-end.

AgentOpenClaw Agent
LevelStarter
Setup~30 min

This is the classic “shoebox of receipts” problem, solved. Every invoice you photograph lands in a structured ledger with the original image archived next to it. The agent does vision extraction with strict validation rules, so amounts and VAT are read — never guessed. At year-end, one message produces your income/expense statement.

OpenClaw Agent · Open Source

OpenClaw pairs with your personal WhatsApp in one QR scan and treats your self-chat as a private command line. Its cron system handles the month-end summaries, and everything — originals, ledger, memory — lives as plain files on your Pocketcorp.

The Stack

ChannelWhatsApp (self-chat)
MCPmcp-google-sheets
MCPexcel-mcp-server (alt.)
Skillinvoice-inbox SKILL.md
ToolVision model (built-in)
ToolOpenClaw cron
01

Pair WhatsApp

Open the terminal on your Pocketcorp (VS Code tab or Terminal — OpenClaw is already running as a gateway service) and link your WhatsApp:

terminal
openclaw channels login --channel whatsapp
# scan the QR code with WhatsApp → Linked Devices

Then allow your own number, so your WhatsApp self-chat (“Message yourself”) becomes the agent inbox. Edit ~/.openclaw/openclaw.json:

~/.openclaw/openclaw.json
{
  channels: {
    whatsapp: {
      enabled: true,
      allowFrom: ["+436601234567"], // your number → self-chat mode
    },
  },
}
Note

OpenClaw config is JSON5 — comments and trailing commas are fine. The gateway hot-reloads on save; no restart needed.

02

Connect the ledger

Pick where the ledger lives. Google Sheets is the smoothest (safe concurrent writes, view from any device). Create a Google Cloud service account, enable the Sheets AND Drive APIs, then register the MCP server:

terminal
openclaw mcp add sheets \
  --command uvx --arg mcp-google-sheets@latest

openclaw config set mcp.servers.sheets.env.SERVICE_ACCOUNT_PATH \
  "~/secrets/sheets-sa.json"
openclaw config set mcp.servers.sheets.env.DRIVE_FOLDER_ID "1AbC..."
Heads up

The two classic mistakes: enabling only the Sheets API (Drive API must be on too), and forgetting to share the Drive folder with the service-account email as Editor. Both fail silently until the first write.

Prefer a real .xlsx you can grab via the Pocketcorp file browser? Use excel-mcp-server instead — it needs no Google account and writes local files: openclaw mcp add excel --command uvx --arg excel-mcp-server --arg stdio

03

Teach the invoice skill

Skills are markdown instruction files the agent loads on demand. Create one that encodes the extraction discipline — this is what separates a reliable bookkeeper from a hallucinating one:

~/.openclaw/workspace/skills/invoice-inbox/SKILL.md
---
name: invoice-inbox
description: File photographed invoices into the ledger with audit trail
---

When I send a photo of an invoice or receipt:

1. Save the original to ~/receipts/YYYY/MM/ before anything else.
2. Extract: vendor, date (ISO 8601), net, VAT rate, VAT, gross,
   currency (ISO 4217), category, payment method.
3. Every field is nullable — NEVER guess. If the date or a total
   is unreadable, set it null and ask me.
4. Validate: line items must sum to gross ±0.02. If not, flag it.
5. Dedupe: check vendor+date+gross against the ledger before
   appending. If it exists, tell me instead of double-booking.
6. Append one row to the "Ledger" sheet, last column = link/path
   to the original image.
7. Reply with a one-line summary: vendor · gross · category.

Categories: office, travel, software, hardware, marketing,
services, other. Ask when unsure — do not invent categories.
Pro tip

The nullable rule is the highest-leverage line in the file. Required fields force vision models to invent data; nullable fields let them say “unreadable” — exactly what you want for bookkeeping.

04

Test it

Photograph any receipt and send it to your self-chat. The exchange should look like this:

You

📷 [photo of a hardware store invoice]

Agent

Filed ✓ Bauhaus · €84.90 gross (€70.75 net, 20% VAT) · hardware · 2026-07-02. Original saved to receipts/2026/07/. Row 47 in the ledger.

You

📷 [blurry photo]

Agent

The total is unreadable in this shot (WhatsApp compressed it). Can you resend it as a document/file instead of a photo? That skips compression.

Heads up

WhatsApp compresses photos aggressively (5 MB → ~80 KB) — the #1 failure mode for small print. For dense invoices, attach as document instead of photo; the skill above tells the agent to ask for exactly that.

05

Automate month-end and year-end

Let cron do the recurring accounting. A monthly digest keeps you honest; the year-end statement is a script, not vibes — sums belong to Python, not to a language model:

terminal
openclaw cron add --cron "0 8 1 * *" \
  "Summarize last month from the ledger: total spend, top 5
   categories, anything unusual. Message me the digest." \
  --announce --channel whatsapp

openclaw cron add --cron "0 9 2 1 *" \
  "Run the year-end script: group the ledger by category and month
   with pandas, compute income - expenses and a VAT summary,
   export statement.xlsx, and send me the key numbers."
Note

Keeping the original images matters beyond convenience: tax rules like Germany’s GoBD require originals retained (10 years) — a spreadsheet row alone is not a record. Your ledger links every row to its image.

What you end up with

A ledger that fills itself, an audit trail of original images, monthly digests in your pocket, and a year-end statement generated on demand. You photograph — the agent does the bookkeeping.

Deploy your PocketcorpOpenClaw Agent comes pre-installed. €12/month.

More stories to build