Is it possible to deploy a Google Apps Script as a web app that won't change URL on each deploy?

Viewed 2141

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?

1 Answers

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

Related