4

I am using clasp to manage a Google Sheets Script (web app)

I tried to make a new deploy according to the instructions using: clasp deploy --deploymentId abcd1234

The command went through without errors. I can see a new version of the script created but the deployment is not updated: no deployment is made.

1 Answer 1

5

I found this conversation when digging deeper.

Summary: You need to add some code to your manifest file appscript.json:

 "webapp": { "access": "MYSELF", "executeAs": "USER_DEPLOYING" }, 

The whole appscript.json file should look like this (so you can see where to place the code:

{ "timeZone": "America/New_York", "dependencies": { }, "webapp": { "access": "MYSELF", "executeAs": "USER_DEPLOYING" }, "exceptionLogging": "STACKDRIVER" } 

Furthermore here is an overview of the different options available (full documentation here https://developers.google.com/apps-script/manifest/web-app-api-executable?hl=fr#webapp):

"webapp": { "access": "MYSELF" "access": "DOMAIN" "access": "ANYONE" "access": "ANYONEANYONE_ANONYMOUS", "executeAs": "USER_DEPLOYING" "executeAs": "USER_ACCESSING" "executeAs": "ANYONE_ANONYMOUS" }, 

After updating the manifest file push the changes using clasp push. Then deploy with the commands in the instructions: clasp deploy --deploymentId abcd1234

Additional note to anyone new to clasp: there is a difference between version and deployment. A version is similar to a git tag (a way of keeping track of code), while a deployment is actual code that is being used for execution.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.