The "fix" (test_onformsubmit) code you gave, I have to manually run it every time there is new data in the spreadsheet. I was wanting it to automatically send the pdf to email when Form is submitted. Is there a way? Because the manual way runs the code exactly like its supposed to, but I want this as an automatic event so I don't have to do anything.
See parent thread of original problem/question
You can set your macro to run based on actions, calendar updates, time intervals, or a chosen time and date. On your computer, open a spreadsheet at sheets.google.com. Script editor. Current project's triggers.
Place the pointer on the start action, and then click or double-click the action. A list of triggers appear. 2. Select the Google Forms trigger and then and then create a new event.
Read Understanding Triggers. This function is an Installable Trigger, so you need to set it up to run when a form is submitted. It's easy - I would have thought a Forms tutorial would have walked through it.
In the Script Editor:
onFormSubmit()
, in this case.)From this point on, the function will be triggered whenever a form is submitted to the spreadsheet.
If you plan to share your script, each recipient will need to repeat these steps.
As an aside, you should change the email setting in your script, so it will work for ANYONE.
var email_address = Session.getActiveUser().getEmail();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With