I have written an Apps Script for personal use that I want to invoke with an HTTP request. (I'm basically using this like a "serverless function" with native authentication to Google Apps APIs.)
I can do this easily by deploying my Apps Script project as a Web App, which gets me a URL like
https://script.google.com/macros/s/${DEPLOYMENT_ID}/exec
However, if I make changes to my script and want to push those changes live, I have to create a new deployment, which will have a new deployment ID, thus changing the URL.
I know that I could use a "Test Deployment" to get a URL that always points to the project HEAD, but this always requires authentication from the HTTP client. With my deployment, I can set "Who has access" to "Anyone" and avoid this requirement.
Is it possible to deploy a web app script to a URL that will not change on future deployments?
At the top right of the script project, click Deploy > Test deployments. Next to "Select type," click Enable deployment types settings > Web app. Under the web app URL, click Copy. Paste the URL in your browser and test your web app.
An Apps Script project deployment is a version of the script that is made available for use as a web app, add-on, or API executable. By creating and managing deployments, you can iterate on your code, keep track of your changes, and control the exact code version your users have access to.
A single execution of Apps script can last no longer than 6 minutes and you're hitting this limit.
In the old editor deploying to the same URL is the default behavior because you can only have one deployment. The new editor allows you to have multiple deployments, each with its own URL and (possibly) pointing to different versions of your application.
To update an existing deployment to a different version, or to create a new version, you need to edit your deployment's configuration. Editing deployment configuration
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With