is this possible to use Sheets API post URLs with UrlFetchApp?
I'm trying to append datas to a spreadsheet.
I use UrlFetchApp to GET values but is it possible to POST values for example to append rows to a spreadsheet?
Here is my code so far
var token = ScriptApp.getOAuthToken();
var options = {
"headers": {
'Authorization': 'Bearer ' + token
},
"method": "POST",
"Content-type" : "application/json",
"payload": JSON.stringify(values) //stringify a 2D array of data
}
var resp = UrlFetchApp.fetch("https://sheets.googleapis.com/v4/spreadsheets/spreadsheetId/values/RangeName:append?insertDataOption=INSERT_ROWS", options);
javascript post google-apps-script google-sheets-api
add a comment |
I'm trying to append datas to a spreadsheet.
I use UrlFetchApp to GET values but is it possible to POST values for example to append rows to a spreadsheet?
Here is my code so far
var token = ScriptApp.getOAuthToken();
var options = {
"headers": {
'Authorization': 'Bearer ' + token
},
"method": "POST",
"Content-type" : "application/json",
"payload": JSON.stringify(values) //stringify a 2D array of data
}
var resp = UrlFetchApp.fetch("https://sheets.googleapis.com/v4/spreadsheets/spreadsheetId/values/RangeName:append?insertDataOption=INSERT_ROWS", options);
javascript post google-apps-script google-sheets-api
Any reason you are not using the advanced Sheets service?
– TheMaster
Nov 27 '18 at 22:06
1
@TheMasterUrlFetchAppis faster
– JSmith
Nov 27 '18 at 23:21
1
Although I'm not sure whether this is useful information, in my environment, I have obtained that the process costs of reading and writing using UrlFetchApp make the costs of Advanced Google Services reduce by about 6 % and 4 %, respectively. You can see the experimental data at here. gist.github.com/tanaikech/…
– Tanaike
Nov 27 '18 at 23:31
1
Jsmith, I see. Still it's just 5% cost reduction right? @Tanaike Thank you for the information. It's really useful.
– TheMaster
Nov 27 '18 at 23:47
1
@TheMaster Yes. In my environment, I obtained such result. As another advantage, I think that in the case that I create a library using Sheets API, when it uses Sheets API with UrlFetchApp instead of Advanced Google Services, users can use the library by enabling Sheets API at only API console. By this, the usability becomes a bit high.
– Tanaike
Nov 27 '18 at 23:59
add a comment |
I'm trying to append datas to a spreadsheet.
I use UrlFetchApp to GET values but is it possible to POST values for example to append rows to a spreadsheet?
Here is my code so far
var token = ScriptApp.getOAuthToken();
var options = {
"headers": {
'Authorization': 'Bearer ' + token
},
"method": "POST",
"Content-type" : "application/json",
"payload": JSON.stringify(values) //stringify a 2D array of data
}
var resp = UrlFetchApp.fetch("https://sheets.googleapis.com/v4/spreadsheets/spreadsheetId/values/RangeName:append?insertDataOption=INSERT_ROWS", options);
javascript post google-apps-script google-sheets-api
I'm trying to append datas to a spreadsheet.
I use UrlFetchApp to GET values but is it possible to POST values for example to append rows to a spreadsheet?
Here is my code so far
var token = ScriptApp.getOAuthToken();
var options = {
"headers": {
'Authorization': 'Bearer ' + token
},
"method": "POST",
"Content-type" : "application/json",
"payload": JSON.stringify(values) //stringify a 2D array of data
}
var resp = UrlFetchApp.fetch("https://sheets.googleapis.com/v4/spreadsheets/spreadsheetId/values/RangeName:append?insertDataOption=INSERT_ROWS", options);
javascript post google-apps-script google-sheets-api
javascript post google-apps-script google-sheets-api
asked Nov 27 '18 at 20:45
JSmithJSmith
1,49311225
1,49311225
Any reason you are not using the advanced Sheets service?
– TheMaster
Nov 27 '18 at 22:06
1
@TheMasterUrlFetchAppis faster
– JSmith
Nov 27 '18 at 23:21
1
Although I'm not sure whether this is useful information, in my environment, I have obtained that the process costs of reading and writing using UrlFetchApp make the costs of Advanced Google Services reduce by about 6 % and 4 %, respectively. You can see the experimental data at here. gist.github.com/tanaikech/…
– Tanaike
Nov 27 '18 at 23:31
1
Jsmith, I see. Still it's just 5% cost reduction right? @Tanaike Thank you for the information. It's really useful.
– TheMaster
Nov 27 '18 at 23:47
1
@TheMaster Yes. In my environment, I obtained such result. As another advantage, I think that in the case that I create a library using Sheets API, when it uses Sheets API with UrlFetchApp instead of Advanced Google Services, users can use the library by enabling Sheets API at only API console. By this, the usability becomes a bit high.
– Tanaike
Nov 27 '18 at 23:59
add a comment |
Any reason you are not using the advanced Sheets service?
– TheMaster
Nov 27 '18 at 22:06
1
@TheMasterUrlFetchAppis faster
– JSmith
Nov 27 '18 at 23:21
1
Although I'm not sure whether this is useful information, in my environment, I have obtained that the process costs of reading and writing using UrlFetchApp make the costs of Advanced Google Services reduce by about 6 % and 4 %, respectively. You can see the experimental data at here. gist.github.com/tanaikech/…
– Tanaike
Nov 27 '18 at 23:31
1
Jsmith, I see. Still it's just 5% cost reduction right? @Tanaike Thank you for the information. It's really useful.
– TheMaster
Nov 27 '18 at 23:47
1
@TheMaster Yes. In my environment, I obtained such result. As another advantage, I think that in the case that I create a library using Sheets API, when it uses Sheets API with UrlFetchApp instead of Advanced Google Services, users can use the library by enabling Sheets API at only API console. By this, the usability becomes a bit high.
– Tanaike
Nov 27 '18 at 23:59
Any reason you are not using the advanced Sheets service?
– TheMaster
Nov 27 '18 at 22:06
Any reason you are not using the advanced Sheets service?
– TheMaster
Nov 27 '18 at 22:06
1
1
@TheMaster
UrlFetchApp is faster– JSmith
Nov 27 '18 at 23:21
@TheMaster
UrlFetchApp is faster– JSmith
Nov 27 '18 at 23:21
1
1
Although I'm not sure whether this is useful information, in my environment, I have obtained that the process costs of reading and writing using UrlFetchApp make the costs of Advanced Google Services reduce by about 6 % and 4 %, respectively. You can see the experimental data at here. gist.github.com/tanaikech/…
– Tanaike
Nov 27 '18 at 23:31
Although I'm not sure whether this is useful information, in my environment, I have obtained that the process costs of reading and writing using UrlFetchApp make the costs of Advanced Google Services reduce by about 6 % and 4 %, respectively. You can see the experimental data at here. gist.github.com/tanaikech/…
– Tanaike
Nov 27 '18 at 23:31
1
1
Jsmith, I see. Still it's just 5% cost reduction right? @Tanaike Thank you for the information. It's really useful.
– TheMaster
Nov 27 '18 at 23:47
Jsmith, I see. Still it's just 5% cost reduction right? @Tanaike Thank you for the information. It's really useful.
– TheMaster
Nov 27 '18 at 23:47
1
1
@TheMaster Yes. In my environment, I obtained such result. As another advantage, I think that in the case that I create a library using Sheets API, when it uses Sheets API with UrlFetchApp instead of Advanced Google Services, users can use the library by enabling Sheets API at only API console. By this, the usability becomes a bit high.
– Tanaike
Nov 27 '18 at 23:59
@TheMaster Yes. In my environment, I obtained such result. As another advantage, I think that in the case that I create a library using Sheets API, when it uses Sheets API with UrlFetchApp instead of Advanced Google Services, users can use the library by enabling Sheets API at only API console. By this, the usability becomes a bit high.
– Tanaike
Nov 27 '18 at 23:59
add a comment |
1 Answer
1
active
oldest
votes
It is possible to use Sheets API post URLs with UrlFetchApp. So how about this modification?
Modification points:
- Please use
valueInputOptionto the query parameter.
- In your endpoint, I think that an error of
valueInputOption' is required but not specifiedoccurs.
- In your endpoint, I think that an error of
- When you want to use
Content-type, please add it to the headers.
- If you want to use the content type outside of the headers, please use
contentType: "application/json".
- If you want to use the content type outside of the headers, please use
Modified script:
// sample values
var values = {"values":[["a1","b1","c1"],["a2","b2","c2"]]};
var spreadsheetId = "### spreadsheetId ###";
var RangeName = "### RangeName ###";
var token = ScriptApp.getOAuthToken();
var options = {
"headers": {
'Authorization': 'Bearer ' + token,
"Content-type": "application/json", // Modified
},
"method": "POST",
"payload": JSON.stringify(values) //stringify a 2D array of data
}
var url = "https://sheets.googleapis.com/v4/spreadsheets/" + spreadsheetId + "/values/" + RangeName + ":append?insertDataOption=INSERT_ROWS&valueInputOption=USER_ENTERED"; // Modified
var resp = UrlFetchApp.fetch(url, options);
Note:
- Before you run this script, please confirm whether Sheets API is enabled at API console.
References:
- spreadsheets.values.append
- UrlFetchApp.fetch()
If this was not what you want, please tell me. I would like to modify it.
Thank you again @Tanaike for the moment I only upvote but I will try and mark it as answer if that works. Thanks again.
– JSmith
Nov 27 '18 at 23:23
@JSmith Thank you for replying. If this didn't work, please tell me. I would like to modify it.
– Tanaike
Nov 27 '18 at 23:32
Thank you so much it worked one thing you can add though is that I had to modify the manifest file with this ` "oauthScopes": [ "googleapis.com/auth/spreadsheets", "googleapis.com/auth/script.external_request" ],` . What do you think does it make sense. Many thanks in advance
– JSmith
Nov 29 '18 at 5:30
1
@JSmith Yes. When scopes are set to Manifests, the auto detection of script editor is turned off. So when the methods using other scopes is used in the script, the error related to the scopes occurs. I think that for example, this information might be useful. gist.github.com/tanaikech/23ddf599a4155b66f1029978bba8153b
– Tanaike
Nov 30 '18 at 21:44
1
I've added a look. Really clear explanations. As usual many thanks. You should write a book ;)
– JSmith
Nov 30 '18 at 22:47
|
show 2 more comments
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53507866%2fis-this-possible-to-use-sheets-api-post-urls-with-urlfetchapp%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
It is possible to use Sheets API post URLs with UrlFetchApp. So how about this modification?
Modification points:
- Please use
valueInputOptionto the query parameter.
- In your endpoint, I think that an error of
valueInputOption' is required but not specifiedoccurs.
- In your endpoint, I think that an error of
- When you want to use
Content-type, please add it to the headers.
- If you want to use the content type outside of the headers, please use
contentType: "application/json".
- If you want to use the content type outside of the headers, please use
Modified script:
// sample values
var values = {"values":[["a1","b1","c1"],["a2","b2","c2"]]};
var spreadsheetId = "### spreadsheetId ###";
var RangeName = "### RangeName ###";
var token = ScriptApp.getOAuthToken();
var options = {
"headers": {
'Authorization': 'Bearer ' + token,
"Content-type": "application/json", // Modified
},
"method": "POST",
"payload": JSON.stringify(values) //stringify a 2D array of data
}
var url = "https://sheets.googleapis.com/v4/spreadsheets/" + spreadsheetId + "/values/" + RangeName + ":append?insertDataOption=INSERT_ROWS&valueInputOption=USER_ENTERED"; // Modified
var resp = UrlFetchApp.fetch(url, options);
Note:
- Before you run this script, please confirm whether Sheets API is enabled at API console.
References:
- spreadsheets.values.append
- UrlFetchApp.fetch()
If this was not what you want, please tell me. I would like to modify it.
Thank you again @Tanaike for the moment I only upvote but I will try and mark it as answer if that works. Thanks again.
– JSmith
Nov 27 '18 at 23:23
@JSmith Thank you for replying. If this didn't work, please tell me. I would like to modify it.
– Tanaike
Nov 27 '18 at 23:32
Thank you so much it worked one thing you can add though is that I had to modify the manifest file with this ` "oauthScopes": [ "googleapis.com/auth/spreadsheets", "googleapis.com/auth/script.external_request" ],` . What do you think does it make sense. Many thanks in advance
– JSmith
Nov 29 '18 at 5:30
1
@JSmith Yes. When scopes are set to Manifests, the auto detection of script editor is turned off. So when the methods using other scopes is used in the script, the error related to the scopes occurs. I think that for example, this information might be useful. gist.github.com/tanaikech/23ddf599a4155b66f1029978bba8153b
– Tanaike
Nov 30 '18 at 21:44
1
I've added a look. Really clear explanations. As usual many thanks. You should write a book ;)
– JSmith
Nov 30 '18 at 22:47
|
show 2 more comments
It is possible to use Sheets API post URLs with UrlFetchApp. So how about this modification?
Modification points:
- Please use
valueInputOptionto the query parameter.
- In your endpoint, I think that an error of
valueInputOption' is required but not specifiedoccurs.
- In your endpoint, I think that an error of
- When you want to use
Content-type, please add it to the headers.
- If you want to use the content type outside of the headers, please use
contentType: "application/json".
- If you want to use the content type outside of the headers, please use
Modified script:
// sample values
var values = {"values":[["a1","b1","c1"],["a2","b2","c2"]]};
var spreadsheetId = "### spreadsheetId ###";
var RangeName = "### RangeName ###";
var token = ScriptApp.getOAuthToken();
var options = {
"headers": {
'Authorization': 'Bearer ' + token,
"Content-type": "application/json", // Modified
},
"method": "POST",
"payload": JSON.stringify(values) //stringify a 2D array of data
}
var url = "https://sheets.googleapis.com/v4/spreadsheets/" + spreadsheetId + "/values/" + RangeName + ":append?insertDataOption=INSERT_ROWS&valueInputOption=USER_ENTERED"; // Modified
var resp = UrlFetchApp.fetch(url, options);
Note:
- Before you run this script, please confirm whether Sheets API is enabled at API console.
References:
- spreadsheets.values.append
- UrlFetchApp.fetch()
If this was not what you want, please tell me. I would like to modify it.
Thank you again @Tanaike for the moment I only upvote but I will try and mark it as answer if that works. Thanks again.
– JSmith
Nov 27 '18 at 23:23
@JSmith Thank you for replying. If this didn't work, please tell me. I would like to modify it.
– Tanaike
Nov 27 '18 at 23:32
Thank you so much it worked one thing you can add though is that I had to modify the manifest file with this ` "oauthScopes": [ "googleapis.com/auth/spreadsheets", "googleapis.com/auth/script.external_request" ],` . What do you think does it make sense. Many thanks in advance
– JSmith
Nov 29 '18 at 5:30
1
@JSmith Yes. When scopes are set to Manifests, the auto detection of script editor is turned off. So when the methods using other scopes is used in the script, the error related to the scopes occurs. I think that for example, this information might be useful. gist.github.com/tanaikech/23ddf599a4155b66f1029978bba8153b
– Tanaike
Nov 30 '18 at 21:44
1
I've added a look. Really clear explanations. As usual many thanks. You should write a book ;)
– JSmith
Nov 30 '18 at 22:47
|
show 2 more comments
It is possible to use Sheets API post URLs with UrlFetchApp. So how about this modification?
Modification points:
- Please use
valueInputOptionto the query parameter.
- In your endpoint, I think that an error of
valueInputOption' is required but not specifiedoccurs.
- In your endpoint, I think that an error of
- When you want to use
Content-type, please add it to the headers.
- If you want to use the content type outside of the headers, please use
contentType: "application/json".
- If you want to use the content type outside of the headers, please use
Modified script:
// sample values
var values = {"values":[["a1","b1","c1"],["a2","b2","c2"]]};
var spreadsheetId = "### spreadsheetId ###";
var RangeName = "### RangeName ###";
var token = ScriptApp.getOAuthToken();
var options = {
"headers": {
'Authorization': 'Bearer ' + token,
"Content-type": "application/json", // Modified
},
"method": "POST",
"payload": JSON.stringify(values) //stringify a 2D array of data
}
var url = "https://sheets.googleapis.com/v4/spreadsheets/" + spreadsheetId + "/values/" + RangeName + ":append?insertDataOption=INSERT_ROWS&valueInputOption=USER_ENTERED"; // Modified
var resp = UrlFetchApp.fetch(url, options);
Note:
- Before you run this script, please confirm whether Sheets API is enabled at API console.
References:
- spreadsheets.values.append
- UrlFetchApp.fetch()
If this was not what you want, please tell me. I would like to modify it.
It is possible to use Sheets API post URLs with UrlFetchApp. So how about this modification?
Modification points:
- Please use
valueInputOptionto the query parameter.
- In your endpoint, I think that an error of
valueInputOption' is required but not specifiedoccurs.
- In your endpoint, I think that an error of
- When you want to use
Content-type, please add it to the headers.
- If you want to use the content type outside of the headers, please use
contentType: "application/json".
- If you want to use the content type outside of the headers, please use
Modified script:
// sample values
var values = {"values":[["a1","b1","c1"],["a2","b2","c2"]]};
var spreadsheetId = "### spreadsheetId ###";
var RangeName = "### RangeName ###";
var token = ScriptApp.getOAuthToken();
var options = {
"headers": {
'Authorization': 'Bearer ' + token,
"Content-type": "application/json", // Modified
},
"method": "POST",
"payload": JSON.stringify(values) //stringify a 2D array of data
}
var url = "https://sheets.googleapis.com/v4/spreadsheets/" + spreadsheetId + "/values/" + RangeName + ":append?insertDataOption=INSERT_ROWS&valueInputOption=USER_ENTERED"; // Modified
var resp = UrlFetchApp.fetch(url, options);
Note:
- Before you run this script, please confirm whether Sheets API is enabled at API console.
References:
- spreadsheets.values.append
- UrlFetchApp.fetch()
If this was not what you want, please tell me. I would like to modify it.
answered Nov 27 '18 at 22:03
TanaikeTanaike
23.1k21124
23.1k21124
Thank you again @Tanaike for the moment I only upvote but I will try and mark it as answer if that works. Thanks again.
– JSmith
Nov 27 '18 at 23:23
@JSmith Thank you for replying. If this didn't work, please tell me. I would like to modify it.
– Tanaike
Nov 27 '18 at 23:32
Thank you so much it worked one thing you can add though is that I had to modify the manifest file with this ` "oauthScopes": [ "googleapis.com/auth/spreadsheets", "googleapis.com/auth/script.external_request" ],` . What do you think does it make sense. Many thanks in advance
– JSmith
Nov 29 '18 at 5:30
1
@JSmith Yes. When scopes are set to Manifests, the auto detection of script editor is turned off. So when the methods using other scopes is used in the script, the error related to the scopes occurs. I think that for example, this information might be useful. gist.github.com/tanaikech/23ddf599a4155b66f1029978bba8153b
– Tanaike
Nov 30 '18 at 21:44
1
I've added a look. Really clear explanations. As usual many thanks. You should write a book ;)
– JSmith
Nov 30 '18 at 22:47
|
show 2 more comments
Thank you again @Tanaike for the moment I only upvote but I will try and mark it as answer if that works. Thanks again.
– JSmith
Nov 27 '18 at 23:23
@JSmith Thank you for replying. If this didn't work, please tell me. I would like to modify it.
– Tanaike
Nov 27 '18 at 23:32
Thank you so much it worked one thing you can add though is that I had to modify the manifest file with this ` "oauthScopes": [ "googleapis.com/auth/spreadsheets", "googleapis.com/auth/script.external_request" ],` . What do you think does it make sense. Many thanks in advance
– JSmith
Nov 29 '18 at 5:30
1
@JSmith Yes. When scopes are set to Manifests, the auto detection of script editor is turned off. So when the methods using other scopes is used in the script, the error related to the scopes occurs. I think that for example, this information might be useful. gist.github.com/tanaikech/23ddf599a4155b66f1029978bba8153b
– Tanaike
Nov 30 '18 at 21:44
1
I've added a look. Really clear explanations. As usual many thanks. You should write a book ;)
– JSmith
Nov 30 '18 at 22:47
Thank you again @Tanaike for the moment I only upvote but I will try and mark it as answer if that works. Thanks again.
– JSmith
Nov 27 '18 at 23:23
Thank you again @Tanaike for the moment I only upvote but I will try and mark it as answer if that works. Thanks again.
– JSmith
Nov 27 '18 at 23:23
@JSmith Thank you for replying. If this didn't work, please tell me. I would like to modify it.
– Tanaike
Nov 27 '18 at 23:32
@JSmith Thank you for replying. If this didn't work, please tell me. I would like to modify it.
– Tanaike
Nov 27 '18 at 23:32
Thank you so much it worked one thing you can add though is that I had to modify the manifest file with this ` "oauthScopes": [ "googleapis.com/auth/spreadsheets", "googleapis.com/auth/script.external_request" ],` . What do you think does it make sense. Many thanks in advance
– JSmith
Nov 29 '18 at 5:30
Thank you so much it worked one thing you can add though is that I had to modify the manifest file with this ` "oauthScopes": [ "googleapis.com/auth/spreadsheets", "googleapis.com/auth/script.external_request" ],` . What do you think does it make sense. Many thanks in advance
– JSmith
Nov 29 '18 at 5:30
1
1
@JSmith Yes. When scopes are set to Manifests, the auto detection of script editor is turned off. So when the methods using other scopes is used in the script, the error related to the scopes occurs. I think that for example, this information might be useful. gist.github.com/tanaikech/23ddf599a4155b66f1029978bba8153b
– Tanaike
Nov 30 '18 at 21:44
@JSmith Yes. When scopes are set to Manifests, the auto detection of script editor is turned off. So when the methods using other scopes is used in the script, the error related to the scopes occurs. I think that for example, this information might be useful. gist.github.com/tanaikech/23ddf599a4155b66f1029978bba8153b
– Tanaike
Nov 30 '18 at 21:44
1
1
I've added a look. Really clear explanations. As usual many thanks. You should write a book ;)
– JSmith
Nov 30 '18 at 22:47
I've added a look. Really clear explanations. As usual many thanks. You should write a book ;)
– JSmith
Nov 30 '18 at 22:47
|
show 2 more comments
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53507866%2fis-this-possible-to-use-sheets-api-post-urls-with-urlfetchapp%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Any reason you are not using the advanced Sheets service?
– TheMaster
Nov 27 '18 at 22:06
1
@TheMaster
UrlFetchAppis faster– JSmith
Nov 27 '18 at 23:21
1
Although I'm not sure whether this is useful information, in my environment, I have obtained that the process costs of reading and writing using UrlFetchApp make the costs of Advanced Google Services reduce by about 6 % and 4 %, respectively. You can see the experimental data at here. gist.github.com/tanaikech/…
– Tanaike
Nov 27 '18 at 23:31
1
Jsmith, I see. Still it's just 5% cost reduction right? @Tanaike Thank you for the information. It's really useful.
– TheMaster
Nov 27 '18 at 23:47
1
@TheMaster Yes. In my environment, I obtained such result. As another advantage, I think that in the case that I create a library using Sheets API, when it uses Sheets API with UrlFetchApp instead of Advanced Google Services, users can use the library by enabling Sheets API at only API console. By this, the usability becomes a bit high.
– Tanaike
Nov 27 '18 at 23:59