google-apps-script

using google docs api from within google apps script

[亡魂溺海] 提交于 2020-03-24 00:10:55
问题 I'm trying to use the following code from the google docs API from within google apps script for testing purposes: var f = UrlFetchApp.fetch("https://docs.googleapis.com/v1/documents/1ys6KIY1XOhPHrgQBJ4XxR1WDl0etZdmR9R48h2sP2cc:batchUpdate", { method:"post", body: JSON.stringify({ "requests": [ { "deleteContentRange": { "range": { "startIndex": 1, "endIndex": 80 } } } ] }), headers: { Authorization:"Bearer " + ScriptApp.getOAuthToken(), "Content-Type": "application/json" } }) Logger.log(f)

using google docs api from within google apps script

别等时光非礼了梦想. 提交于 2020-03-24 00:10:02
问题 I'm trying to use the following code from the google docs API from within google apps script for testing purposes: var f = UrlFetchApp.fetch("https://docs.googleapis.com/v1/documents/1ys6KIY1XOhPHrgQBJ4XxR1WDl0etZdmR9R48h2sP2cc:batchUpdate", { method:"post", body: JSON.stringify({ "requests": [ { "deleteContentRange": { "range": { "startIndex": 1, "endIndex": 80 } } } ] }), headers: { Authorization:"Bearer " + ScriptApp.getOAuthToken(), "Content-Type": "application/json" } }) Logger.log(f)

using google docs api from within google apps script

♀尐吖头ヾ 提交于 2020-03-24 00:08:52
问题 I'm trying to use the following code from the google docs API from within google apps script for testing purposes: var f = UrlFetchApp.fetch("https://docs.googleapis.com/v1/documents/1ys6KIY1XOhPHrgQBJ4XxR1WDl0etZdmR9R48h2sP2cc:batchUpdate", { method:"post", body: JSON.stringify({ "requests": [ { "deleteContentRange": { "range": { "startIndex": 1, "endIndex": 80 } } } ] }), headers: { Authorization:"Bearer " + ScriptApp.getOAuthToken(), "Content-Type": "application/json" } }) Logger.log(f)

Email quota for app scripts G suite users

ε祈祈猫儿з 提交于 2020-03-24 00:07:18
问题 This is my simple app script I am using in google forms: function onFormSubmit(event) { var x = MailApp.getRemainingDailyQuota(); } I just signed up for a free trial for G suite. On this link it is mentioned that G Suite users get 1500 emails per day. https://developers.google.com/apps-script/guides/services/quotas But when I run the above script in debug mode and check the value of x get it as 100(Which is the limit for normal account) Is it that trial users have this limit? Or is it

if string.match() doesn't match, why is execution of google apps script cancelled?

二次信任 提交于 2020-03-23 12:04:57
问题 if I use the following function within Google Sheets it doesn't return the value "not found". The logs tell me: "Execution cancelled". This happens at the line: var found = text.match(re); If I change searchText to "abc" it works like a charme. function example() { var text = "abc cba"; var searchText = "abcd"; var re = new RegExp(searchText,"g"); var found = text.match(re); if (found === undefined) { return "not found"; } else { return found; } } Why is the script execution cancelled and how

How to unpivot a table using Google Apps Script?

一个人想着一个人 提交于 2020-03-23 12:04:07
问题 I have a table in a spreadsheet which I want to unpivot using google apps script: each one of the month rows of the original table have to become multiple rows in the new table. The problem is the code doesn't produce the expected result. Insted of creating arrays that ends like this (each line of the table ends with one different month): [[...,'April'],[...,'September'],[...,'December']] It's producing this (each line ends with the last month value of that line in the original table): [[...,

if string.match() doesn't match, why is execution of google apps script cancelled?

那年仲夏 提交于 2020-03-23 12:03:52
问题 if I use the following function within Google Sheets it doesn't return the value "not found". The logs tell me: "Execution cancelled". This happens at the line: var found = text.match(re); If I change searchText to "abc" it works like a charme. function example() { var text = "abc cba"; var searchText = "abcd"; var re = new RegExp(searchText,"g"); var found = text.match(re); if (found === undefined) { return "not found"; } else { return found; } } Why is the script execution cancelled and how

if string.match() doesn't match, why is execution of google apps script cancelled?

孤人 提交于 2020-03-23 12:03:05
问题 if I use the following function within Google Sheets it doesn't return the value "not found". The logs tell me: "Execution cancelled". This happens at the line: var found = text.match(re); If I change searchText to "abc" it works like a charme. function example() { var text = "abc cba"; var searchText = "abcd"; var re = new RegExp(searchText,"g"); var found = text.match(re); if (found === undefined) { return "not found"; } else { return found; } } Why is the script execution cancelled and how

How to unpivot a table using Google Apps Script?

旧巷老猫 提交于 2020-03-23 12:03:04
问题 I have a table in a spreadsheet which I want to unpivot using google apps script: each one of the month rows of the original table have to become multiple rows in the new table. The problem is the code doesn't produce the expected result. Insted of creating arrays that ends like this (each line of the table ends with one different month): [[...,'April'],[...,'September'],[...,'December']] It's producing this (each line ends with the last month value of that line in the original table): [[...,

Run a Gmail Google Apps Script daily at 8:00, 12:30, 17:00

ぐ巨炮叔叔 提交于 2020-03-23 08:57:27
问题 I need to run a Google Apps script three times a day: at 8:00, 12:30, 17:00. How to do this? I have already looked at Triggers , and more specifically Time driven : Hour timer, but Every hour , Every 2 hours , Every 4 hours are not adapted here Day timer, but then 8am to 9am is not very precise, I would prefer something more precise, and also 12:30 is not possible Specific time, but then YYYY-MM-DD HH:MM is not adapted to run it daily From calendar triggers does not seem adapted either. 回答1: