The moment it happens
Track spending by texting it to WhatsApp
Each expense you text is logged with a category, you see today's total in the reply, and a monthly breakdown arrives on the 1st.
- Runs
- The moment it happens
- Apps
- WhatsApp Business
- AI
- Yes, uses the built-in AI allowance
- Access
- whatsapp_business_messaging
Send this to your assistant
Create a ClickRuntime automation: when I WhatsApp something like 'groceries 34.20', log it with a category, reply with today's total, and on the 1st of each month send me last month's spending by category.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
Most people who try to track spending give up within a month. Opening a budgeting app, picking a category and typing an amount takes enough effort that a coffee, a taxi and a lunch simply go unrecorded. At the end of the month the credit card statement shows where the money went, but by then it is too late to change anything, and the categories were never captured.
With this automation you send a message such as 'lunch 12.50' to a WhatsApp number. It reads the amount and category, using ClickRuntime's built-in AI or simple rules, stores the entry, and replies with your running total for the month. On the first of the month it sends a report by WhatsApp and email, grouped by category.
It suits freelancers, couples sharing costs and anyone who already chats on WhatsApp all day.
What you get out of it
Logging takes ten seconds
Typing a short text is faster than opening any app. Expenses get recorded at the moment they happen, so the monthly total reflects actual spending instead of a reconstructed guess.
Running total keeps you honest
The reply after each entry shows how much you have spent so far this month. Seeing the figure at the point of purchase nudges decisions in a way a statement a month later cannot.
Categories without manual sorting
The AI reads 'taxi to airport 34' and files it under transport. You do not maintain a category list or pick from a menu, which is what kills most tracking habits.
Monthly report ready for tax or budgeting
Freelancers get a category breakdown to hand to an accountant, and households get a clear view of which areas grew, without exporting anything from a bank. It also makes the end-of-year summary far less painful, because the entries are already grouped and dated.
Shared tracking for a household
Two people can message the same number, and both entries land in one record. A couple sees combined spending without comparing separate apps or sending screenshots to each other. Nobody has to reconcile two sets of notes at the end of the month to agree who paid for what.
How it works
What happens, step by step
When you text an expense to your WhatsApp number, such as "12.50 lunch with Acme", ClickRuntime picks it up straight away.
AI reads the amount and picks a category, such as Food or Travel, and the expense is logged.
You get a WhatsApp reply confirming it, with your total for today.
On the 1st of each month, you get a breakdown by category on WhatsApp and by email.
Before it runs live
- Connect WhatsApp Business
- Paste your automation's link into the other app's webhook settings
What you get
Build your own
Need it to work differently?
Your own rules
Conditions, thresholds, filters and exceptions, written the way you'd explain them to a colleague.
Any number of apps
One automation can read from one app and update several others. Over 248 apps are ready, and anything with an API works too.
AI where it helps
Summaries, classification, extraction and drafts use ClickRuntime's built-in AI, with no extra key.
On a schedule or on each event
Runs as often as every 5 minutes, or the moment an app sends an event, and keeps track of what it already handled.
Changes you can ask for
- Act only on the items that match your own rules, and skip the rest
- Change what the AI looks for, or how it writes the result
- Add another app, for example also send it to Slack
- Combine it with other WhatsApp Business steps into one automation
Under the hood
The code that runs this automation
from collections import defaultdict
from datetime import date
from clickruntime import on_event, on_trigger, credentials, http, state, ai, notify
PHONE_NUMBER_ID = "123456789012345"
MY_NUMBER = "447700900123"
def send(text):
http.post(f"https://graph.facebook.com/v21.0/{PHONE_NUMBER_ID}/messages",
headers={"Authorization": f"Bearer {credentials.secret('WHATSAPP_TOKEN')}"},
json={"messaging_product": "whatsapp", "to": MY_NUMBER, "type": "text", "text": {"body": text}})
@on_event
def log_expense(event):
value = event.json["entry"][0]["changes"][0]["value"]
if "messages" not in value:
return {"skipped": True}
e = ai.generate(value["messages"][0]["text"]["body"], system="Extract the expense.", max_output_tokens=60,
json_schema={"type": "object", "properties": {"amount": {"type": "number"}, "category": {"type": "string"}}}).json
expenses = state.get("expenses") or []
expenses.append({"day": str(date.today()), **e})
state.set("expenses", expenses)
today = sum(x["amount"] for x in expenses if x["day"] == str(date.today()))
send(f"Logged {e['amount']:.2f} for {e['category']}. Today: {today:.2f}")
return e
@on_trigger
def monthly(event):
totals = defaultdict(float)
for x in state.get("expenses") or []:
totals[x["category"]] += x["amount"]
report = "\n".join(f"{c}: {v:.2f}" for c, v in sorted(totals.items(), key=lambda kv: -kv[1])) or "No expenses."
send(f"Last month\n{report}")
notify.email_me("Monthly expenses", report)
state.set("expenses", [])
return dict(totals)FAQ
Common questions
What if the AI misreads my message?
Which currencies does it handle?
Where is the data stored?
What permissions does it need?
Does it need AI?
How many runs does it use?
Can I change how it works?
Related
You might also like
Answer WhatsApp customers with AI that remembers the chat
Customers get a sensible answer in seconds that takes their earlier messages into account, and you get an email when someone wants a person.
See how it worksReply to common WhatsApp questions with set answers
People who type 'hours', 'price' or 'menu' get your fixed answer at once, and everyone else gets your welcome menu.
See how it worksSend a WhatsApp confirmation when someone books
Each new booking or sign-up gets your approved template on WhatsApp with their name and details filled in.
See how it worksKeep exploring
Set up “Track spending by texting it to WhatsApp” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.