简体   繁体   中英

Script triggers for a google spreadsheet

This a question about using script triggers for a google spreadsheet which is populated through a custom form. The workflow is the following: - Data collected through custom google form with upload button - works fine - Data goes to a one sheet spreadsheet for sorting and formatting - works fine - A script converting a range from spreadsheet to csv file bound to spreadsheet - works fine - A trigger onEdit added (resources=>current project's triggers) to csv converting script - and here is a problem.

The problem is that this trigger works fine if you make any edits manually in the spreadsheet. But it stays idle if a new data from web form arrives, it doesn't start csv conversion function. So a trigger doesn't consider new inputs from form as edits. I tried other triggers - onChange and onFormSubmision but no luck as well.

However if I use standard google form but not a custom one for the same workflow a trigger onFormSubmission works perfect. The problem with that is that there's no upload function in standard google form and that's why I build my custom one.

I tried Formpl.us service which can add upload button but then I have the same result as with my own form. New submissions are ignored by the triggers.

So the questions is how to make triggers act when a new data from custom web form arrives to a spreadsheet.

Thanks a lot for any tips.

I would suggest adding a "Status" column and enter something in that column for every line that your trigger has processed. Then set a time-based trigger to look for any empty status columns and then process just that line.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM