Quite a few years back I had a dodgy but functional solution to sync my AMEX Monzo Pot with my AMEX Balance. It involved IFTTT, Google Sheets and reading Android Notifications. It was functional, but often broke. I moved away from Android a few years ago now too, so I haven’t had a working solution beyond manually moving money every couple of days.
I now finally have a working solution to this thanks to AI. I gave the problem to Claude and it walked me through getting a service set up that pulls my AMEX and Barclaycard balances via Truelayer, compares them against the balance in my Monzo pots and then adds money to the pot if needed. And no, before you people in the other thread shout at me, I built this through Claude Chat not Claude Code, so I didn’t expose any of my financial data or access tokens to AI!
- The service runs on a Raspberry Pi I already have set up. Previously the Pi was only hosting my PiHole.
- It triggers every hour to sync my balances.
- It respects the period where my direct debit has just been taken and the balances might be out of sync.
- It exposes its status to my Home Assistant instance and can be triggered to run via Home Assistant too.
I think the biggest takeaway from all of this is that whilst I’m tech savvy, I’m not a dev. I understand this stuff and what it’s doing, but I never could have written this myself. A lot of people here will be in the same boat, so whilst I’m not going to share my exact setup and GitHub repository since the solution I’ve arrived at is very bespoke to my needs, I’ve asked Claude to provide a prompt that I can share with you all, so that you can be walked through building this for yourself.
So if you fancy a bank holiday weekend project, feel free to edit this prompt as you like and give it a go:
I’d like to build an automated system that syncs my credit card balance to a Monzo pot, so the pot always reflects what I owe on my card. Here’s the setup I have in mind:
Read my credit card balance using TrueLayer (open banking)
Deposit the difference into a Monzo pot if the balance has increased
The pot should only ever go up, never down (to avoid issues around direct debit timing)
Detect when a direct debit has gone out in the last 3 days and skip the sync during that window
Run automatically on a schedule via cron job on a Raspberry Pi running Debian
Include a kill switch and status sensors via Home Assistant
Include a web dashboard on the Pi for re-authenticating with TrueLayer every 90 days
Please help me build this step by step, starting with setting up TrueLayer and Monzo developer accounts, then writing the Python scripts, setting up the systemd service, cron job, and Home Assistant integration.
My Pi is running Debian with Python 3 and pip already installed. I have Home Assistant running on a separate Pi on my local network.
Also if you have suggestions on how this can be improved or questions about how I’ve approached some of the challenges I hit, feel free to share here.