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?
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.
Related
We are using Google Workspace in my company and my boss explicitly shared a Google Sheet with me, so he is the owner and I have edit access. I am trying to create an App Script but when I try to access the Script Editor I always get the screen to request access on Google Drive.
Is it still possible to create a script or I am only allowed to create scripts in sheets that I am the owner?
According to Google's documentation on collaborating:
Access to bound scripts
Only users who have permission to edit a container can run its bound script. Collaborators who have only view access cannot open the script editor, although if they make a copy of the parent file, they become the owner of the copy and will be able to see and run a copy of the script.
So I just came across this issue.
Essentially I had my personal account and company account logged in on Google. For some reason, the Script Editor would try and access in with my personal account and when switching to my company account I would get the request access screen.
After logging out of my personal account I was able to create the script normally.
I have a script which is bound to a document. Initially this script was written by friend, now I am taking care of this. I want to publish this script as add on. I have done all the formalities, as suggested by google.
When I clicked on Deploy as Docs Web add-on it gave me error, that Only owner of script can publish the script.
Is there any way to change the owner the of script.
Try making a copy the script file and deploying that copy.
Is there a way to view & manage the scripts I have deployed as a web app through the Google Apps Script Editor?
I stored a script on my google drive, opened it with Google Apps Script, and deployed via 'Publish -> Deploy as Web App'. After testing the script/webapp works correctly, I deleted the script project from my google drive and found that the web app is still functioning.
I can't find a way to view a list of, or manage the scripts after they have been published. Is there a console or dashboard that will show all my published scripts?
The file may still be available in the Trash or Archives folder. Searching for type:script will give you a list of all stand alone script files. Also type:script is:trashed will find any in the trash folder.
Finding files with bound scripts associated (the script is embedded in the file) as well as any with specific permissions can be done by looking at your account's permissions. This will list every file that has had some sort of permission request. If a bound script does not require any permissions granted, I know of no way to finding the file. To see the files you have granted permission to, use this link: https://myaccount.google.com/permissions
In my google spreadsheet, my scripts and custom function already work. However, I want to prevent other users from accessing the script editor, but they should be able to access/run the custom menus.
Is this possible, if so could you point me in the right direction?
If the user has Edit access to the document they have access to the script. If you need to remove access to the script you will need to publish it as an add-on. This is a pretty simple process especially if you are publishing it for your own work domain.
https://developers.google.com/apps-script/add-ons/
I have been searching for an answer, more that likely using the wrong terminology, to my question and I have read through the Google documentation but I am now more confused than when I started looking for the answer.
I'm new to Google Apps and a complete beginner at Javascript. I recently started working in a Google Apps school (we have our own domain) and I have started developing some custom Google Sheets to aid other teachers and boost productivity.
I have developed a Sheet with some custom scripts and a custom menu bar to call the various functions of the script. Since I am so new to Javascript my scripts have some bugs that I fix as other users report them to me. However, my problem is that when I fix a bug in my "master" Sheet the end user must open the shared master Sheet and make a copy of it to benefit from the update. I want to update to be pushed out to all copies of the sheet (circa 4 copies)
I know need to deploy it but I don't know whether I need to deploy it as a web app or a sheets add-on from the script editor? Again, we have our own domain so I do believe I don't need to have it approved by Google to use it internally in our domain?
Based from this documentation, public add-ons require a review before publication, since you have your own domain, you can publish just for users within your domain without a review.
To publish an add-on for the first time, follow these steps. If you also want to let Google Apps domain administrators install and authorize your add-on for all users in their domain, follow the steps for domain-wide publication as well.
When you fixed your bugs and wanted it to be updated to all copies of sheets, you can follow this Update your add-on link to update an add-on that you have already published.
Open the add-on project in the script editor.
Make the necessary changes to your code, then save a new version of your project by clicking File > Manage versions, then Save
New Version. Close the Manage Versions dialog.
Click Publish > Deploy as add-on. (Or Sheets or Docs or Forms add-on.)
In the dialog that appears, change the add-on's details as needed, select the new version of your script, then click Update store
item. (If you change the add-on's name, make sure you also change
the name of the Apps Script project to match, as the project name is
shown in the authorization dialog.)
In the store listing, click Publish changes, then click OK in the dialog that appears.
Hope this helps!