1
votes

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.

1
You have used conflicting terms, please clarify. "custom google form" vs "custom web form". If you're using Google Forms (the service), a form submission trigger will work if set up properly. If you're using a form you've created yourself, then you must be updating the spreadsheet somehow - please describe that. These details are relevant to understanding your problem. CODE would be the best way to help us help you.Mogsdad
ok, custom web form is a web form built by me using google scripts. It's not a native standard Google form. This custom form sends data to the dedicated spreadsheet and it updates immediately when new data arrives. You can see new data seconds after you click submit in the custom web (google script based) form.Kirill
Great - that helps. Use an onChange trigger - it will get an event when the sheet is updated. Then use Bjorn's suggestion to record which rows have been handled.Mogsdad

1 Answers

0
votes

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.