title: TypeError: Cannot read property "values" from undefined. (line 9, file "Code")
body: <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function onInstall(e) {
  
    var ss = SpreadsheetApp.getActiveSpreadsheet();
    var sheet = ss.getSheetByName('Form');
  
  
    var Timestamp = e.values[0];
    var Load = e.values[1];
    var Email = e.values[2];
    var Location = e.values[3];
  
    var template = HtmlService.createHtmlOutputFromFile("notification");
    template.Location = Location;
  
    MailApp.sendEmail(Email, "subject", "", {
      HtmlBody: template.evaluate().getContent()
    });
  
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>I have written this small program. Everytime user edit spreadsheet. It should run trigger and shoot an email to mentioned email address in column. I am not good in coding. But Please help me solving this, I have been trying from so long.</p>
  
  <p>Here is link to public spreadsheet <a href="https://docs.google.com/spreadsheets/d/1GlswC-EVEEfIMIKb5altb7Kuh3qgesW_zF2E6CxR7Fo/edit#gid=1588184844" rel="nofollow">Spreadsheet</a></p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function() {
    var ss = SpreadsheetApp.getActiveSpreadsheet();
    var sheet = ss.getSheetName('Form');
  }
  
  function onEdit(e) {
    var Timestamp = e.values[0];
    var Load = e.values[1];
    var Email = e.values[2];
    var Location = e.values[3];
  
    MailApp.sendEmail(Email, "check In Call", "location");
  
  }</code></pre>
  </div>
  </div>
  </p>