Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google docs scripts asks for permission everytime

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?

like image 909
user3429707 Avatar asked Sep 10 '26 11:09

user3429707


1 Answers

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

  • https://developers.google.com/apps-script/add-ons/publish#development_checklist
  • https://developers.google.com/apps-script/add-ons/domain-wide#publishing_for_domain-wide_installation

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

like image 163
m5khan Avatar answered Sep 14 '26 10:09

m5khan