When I signed up for my Monzo bank account last year, one of the things that really excited me was the API they made available. Of course, as is so often the way with these things, my time was taken up with other things and I never really got any further than installing the Perl module that wrapped the API.
The problem is that writing code against an API takes too long. Oh, it’s generally not particularly difficult, but there’s always something that’s more complicated than you think it’s going to be.
So I was really interested to read last week that Monzo now works with IFTTT. IFTTT (“If This Then That”) is a service which removes the complexity from API programming. You basically plug services together to do something useful. I’ve dabbled with IFTTT before. I have “applets” which automatically post my Instagram photos to Twitter, change my phone’s wallpaper to NASA’s photo of the day, tell me when the ISS is overhead – things like that) so I knew this would be an easier way to do interesting things with the Monzo API – without all that tedious programming.
An IFTTT applet has two parts. There’s a “trigger” (something that tells the applet to run) and an “action” (what you want it to do). Monzo offers both triggers and actions. The triggers are mostly fired when you make a purchase with your card (optionally filtered on things like the merchant or the amount). The actions are moving money into or out of a pot (a pot in a Monzo account is a named, ring-fenced area in your account where you can put money that you want to set aside for a particular purpose).
You can use a Monzo trigger and action together (when I buy something at McDonald’s, move £5 to my “Sin Bin” pot) but more interesting things happen if you combine them with triggers and actions from other providers (move £5 into my “Treats” pot when I do a 5K run – there are dozens of providers).
I needed an example to try it out. I decided to make a Twitter Swear Box. The idea is simple. If I tweet a bad word, I move £1 from my main account into my Swear Box pot.
The action part is simple enough. Monzo provides an action to move money out of a pot. You just need to give it the name of the pot and the amount to move.
The trigger part is a little harder. Twitter provides a trigger that fires whenever I tweet, but that doesn’t let me filter it to look for rude words. But there’s also a Twitter Search trigger which fires whenever a Twitter search finds a tweet which matches a particular search criterion. I used https://twitter.com/search-advanced to work out the search string to use and ended up with “fudge OR pish OR shirt from:davorg”. There’s a slight problem here – it doesn’t find other versions of the words like “fudging” or “shirty” – but this is good enough for a proof of concept.
Creating the applet is a simple as choosing the services you want to use, selecting the correct trigger and action and then filling in a few (usually pretty obvious) details. Within fifteen minutes I had it up and running. I sent a tweet containing the word “fudge” and seconds later there was a pound in my Swear Box pot.
Tonight, I was at a meeting at Monzo’s offices where they talked about how they developed the IFTTT integration and what directions it might go in the future. I asked for the latitude and longitude of a transaction to be included in the details that IFTTT gets – I have a plan to plot my transactions on a map.
Monzo is the first bank to release an integration with IFTTT and it really feels like we’re on the verge of something really useful here. I’ll be great to see where they take the service in the future.