检索Google表格答复者的电子邮件地址,而不要求表格中的电子邮件地址 [英] Retrieve the e-mail address of a Google Form respondent without asking for their e-mail address in the form

查看:135
本文介绍了检索Google表格答复者的电子邮件地址,而不要求表格中的电子邮件地址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

情景如下:


  1. 通过电子邮件将Google表单发送给回复者。

  2. 通过发送的电子邮件,被访者回答表单并发送回复。

通过Google Apps脚本,是否可以以此方式检索受访者的电子邮件地址?出于具体原因,我不允许查询受访者的电子邮件地址。以这种方式检索电子邮件地址也可作为验证,以便可以验证我发送表单的哪些电子邮件地址有回复。

I我知道如果你有一个包含用户电子邮件地址的字段,这是非常有用的。甚至还有一个教程。但是,我还没有看到上述用例的指南。



我尝试使用 Session.getActiveUser()。getEmail() 。但是,它似乎只是检索我自己的电子邮件地址(因为它认为我是查看电子表格的人员,是活跃用户)。 解析方案

只有在您使用Google Apps for Business,Google Apps for Education或Google Apps for Your Domain时,才能完成此操作,并且您的域中的用户可以填写表单。在这种情况下,您可以使用 getRespondentEmail() 检索提交者的电子邮件地址。

如果您的情况不符合上述要求,Google不会向您公开提交者的电子邮件地址,唯一的选择就是在表单中提示他们。

The scenario goes:

  1. Via email, a Google Form is sent to a respondent.
  2. Via this sent email, the respondent answers the form and sends their response. This form has no email address field.
  3. I need to retrieve the respondents e-mail address and add it to the spreadsheet where the Google Form responses are recorded.

Via Google Apps script, is it possible to retrieve the respondent's e-mail address in this manner? For specific reasons, I am not allowed to inquire the respondent's e-mail address. Retrieving the e-mail address in this manner also serves as verification so that it is verifiable which of the e-mail addresses I sent the form to have a response.

I am aware that if you have a field which contains the user's e-mail address, this is very do-able. There is even a tutorial specifically about it. However, I haven't seen a guide for the use case described above.

I have attempted using Session.getActiveUser().getEmail(). However, it seems that it only retrieves my own e-mail address (as it considers me, the person viewing the spreadsheet, as the active user).

解决方案

This can only be done if you are using Google Apps for Business, Google Apps for Education, or Google Apps for Your Domain, and are having users on your domain fill out the form. In that case, you can use getRespondentEmail() to retrieve the submitter's email address.

If your situation doesn't meet the requirement above, Google does not expose the submitter's email address to you and your only option is to prompt them for it on the form.

这篇关于检索Google表格答复者的电子邮件地址,而不要求表格中的电子邮件地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆