title: How to detect the change when my google sheet is updated and send an Email
body: <p>I have been trying to send an email when my sheet gets new values, The sheet is getting values automatically, and email needs to be sent to a specific Email address, and it needs to be sent to every new entry, so google integrated "Notify on change is out of the question".</p>
  
  <p>Here is my scenario:</p>
  
  <ol>
  <li>my source sheet: "Leads"// name of the sheet</li>
  <li>my target sheet: "Closer"//name of  the sheet</li>
  </ol>
  
  <p>when a new row is inserted into the <strong>Leads sheet</strong> Its values automatically get inserted into the <strong>Closer</strong> sheet in the end. So for each new values inserted in the <strong>Leads</strong>, <strong>Closer</strong> gets a new row.</p>
  
  <p>I have designed a script of my own for that but it sends me too many emails, what I want my script to do is when a new row is inserted send the email, whether that is to self or any email, I know how to send email I am just getting a lot of problems, with getting the change functionality in my script.</p>
  
  <p>Here is what I have done so far:</p>
  
  <pre><code>function sendNotification() {
    var ss = SpreadsheetApp.getActiveSpreadsheet();
    var sheet = ss.getSheetByName("Leads");
    var mycell = sheet.getRange("A:A");
    var cellcol = mycell.getColumn();
    var cellrow = mycell.getRow();
    var recipients = "someone@gmail.com";
    var subject = "Notification for sheet updation "+ss.getName();
    var body = ss.getName() + "has been updated.  Visit " + ss.getUrl() + " to view the changes.";
  if (mycell == 1)
    {
    MailApp.sendEmail(recipients, subject, body);
    }}
  </code></pre>
  
  <p>This function works, but it sends 5,6 emails for each row submitted, I have tried many things but I cannot figure out what is the problem with this code.<strong>I just want my code to send one email for each row inserted</strong>, I would really appreciate some help with this script, Thank you.</p>