Skip to main content
4 of 4
added 52 characters in body

It's very likely that you are running the onformsubmit function from the script editor which don't send an event object (e).

Note: The same happens with any function that use an object as parameter that use an object property, no matter of the property name.

In order to run onformsubmit or any other function that requires an object as parameter from the Google Apps Editor for debugging purposes, you have to create a an auxiliary function to mock the event object and assign the required properties. For a broader explanation see the answer from Mogsdad to How can I test a trigger function in GAS?

Related