Google docs scripts asks for permission everytime

2019-06-09 19:38发布

So my question i have a google docs template which has a script with certain autofill criteria. After you click on use this template fine you get a file and when you run the script everytime is asks for permission to access the certain things google needs to identify you, it basically acts like its a new app everytime you create a new file from the template.

Is their a way of setting it won't ask for permission everytime?

1条回答
做自己的国王
2楼-- · 2019-06-09 20:33

If you have a document bound script in your document, and if you will make a copy of that document and run the script, google app script will ask permission every time. Copying the document with script acts as if you have created a new script file and now script will ask permission on its first run.

Possible solution

You can publish your script as google document add-on. If you don't want to expose it publicly, you can also publish the add-on privately which only you or someone you will share with, can use.

check out the documentations

Publishing the add-on will bind your add-on to every document for google apps.

查看更多
登录 后发表回答