I want to see the e-mail address of the respondents in the domain from the goolge script on Google form.

Asked 2 years ago, Updated 2 years ago, 50 views

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?

google-apps-script

2022-09-30 19:15

1 Answers

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


2022-09-30 19:15

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.