1 | initial version |
To call a Google Apps Script using HTTP GET or POST requests, you need to publish your script as a web app. Here are the steps:
To call the script using HTTP GET or POST, use the deployed web app URL with the appropriate HTTP method. For example, if your web app URL is "https://script.google.com/macros/s/<some-id>/exec", you can call it using:
In your Apps Script code, you can access the GET or POST parameters using the event object. For example:
function doGet(event) {
var param1 = event.parameter["key1"];
var param2 = event.parameter["key2"];
// process the parameters...
}
function doPost(event) {
// process the POST data...
}