我需要像访问 Logger 日志一样访问 Execution Transcripts。例如,我可以Logger.log使用getLogs(). 如何以类似的方式访问执行脚本?
似乎存在通过Apps Script API使用配额无法确定的Apps Script项目创建,并且已经达到目的(即IAM&管理控制台表明所有API的使用均远低于其限制)。
资源限制在这里也未指定:https://developers.google.com/apps-script/guides/services/quotas。
实施https://developers.google.com/apps-script/api/reference/rest/v1/projects/getContent和https://developers.google.com/apps-script/api/reference/rest/ v1 / projects / create。当时,大约有100个电话(在测试中完成)。从其他运行来看,该错误似乎是由于未指定使用期限限制(24小时?)引起的。
希望增加配额,但是如果没有在IAM&管理控制台中明确列出配额,则很难确定该怎么做。
问题:如上所述,施加的限制是什么?如何以其他方式标识该限制,然后如何增加该限制(如果可能)?
我正在尝试使用电子表格脚本编辑器中的Google Apps脚本粘贴Pastebin.com 。谁能告诉我我在做什么错?
function postPastebinPost() {
var options, url, apiKey, payload, response;
apiKey = <api key goes here>;
payload = 'Hello World';
options = {
'method' : 'post',
'payload' : payload
};
url = 'https://pastebin.com/api/api_post.php'
+ '?api_dev_key=' + apiKey
+ '&api_option=paste'
+ '&api_paste_code=' + encodeURIComponent(payload);
response = UrlFetchApp.fetch(url, options);
Logger.log(response);
}
Run Code Online (Sandbox Code Playgroud)
我运行此命令,日志显示为Bad API request, invalid api_option。我正在寻找解决方案,但没有找到任何解决方案。
说明文件:
•Google Apps脚本的UrlFetchApp类
pastebin google-sheets google-apps-script google-apps-script-api
我的任务是使用 Google REST API 更新链接到某些电子表格的 Apps 脚本。如果我有脚本 ID,我知道如何更新脚本,但问题是我只有电子表格 ID,并且我需要更新链接/绑定脚本。
我在 Apps Script REST API 中没有找到任何允许列出链接到电子表格的脚本的方法https://developers.google.com/apps-script/api/reference/rest/
我还尝试了 Google Drive REST API https://developers.google.com/drive/api/v2/reference/children/list和https://developers.google.com/drive/api/v2/reference/files/list没有运气。
我想从外部 Node.js 应用程序执行 Google Apps 脚本。
我尝试了以下手册,Step3。 https://developers.google.com/apps-script/api/how-tos/execute#step_3_configure_the_calling_application
根据1-c“选择应用程序类型时选择其他”,但我的选择选项卡中没有“其他”选择。喜欢这张图片->
请让我知道如何选择“其他”应用程序类型。
node.js google-apps-script oauth-2.0 google-oauth google-apps-script-api
我正在尝试编写一个独立的 Google Apps 脚本,该脚本使用Google Apps 脚本 API来更新许多 Google 表格的绑定脚本内容。
我有大约 200 个根据模板创建的 Google 表格的工作表 ID。我想更新每张纸上绑定脚本的项目内容,使其与一组主脚本相同。
在使用 urlFetchApp 获取一张纸的绑定脚本的内容作为测试时,我遇到了身份验证错误。错误看起来像:
Request failed for
https://script.googleapis.com/v1/projects/<SCRIPTID>/content returned code 401.
Truncated server response: { "error": { "code": 401,
"message": "Request is missing required authentication credential.
Expected OAuth 2 access token, login cookie ...
(use muteHttpExceptions option to examine full response) (line 34, file "AddScriptsToSheets")
Run Code Online (Sandbox Code Playgroud)
我正在使用的测试函数如下所示:
function getSheetScriptContent(sheetId) {
var sheet = SpreadsheetApp.openById(sheetId);
// Make a POST request with a JSON payload.
// Make …Run Code Online (Sandbox Code Playgroud)