automatically email from google forms submit

40 views
Skip to first unread message

Talita Mitsue

unread,
Jun 11, 2024, 9:54:05 AMJun 11
to Google Apps Script Community
Hello everyone!

I am having a problem with my script and I was hoping someone here could help me. The problem is that I have this Google Form, and the ideia is that the user insert an email adress as the answer in one of the form's questions. Then when the user submit this form, an automatic email is sent to that one email adress that was inserted by the user in the form. 

I've tried using the "onFormSubmit(e)" trigger but it didn't work because it says the "e" is not defined. 

Does anybody know how to solve this, or another way to make the email be sent? 



Web Dev

unread,
Jun 12, 2024, 2:33:02 AMJun 12
to Google Apps Script Community
Hi Talita. It seems that you didn't setup a trigger, maybe. 1) Create a function something like `submitForm(e)` in your .gs.  2) Setup a trigger. Under "Choose which function... " select your named function `submitForm`. Under "Select event type" select "On form submit".

Don't test/debug manually to see your `e` object, also. Just submit your form as a user. Debug your function with `Logger.log('e: ' + JSON.stringify(e));`. This should work.
Reply all
Reply to author
Forward
0 new messages