Google-sheets – How to create a notification rule if new row contains text

google sheets

In Google Sheets, I would like to create an email notification rule whenever a new row contains a specific text, e.g. ".de".

However, as far as I can see, it is not possible to achieve this using the notification rules interface:

enter image description here

Best Answer

I would do this with a google apps script tied to the onEdit trigger:

function onEdit(e) {
  var myWord = '.de';
  var myEmail = 'me@example.com';
  var cellData = e.range.getValue();
  if (cellData.indexOf(myWord)>-1){
    MailApp.sendEmail(myEmail, 'subject string', 'body string');
    }
  }