Every 15 minutes
Track your spending from receipt emails
Each receipt that lands in your inbox is posted to Slack, and you always know this month's total.
- Runs
- Every 15 minutes
- Apps
- Gmail, Slack
- AI
- Optional
- Access
- Gmail gmail.readonly; Slack chat:write
Send this to your assistant
Create a ClickRuntime automation: when a receipt from Uber Eats or Deliveroo arrives in Gmail, post the restaurant and amount to my #spending channel in Slack and keep a running total for the month.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A team that orders lunch or snacks through a delivery service ends up with a mailbox full of receipts and no idea what the monthly total is. Someone asks at the end of the month why the food budget is blown, and tallying means opening forty emails, finding the amounts and typing them into a spreadsheet. By then it is too late to change anything.
Every 15 minutes Gmail is searched for receipts from the delivery sender. The amount and items are parsed from each, a summary goes to Slack, and a running counter for the month is updated. The tally is part of every post, so spending is visible as it grows.
It suits office managers, small teams with a food allowance and individuals who want to watch their own takeaway spend.
What you get out of it
Spending is visible before it overruns
A running monthly figure in each post lets a team notice at mid-month that they are already at 80 percent of the budget, while there is still time to adjust.
No one tallies receipts by hand
The amounts are read and added automatically, which removes a tedious month-end task and the arithmetic errors that come with copying figures between emails. Accuracy improves too, since no one retypes figures.
The team sees who ordered what
Posting items to a shared channel avoids double orders and shows what the group likes, which can inform a standing order or a better deal. It can even start friendly conversations about the next order.
A clear record for expenses
Receipts in Slack with amounts form a searchable log, helpful when reimbursing a person or reconciling the card statement later. Reimbursement conversations are much calmer with the evidence at hand.
Reset happens on its own each month
The counter starts over at the beginning of a new month, so figures never mix across periods and you never need to clear anything. Nothing is left behind from the previous month.
How it works
What happens, step by step
Every 15 minutes, ClickRuntime checks Gmail for receipt or order emails from Uber or Deliveroo, skipping any it has already counted.
It reads the amount from each receipt.
It adds the amount to your running total for the month.
Each receipt is posted to your #spending Slack channel with the shop, amount and month-to-date total.
Before it runs live
- Connect Google through your own Google app (a one-time, 10-minute setup), so it works with your own Gmail
- Connect Slack, then invite the app to the channel (type /invite @ClickRuntime there)
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 Google Sheets
- Combine it with other Gmail and Slack steps into one automation
Under the hood
The code that runs this automation
import re
from datetime import date
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from clickruntime import on_trigger, credentials, state, notify, report_fetched
@on_trigger
def run(event):
gmail = build("gmail", "v1", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False)
seen = set(state.get("seen") or [])
msgs = gmail.users().messages().list(userId="me", maxResults=20,
q="from:(uber.com OR deliveroo.co.uk) subject:(receipt OR order) newer_than:2d").execute().get("messages", [])
new = [m for m in msgs if m["id"] not in seen]
report_fetched(len(new))
if not new:
return {"new": 0}
month = date.today().strftime("%Y-%m")
total = state.get(f"total:{month}") or 0.0
for m in new:
msg = gmail.users().messages().get(userId="me", id=m["id"], format="metadata", metadataHeaders=["Subject"]).execute()
subject = msg["payload"]["headers"][0]["value"]
amount = float((re.search(r"£\s?(\d+[.,]\d{2})", msg["snippet"]) or re.search(r"(\d+\.\d{2})", msg["snippet"]) or [0, "0"])[1].replace(",", "."))
place = re.sub(r"^(Your|Order|Receipt).*?(from|for)\s+", "", subject, flags=re.I)
total += amount
notify.slack(f"🍔 {place}: £{amount:.2f} (month so far £{total:.2f})", channel="#spending")
state.set(f"total:{month}", total)
state.set("seen", [m["id"] for m in msgs])
return {"new": len(new), "month_total": total}FAQ
Common questions
Which delivery services does it work with?
Can it warn me when the budget is reached?
Does the AI step matter here?
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
Get your important emails in Slack
New mail is sorted and labelled for you, and the urgent ones are posted to Slack with a one-line summary.
See how it worksCheck suspicious links people forward to you
When someone forwards a suspicious email, the links in it are checked and the verdict is posted to your security channel.
See how it worksDraft answers to RFP questionnaires
When an RFP arrives by email, answers are drafted from your company details and saved as a Gmail reply for you to check.
See how it worksKeep exploring
Set up “Track your spending from receipt emails” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.