【发布时间】:2020-05-13 06:31:02
【问题描述】:
如何在每次提交表单时获取外部 URL?
我需要归档使用 Google 表单提交的网址。
我为与我的表单关联的 Google 电子表格创建了一个应用脚本:
function onSubmit(e) {
var url="https://web.archive.org/save/http://www.google.com"
var response = UrlFetchApp.fetch(url, headers);
}
我还编辑了清单以包含允许使用UrlFetchApp.fetch:
{
"timeZone": "Europe/(redacted)",
"dependencies": {
},
"exceptionLogging": "STACKDRIVER",
"oauthScopes": [
"https://www.googleapis.com/auth/script.external_request"]
}
但是我不断收到以下错误消息:
您无权调用 UrlFetchApp.fetch。 所需权限:https://www.googleapis.com/auth/script.external_request
【问题讨论】:
-
重新授权/重新创建触发器...声明所需的权限与同意他们不同
标签: google-apps-script google-sheets-api google-forms