Google Spreadsheet trigger onChange doGet() available, what about doPut()?
According to the google app script documentation here on simple triggers...
it is possible to trigger a script via
doPost HTTP requests to a web app.
however, I need to run a script every time a
doPut HTTP request is run.
Is this possible? (obviously not with simple triggers but with an installable trigger?)作者: Jeremy Dance 的来源 发布者： 2017 年 12 月 27 日
The answer is a resounding yes. Sending GET and PUT requests can allow you to run any number of scripts.
There is more. I think this is one of the coolest parts of apps-script. The script you are calling to can be run as you with all of the permissions that you have including admin permissions if you are on G-suite. By using GET and PUT requests you can remove many of the complexities of asking a user permissions to run a script.
Finally, the best thing is, your GET and PUT requests don't need to come from another app-script they can come from anywhere including client side code, and server side APIs.作者: Jason Allshorn 发布者: 2017 年 12 月 28 日