title: use onedit() trigger on a specific sheet within google scripts for google sheets
body: <p>I need to run a script triggered by an onedit() to only one sheet of many.</p>
  
  <p>I have tried the following, but currently I can't get the script to work on just the desired sheet ("Inventory") Im sure this will be very simple for someone that knows:</p>
  
  <pre><code>function onEdit(e) {
      var range = e.range;
      if(range.getSheetName() == "Inventory") {
          if(range.getValue() == "notify") {
              range.setBackgroundColor('red');
              var productname = range.offset(0,-3).getValue();
              var productinventory = range.offset(0,-2).getValue();
              var message = "Product variant " + productname + " has dropped to " + productinventory;
              var subject = "Low Stock Notification";
              var emailAddress = "email@email.com";
              MailApp.sendEmail(emailAddress, subject, message);
              range.offset(0,1).setValue("notified");
          }
      }
  }
  </code></pre>
  
  <p>Thanks!</p>