Trigger email on true/false check box



  • I created a simple spreadsheet that takes form data and starts a timer on submittal (it is a service request). Once the request has been met, the respondent checks a "completed" check box and the timer is replaced with the time it took to respond and then timestamps the record. Here is my code:

    function onEdit(e){
    if(e.value != "TRUE") return;
    e.source.getActiveSheet().getRange(e.range.rowStart,e.range.columnStart+1).setValue(new Date());
    }

    Now I want to send a notice to the submitter that says "Your request has been completed" when the respondent checks the completed check box. The form submits the users name and since I don't want them to have to enter their email every time with google forms "collect emails" function, I want to LOOKUP the email using the submitter's name.

    I'd also like to return the text of the original request in the completion email.

    I'm a newbie with Google Scripts so any help I can get would be much appreciated!



  • Perhaps if I show a copy of my simple little worksheet, some kind soul could suggest the proper code to trigger an email to the original Requestor when the task has been completed. The Requestor is in column B and I would build a lookup table associating the requestor with their email address. The code - in my imagination) would use the lookup table to get the Requestor's email and send him/her the completion email.

    0_1583449808920_88db35fd-cf1d-4518-800d-36576e69aef7-image.png

    Thanks!

    Skip


Log in to reply
 

Looks like your connection to Codingislove Forum was lost, please wait while we try to reconnect.