Sharing my use-case and solution here. What brought me to Tiller was a need to send myself an alert (text message, email, etc.) if/when a transaction appears on any account which matches a search string.
Use Case
I cancel Peacok TV service, but they keep charging me. I can either:
A) Set a reminder to keep searching for “peacock” in my spreadsheet.
B) Automate that search and send myself a text message if “peacock” ever appears.
I like B.
Solution
Step 1
Create an Autocat rule so that “peacock” (or anything else you want to alert on) gets auto-categorized into the “Alert” Category.
Step 2
Add an Apps Script with the following code:
function CheckTransactions() {
// Fetch the Transaction categories
var TransactionsRange = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Transactions").getRange("D:D");
var Transactions = TransactionsRange.getValues();
// Check if Alert category exists for any transaction (Use AutoCat rule to set an alert)
for(var i in Transactions){
if(Transactions[i][0].match("Alert")!=null){ //Column contains a transaction categorized as "Alert"...send email.
var emailAddress = 'your_email@whatever.com'
// Send Alert Email.
var message = 'A transaction got categorized as Alert' ; // Email body
var subject = 'Credit Card Transaction Alert!';
MailApp.sendEmail(emailAddress, subject, message);
}
}
}
Then, enable this to automatically run each day/hour/minute (your preference) by going to “Triggers” ==> “Add Trigger”, and select CheckTransactions
in “Function to Run”.
If email is enough for you, you’re done.
Step 3 (Optional)
Forward this email to your phones text msg emal address. For me (gmail user) I simply add the following filter:
Matches: from:(your_email@whatever.com) transaction got categorized as Alert
Do this: Forward to my_phone_number@msg.fi.google.com
Note: I’m a Google Fi customer, so for me it’s phone # @ msg.fi.google.com
(look up what it is for you, based on your carrier).