0
votes

According to the google app script documentation here on simple triggers...

https://developers.google.com/apps-script/guides/triggers/

it is possible to trigger a script via doGet and 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?)

1
well have you actually tried if it triggers? Don't speculate, try first. - noogui

1 Answers

0
votes

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.