IFTTT - move money into a pot when spending on another card

Hello,

I’m trying to write an applet so when I spend money on my American Express card it moves money from my monzo current account into a pot. I can’t seem to work out how to do this

Currently have it to detect a notification from Google Pay with the words “Amex”,
Filter code is
var notificationMessage = AndroidDevice.newNotificationFromApp.NotificationMessage;
var regexPattern = “[0-9]+.[0-9]{2}”;
var amountSpent = notificationMessage.match(regexPattern);
var amountSpentString = amountSpent.toString();

Monzo.potDeposit.setAmount(amountSpentString);

And then the action is to Move money into a pot, but the only ingredients are Notification Title, Notification Message, AppName and Recieved At

Any help is much appreciated!

Thanks

Don’t use Amex so can’t help in detail but I’m guessing that the notificationMessage contains the amount and some regex like £[0-9.]+ will give you the amount. You will then need to remove the “£” and “.” as the pot deposit expects the value in pence.

Maybe it’s more of an IFTTT help issue, the javascript posted seems to catch it when I try elsewhere. Not sure if other people here have tried similar things which is why I posted!

Thanks