
Photograph any invoice in WhatsApp — your agent extracts it, files it, and keeps a ledger that is ready for year-end.
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 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.
Open the terminal on your Pocketcorp (VS Code tab or Terminal — OpenClaw is already running as a gateway service) and link your WhatsApp:
openclaw channels login --channel whatsapp
# scan the QR code with WhatsApp → Linked DevicesThen allow your own number, so your WhatsApp self-chat (“Message yourself”) becomes the agent inbox. Edit ~/.openclaw/openclaw.json:
{
channels: {
whatsapp: {
enabled: true,
allowFrom: ["+436601234567"], // your number → self-chat mode
},
},
}OpenClaw config is JSON5 — comments and trailing commas are fine. The gateway hot-reloads on save; no restart needed.
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:
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..."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
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:
---
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.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.
Photograph any receipt and send it to your self-chat. The exchange should look like this:
📷 [photo of a hardware store invoice]
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.
📷 [blurry photo]
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.
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.
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:
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."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.
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.