On Edit trigger won't work. Does the sheet have to be linked to a form?

116 views
Skip to first unread message

Richard

unread,
Apr 28, 2017, 6:29:07 PM4/28/17
to FormEmailer
Hi, 

I'm trying to create an automated email filled out by employees. However, the data that I need to send the email isn't all directly from the form. So I created a second sheet that references data from the form-generated sheet (using IMPORTRANGE) and manipulates some of the date to create th e fields I need in the email. 

Does the sheet have to be linked to a form for the OnEdit trigger to work? I can only get it to automate by setting a time trigger, but that sends 1,000 plus blank emails, which is clearly not what I want to do.

Thanks!

Henrique Abreu

unread,
May 2, 2017, 9:19:40 AM5/2/17
to FormEmailer on behalf of Richard
Hi,

No, the sheet does not have to be linked to a form. The script just loops through the data to send.

I guess I'd better explaining how the script works and you try to make it work for you.
When you trigger the script, via the timeDriven function, it may be manually, via menu or any "installable trigger" (due to permissions issue), it gets the configured sheet (on FormEmailer settings) and loop through all rows up to the last one that has data (totally blank rows in the end are ignored, but if, for example, the last row has a value or formula in any column, then basically really *all* rows will be processed). 
When processing each row, the script looks for the first column ("FormEmailer Status" column) and check if it's blank, if it is then it attempts to process it, saving a status in this cell after processing, so it's not reprocessed on a next run.

To be more clear about permissions, it should work normally with a installable on-edit trigger, but not the simple one:

Regards,


Henrique G. Abreu

--
You received this message because you are subscribed to the Google Groups "FormEmailer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to formemailer+unsubscribe@googlegroups.com.
To post to this group, send email to forme...@googlegroups.com.
Visit this group at https://groups.google.com/group/formemailer.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages