Monzo & IFTTT - Share your creations here!

It’s not necessarily a punishment. More of a consequence…

I can see your logic.

But NOT saving on that day when I do spend is consequence enough for me…

It’s save or don’t save. Not save or spend.

1 Like

Sure, I just wanted to make sure :stuck_out_tongue_winking_eye:

Some people like to make it extra harsh haha

Financial deviants, they are!

1 Like

No, it’s a custom applet created using the IFTTT Platform.

How would I make an applet that would move money out of a pot when a Vodafone bill comes in of the exact amount that the transaction was. For example, if Vodafone took money via a DD of £41.23, how would I get the IFTTT to take £41.23 out of say a “Bills” pot?

Thanks in advance.

1 Like

Create an IFTTT trigger for the merchant name, then in the second IFTTT part choose the transfer money from a pot.

I think it’s then this:
The add ingredient button lets you choose various options
24

That doesn’t work for direct debits, only card transactions :disappointed_relieved:

Direct debits as triggers are on the way :soon: I think

You can actually do this directly on the Monzo app now

So, since nobody was able to help me out, I’ve had another try with developing my own applet… I think I might be getting somewhere but I’ll have to run some transactions through to see what happens in the next few days.

For anyone interested, I’ve created my own private applet using the ifttt platform tools (platform.ifttt.com).

I’ve created an applet with the Monzo service using the trigger ‘Any Card Purchase’ and using the ‘Withdraw from Pot’ action.

I’ve then used the filter coder and written the following

var Merchant = Monzo.cardPurchase.MerchantName
var Amount = Monzo.cardPurchase.AmountInAccountCurrency
if (Merchant=“Asda”)
{
Monzo.potWithdraw.setAmount(Amount)
}
else if (Merchant=“Sainsbury’s”)
{
Monzo.potWithdraw.setAmount(Amount)
}
else if (Merchant=“Waitrose”)
{
Monzo.potWithdraw.setAmount(Amount)
}
else
{
Monzo.potWithdraw.skip(“Not Grocery Purchase”)
}

I’ve never written a word in javascript before, so this might not be the best way to write the code, but I couldn’t figure out how to get a ‘string’ of merchants and get it to work. I also preferred listing merchants rather than go by category (mainly because for my needs I’m not going to want every grocery purchase to come from the pot, only the main weekly shop which will be from specific merchants only (not the ones above, but I needed a way of testing rather than waiting a week each time!)

I think this is working, but if anyone has any guidance or knowledge do shout up - and feel free to build your own versions!! Hope it’s helpful

1 Like

Not bad to say that you’ve never written any before! Generally if you have multiple if / else conditions it is best to use a switch statement - if it works though then that’s great :+1:

3 Likes

You could also use an array/dictionary to map merchant names to pot withdrawal amounts. :wink:

4 Likes

I can’t claim I’m a complete newbie though - I have written SQL and previous Microsoft VBA, so I do have a bit of grounding. Took me ages, and it’s been years.

I will have a play around with case, I knew there must be another way but whatever I tried just didn’t validate!

2 Likes

Best is always subjective :stuck_out_tongue:

If you understand it and can still understand it at a later date, then great!

.

I’d probably go for an array of shops, in lower case, something like:

var Merchant = Monzo.cardPurchase.MerchantName
var Amount = Monzo.cardPurchase.AmountInAccountCurrency
var GroceryMerchants = ['asda','sainsbury\'s','waitrose'];

// any matches will return 0 or higher, eg 'Waitrose' would return 2, ASDA 0, etc
if (GroceryMerchants.indexOf(Merchant.toLowerCase()) > -1) {
    Monzo.potWithdraw.setAmount(Amount);
}
4 Likes

Thank you, I’ll try that. Turns out my version is just paying out on all merchants so I’ll have another shot tomorrow with this code

Applet 1: FitBit trigger to append Google Sheet
Spreadsheet: Google sheet to convert steps to value. 1363 steps to 1.36
Applet 2: A Google Sheet updated cell trigger to move money in to/out of pot

I’ve tweaked the code as it wasn’t working right - I think the issue was with the code to withdraw from the pot, so I’ve turned it around and only put in code for skipping and used the standard fields in the actual applet to control the non-skipped transactions. I’ve used the ingredient {{AmountInAccountCurrency}} in the pot withdrawal field

So this is the code I finally ended up with - I’ve called them merchant1,2,3 below just for illustrative purposes as this can work for any type of merchant not just grocery purchase (my next one is to deal with flights and holiday bookings but only certain merchants as I don’t want the entire category because of work expenses):

var Merchant = Monzo.cardPurchase.MerchantName
var GroceryMerchants = ['merchant1','merchant2','merchant3'];

// any matches will return 0 or higher, eg first in list will be 0, next 1, etc
if (GroceryMerchants.indexOf(Merchant.toLowerCase()) < 0) {
Monzo.potWithdraw.skip("Not a grocery purchase")
}

This is what it looks like when it skips a transaction (I’ve tweaked the text now slight to say Not a #WeeklyShop Purchase)

2 Likes

Would love if anyone could do a similar thing but for categories

1 Like

It’s possible… there is this in the trigger data - Monzo.cardPurchase.Category

There is an applet already for all Transport card purchases: Redeem Transport spending from a pot - IFTTT

And this one for all Grocery card purchases: Redeem grocery purchases from a pot - IFTTT

And this one for all Eating Out card purchases: Redeem Eating Out spending from a pot - IFTTT

And this one for all Entertainment card purchases: Redeem entertainment spending from a pot - IFTTT

2 Likes

Can I ask where you found the relevant variable names for the Monzo.cardPurchase type bits?

Great work - I’ve seen a few uses of the Platform side of IFTTT, seems it can be made quite powerful. Especially if you use the Monzo API and Webhooks option.

1 Like