← Back to directory
Personal Life Medium to set up AI workflow Custodial/Maintain State

WhatsApp Expense Tracker Reports

Source reviewed Updated 2026-07-07

Send natural language messages to WhatsApp to log expenses or generate financial reports, with data stored in PostgreSQL.

anyone managing their own dayfreelancers and consultants

What it does

Log expenses instantly by sending natural language messages to WhatsApp, where the tool automatically categorizes your spending and saves it securely. You receive immediate summaries and daily financial reports directly in your chat without needing to open an app or spreadsheet.

Step by step

  1. Set up a webhook endpoint in your backend to receive POST requests from the WhatsApp Business Cloud API.
  2. Configure environment variables for the WhatsApp Access Token, Phone Number ID, and Verify Token.
  3. Create a PostgreSQL table schema with columns for id, timestamp, raw_message, amount, category, and description.

Where the LLM does the work

  • Design the system prompt to instruct the model to extract numeric amounts and map them to specific expense categories like food or transport.
  • Generate dynamic response templates that format the parsed transaction data into a readable WhatsApp message string.
  • Handle ambiguous inputs by having the LLM decide whether to ask for clarification or assume a default category based on context.

Watch out for

WhatsApp messages often contain emojis and informal slang so you must preprocess text to remove non-numeric characters before parsing amounts.
Currency symbols vary by region so ensure your LLM prompt explicitly handles different formats like $10, 10€, or ten dollars as valid numeric values.
Storing raw chat logs can lead to data privacy issues so you should anonymize user identifiers and encrypt sensitive financial data in the database.

Tools that fit

WhatsApp Business Cloud Service Receive and send messages
OpenRouter Chat Model LLM Parse natural language into structured data
Postgres Service Store financial transaction records

The agent brief

Everything your agent needs, including the gotchas. Copy it and go.
agent-brief.md
You are helping me build the following AI agent workflow.

## Goal
WhatsApp Expense Tracker Reports: Send natural language messages to WhatsApp to log expenses or generate financial reports, with data stored in PostgreSQL.

## Specification
- What it does: Log expenses instantly by sending natural language messages to WhatsApp, where the tool automatically categorizes your spending and saves it securely. You receive immediate summaries and daily financial reports directly in your chat without needing to open an app or spreadsheet.
- Trigger: Triggered by an event (Manual · on WhatsApp message or Scheduled · daily)
- Autonomy: Fully hands-off
- Expected setup effort: about an afternoon
- Tools/services involved:
  - WhatsApp Business Cloud: Receive and send messages
  - OpenRouter Chat Model: Parse natural language into structured data
  - Postgres: Store financial transaction records

## Known pitfalls, handle each one explicitly in your implementation
1. WhatsApp messages often contain emojis and informal slang so you must preprocess text to remove non-numeric characters before parsing amounts.
2. Currency symbols vary by region so ensure your LLM prompt explicitly handles different formats like $10, 10€, or ten dollars as valid numeric values.
3. Storing raw chat logs can lead to data privacy issues so you should anonymize user identifiers and encrypt sensitive financial data in the database.

## Reference implementation
https://n8n.io/workflows/4136 (workflow template)
Fetch and inspect this before building. If it matches my stack, adapt it;
if not, rebuild the pattern with my tools.

## Process requirements
1. Before building: ask me which of the listed tools I actually use and
   what my platform is (n8n / Make / code / other). Do not assume.
2. Adapt the pattern to my answers; do not force the reference stack.
3. Address every pitfall above; tell me how you handled each.
4. Provide a test plan I can run before letting this touch real data.
5. Ask before any step that sends messages, modifies data, or spends money.

Source: https://usecasesforagents.com/use-case/whatsapp-expense-tracker-with-ai-reports/ via usecasesforagents.com

Frequently asked questions

Can I use a different Messaging than WhatsApp?

Yes. WhatsApp is only the example messaging in this recipe. The same flow works with ClickSend API, Discord, Google Chat and LINE Messaging API. Swap the messaging connection and keep the rest of the setup as written.

Want this running in your business?

This is what I do. I design and build AI agents like this one, and keep them running. If you want it set up for your team instead of doing it yourself, get in touch.
Get in touch →

Who it's for

Built for anyone who wants this off their own plate, no team or company required.

Freelancers and consultants can run this per-client with no changes beyond the source data.

Seen in the wild

← Back to directory