I am creating a survey within the domain using the Google form.
Currently, the email address of the respondent is manually entered, but
We have received a request to make this automatic.
More specifically, it's a trigger when submitting a form. I would like to be able to refer to the Google script for the email address of the respondents.
Google Scripting
doesn't ask respondents to enter their e-mail addresses.
Is it possible to get it?
Is the email address of the respondent as a trigger when submitting the form correct for the user who is currently logged in?
I think it is possible to obtain it in the following way.
var usr=Session.getActiveUser();
var email=usr.getEmail();
https://developers.google.com/apps-script/reference/base/session
© 2024 OneMinuteCode. All rights reserved.