我有一个附加到 Google 表单的脚本,该脚本在提交时向 Discord 频道发送通知。我想包含指向个人回复的直接链接(链接看起来像https://docs.google.com/forms/d/<myformid>/edit#response=<responseid>
)。我怎样才能检索该链接?我得到了部分链接/edit
with Form.getEditUrl()
但我无法获得正确的id。我检查了FormResponse.getId()
但这并不能让我得到任何回应。
Here's how to get to that link manually via edit form:
由于您知道响应 ID,因此可以使用 geEditResponseUrl 方法获取表单响应的直接链接。请注意,知道此 URL 的任何人都可以编辑响应。
function getEditUrl(responseId) {
var form = FormApp.getActiveForm();
var response = form.getResponse(responseId);
return response.getEditResponseUrl()
}
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)