如何添加“编辑回复”链接到Google表单电子邮件? [英] How to add "Edit Response" link to Google Forms emails?

查看:180
本文介绍了如何添加“编辑回复”链接到Google表单电子邮件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个简单的Google表单收集数据,并使用AppScript向填写了用户的用户发送确认电子邮件。用户提交表格后,确认后,他/她将看到一个链接来编辑他/她的回复。



我想将该链接作为确认电子邮件的一部分(现在,它只显示在网页上)。我如何获取URL编辑提交的回复?



我可以通过 SpreadsheetApp.getActiveSpreadsheet()。getFormUrl()。它给了我以下格式: https://docs.google.com/a/domain.com/spreadsheet/viewform?formkey=<formKey>



然而,该链接不包含用户编辑他/她的回复所需的编辑键。预期的网址应如下所示: https://docs.google.com/a/domain.com/spreadsheet/viewform?formkey=<formKey>&edit=<editKey>



感谢您的帮助!

-K



已编辑:

在此添加了一项功能请求: http://code.google.com/p/google-apps-script-issues/issues/detail?id = 1345& thanks = 1345& ts = 1337773007

解决方案

@Henrique直到最近,Abreu才是真实的。 Google似乎已经添加了 getEditResponseUrl() code> 添加到 FormResponse 课程中,并随之变为可以使用这样的代码来获得一堆现有表单的编辑URL:

  function responseURL(){
//通过ID打开表单并记录每个问题的答案。
var form = FormApp.openById('1gJw1MbMKmOYE40Og1ek0cRgtdofguIrAB8KhmB0BYXY'); //这是您的活动表单的网址中的ID
var formResponses = form.getResponses();
for(var i = 0; i< formResponses.length; i ++){
var formResponse = formResponses [i];
Logger.log(formResponse.getEditResponseUrl());




$ b $ p
$ b

为了让用户在回复时自动发送电子邮件可以在表单提交上添加一个触发器。由于我正在处理的情况并不需要人员使用应用程序帐户登录,因此我无法自动访问电子邮件地址,因此我有一个可捕获用户电子邮件地址的文本问题。



它提出了关于是否编辑表单的问题。我一直在努力处理编辑现有响应或使用 toPrefilledUrl() ,这样我就可以看到情况随着时间的推移如何变化。我想这归结于追踪这个值会给你带来的价值。


I have a simple Google Form that collects data, and, using AppScript, sends confirmation emails to users who fill it out. After user submits the form, on confirmation, s/he will see a link to edit his/her response.

I'd like to include that link as a part of the confirmation email (Right now, it only shows up on the page.) How can I obtain the URL to edit a submitted response?

I am able to get the link to the Form through SpreadsheetApp.getActiveSpreadsheet().getFormUrl(). It gives me the following format: https://docs.google.com/a/domain.com/spreadsheet/viewform?formkey=<formKey>

The link however doesn't include the edit key, which is required for users to edit his/her response. The expected URL should look like this: https://docs.google.com/a/domain.com/spreadsheet/viewform?formkey=<formKey>&edit=<editKey>

Thanks for the help in advance!

-K

Edited:

Added a feature request on this: http://code.google.com/p/google-apps-script-issues/issues/detail?id=1345&thanks=1345&ts=1337773007

解决方案

The answer that this wasn't possible by @Henrique Abreu was true until very recently. Google seems to have added getEditResponseUrl() to the FormResponse class and with that it becomes possible to use code like this to get the edit URL for a bunch of existing forms:

function responseURL() {
 // Open a form by ID and log the responses to each question.
 var form = FormApp.openById('1gJw1MbMKmOYE40Og1ek0cRgtdofguIrAB8KhmB0BYXY'); //this is the ID in the url of your live form
 var formResponses = form.getResponses();
 for (var i = 0; i < formResponses.length; i++) {
   var formResponse = formResponses[i];
   Logger.log(formResponse.getEditResponseUrl());
 }
}

To make it automatically email the user as they respond one could add a trigger on form submit. As The situation I'm working with doesn't require people to log in with an apps account I don't have access to an email address automatically so I have a text question that captures the user's email address.

It does ask the question about whether or not editing the forms is what you want. I've been grappling with the relative advantages of editing an existing response or sending a prefilled form using toPrefilledUrl() so that I can see how things have changed over time. I guess this comes down to the value that tracking this will provide you.

这篇关于如何添加“编辑回复”链接到Google表单电子邮件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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