2
votes

I want to create a Google sheet add-on where the user can create an HTTPS endpoint in his sheet, that can act as a webhook for an external service. I can see it is possible to do this manually by launching app script code using the 'Deploy a script as a web app' option from the Script Editor https://developers.google.com/apps-script/guides/web#deploy_a_script_as_a_web_app

Is it possible to automate this in app-script so that the user can configure this in the add-on UI only and in the background, app-script launches the endpoint and can return the endpoint URL to the user?

2
Good question. I don’t think so but I can’t wait to hear what the other users are going to sayCooper
So you basically want to use this Add-On to create a web app and then return the URL of this web app that the Add-On has created right?Mateo Randwolf
@ Mateo Randwolf yesMithun Manohar
I doubt that is possible, however, to give it a try, would this web app be pre coded and then when the user interacts with the Add-On it deploys it? Would the user have editor level access to this script/Spreadsheet?Mateo Randwolf

2 Answers

2
votes

It might be possible but you'll likely need the user to grant your app access to restricted scopes, in which case your add-on will need to undergo a security assessment which will run you anywhere from $15,000.00 to $75,000.00.

You can try leveraging the Apps Script API to create a script project specific to the user and use that project to deploy a web app on their behalf. Not sure if it will work, but you can try playing with the following API endpoints:

1
votes

A Google sheets add-on is a single project shared across all users of the add-on. So, even if any user was allowed to use "Deploy as webapp" feature, Deploying it will create a single endpoint for all users of the addon and NOT a unique url endpoint for each user.