Finance Agent
Featured Stories Finance • Agent

Finance Agent

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

Agent OpenClaw Agent
Level Starter
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.

Start Here: One Prompt

Copy this prompt and send it to the agent on your Pocketcorp. It sets up everything in this guide and reports back when it’s done. The steps below explain what your agent is doing — and how to check its work.

prompt — paste to your agent
Set up my invoice bookkeeping on this server.

1. Pair WhatsApp: run openclaw channels login --channel whatsapp and
   show me the QR code. Then allow only my number (<+43...>) so my
   WhatsApp self-chat becomes the agent inbox.
2. Ask me where the ledger lives: Google Sheets (I’ll provide a
   service-account JSON — remind me to enable BOTH the Sheets and
   Drive APIs and to share the folder with the service account as
   Editor) or a local .xlsx via excel-mcp-server.
3. Create an invoice-inbox skill. When I send a photo of an invoice
   or receipt: save the original to ~/receipts/YYYY/MM/ first;
   extract vendor, date (ISO), net, VAT rate, VAT, gross, currency,
   category, payment method — every field nullable, NEVER guess;
   validate line items sum to gross ±0.02; dedupe on
   vendor+date+gross; append one ledger row linking the original;
   reply with a one-line summary. Categories: office, travel,
   software, hardware, marketing, services, other — ask when unsure.
4. Cron: on the 1st at 8:00 a monthly digest to WhatsApp (total
   spend, top 5 categories, anything unusual). On Jan 2 a year-end
   script: group the ledger with pandas, export statement.xlsx,
   send me the key numbers.
5. Test now: I’ll send a receipt photo — file it and show me the row.

The Stack

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

Send the prompt, scan one QR code

Copy the prompt above and paste it into a chat with your agent. Its first move is to start the WhatsApp pairing and show you a QR code — the same kind you scan to use WhatsApp on a laptop:

what the agent runs
openclaw channels login --channel whatsapp
# it shows you a QR code — scan it with your phone

On your phone: WhatsApp → Settings → Linked Devices → Link a Device, and point the camera at the code. That’s your whole setup job. The agent then locks the channel to your own number, so your WhatsApp self-chat (“Message yourself”) becomes a private line to your bookkeeper — nobody else can talk to it:

what the agent configures
{
  channels: {
    whatsapp: {
      enabled: true,
      allowFrom: ["+436601234567"], // your number → self-chat mode
    },
  },
}
Note

You never have to edit this file yourself — the agent maintains it. If your phone ever unlinks, tell the agent “pair WhatsApp again” and scan a fresh code.

02

Tell it where the ledger lives

Next, the agent asks where your ledger should live. Both answers work — pick by taste:

  • An Excel file on your server — the zero-accounts option. The agent writes a real .xlsx you can download anytime from your Pocketcorp’s file browser.
  • Google Sheets — open the ledger from any device, and edits stay safe even while the agent writes. Needs a free Google Cloud “service account”; the agent walks you through creating it, click by click, and wires it in:
what the agent runs (Google Sheets route)
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

Two switches people miss on the Sheets route: the Drive API must be enabled alongside the Sheets API, and the Drive folder must be shared with the service-account email as Editor. Both fail silently — which is exactly why the prompt tells the agent to remind you of them.

03

The rulebook it writes for itself

You don’t write this part. The prompt has the agent create a skill — a plain-text instruction file it re-reads every time an invoice arrives. This one encodes the discipline that separates a reliable bookkeeper from a guessing 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 “never guess” rule is the highest-leverage line in the file. Forcing a value makes AI models invent one; allowing “unreadable” means the agent asks you instead — exactly what you want from a bookkeeper.

04

Test it

Photograph any receipt on your desk and send it to your self-chat. This is the moment the whole build clicks — 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

Month-end runs itself

The prompt also sets up two standing jobs — the agent schedules them, and the messages simply arrive. A monthly digest keeps you honest; the year-end statement is computed by a script, not by vibes, because sums belong to Python, not to a language model:

what the agent schedules
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. €15/month, or €12/month billed annually.

More stories to build