The user filling out the Form needs to be logged into their Google account to get their email. And there's a setting in the Form
that you need to turn ON. Go into the Form settings - In the "Defaults" section you will see:
Collect email addresses by default.
In your function that gets triggered by the Form submission you need to have a variable name for the event object. People often use the letter "e" for the event object.
From the event object you can get the ID number of the response that the current run instance is handling.
function my_Form_Submit_Fnk(e) {
var the_Response_ID = e.response.getId();
var the_Form = FormApp.getActiveForm();
var the_Response = the_Form.getResponse(
the_Response_ID );//Get the response that was just submitted
var theCollected_Email =
the_Response_ID.getRespondentEmail();
theCollected_Email =
theCollected_Email ?
theCollected_Email : false;