I am a basketball coach and I am creating a dashboard to monitor my players' social networks. I use IFTTT.com to download my players βtweets in real time to a spreadsheet. I am trying to write a code that, if one of my players uses the wrong word, it will call me an email of this cell. I feel like I'm on the right track, but some recommendations on my code are greatly appreciated.
function onEdit(e) { var ss = SpreadsheetApp.getActiveSpreadsheet(); var sheet = ss.getActiveSheet() var cell = ss.getActiveCell().activate(); Logger.log( cell.getA1Notation() ); if (cell.getValue().match("ass")) { MailApp.sendEmail(" example@example.com ", "Notice of possible inappropriate tweet", cell;} }`
This is the code for one non-local word, obviously, since I'm just trying to get the basics of coding before adding 100 non-local words. The trouble is that if a sheet pulls three tweets at a time, it will only check the last one, so where my main problems lie right now.
Any advice or help here is greatly appreciated!
source share