Google Drive Error with Shared Script - google-apps-script

I have shared a Google Script with Public. However, the users keep getting an error message saying that too many people are accessing the file.
How do I fix this?

Unfortunately the current architecture of the script editor makes it so only a limited number of users can access a given script at the same time. We are working on some long term fixes for this limitation, and you can follow the progress on Issue 2167. In the mean time, we recommend you use another method to share your script source with a large number of people.

Related

How to link a Project Number to a Script dynamically?

I'm creating forms on demand and i need to be able to set up the triggers. If i do it on the main AppsScript script that is handling the forms creation, i'll hit the 20 triggers max quota pretty soon. So i decided to add a dedicated script to every form (associating with parentID) so i won't hit the quota.
My problem is that when i try to add the triggers i'm getting permission denied since the scripts created for each form are using a default GCP project and it needs to be a standard GCP project due to OAuth.
I can add the project number manually, but that kind of defeats the idea of being able to generate google forms on demand.
I want to be able to link the script created with the standard GCP project that is already configured, but i just can't find anything on Google's documentation, i know its a long shot but i've decided to post here in hopes that someone that had the same problem managed to do so.
As requested on the comments below, the triggers that i'm using are:
onFormSubmit - get the response and send it to my endpoint in the backend server
onOpen - ensures that the editor hasn't removed anything default (this only works when an editor opens the form in edit mode)
This is the project number im referring to.
Thanks

Turn OFF “Authorization is required” for Google Sheets Script for own team

We are a small company which just switched from paper to tablets (Surface GO Win10 Home) and we have one particular sheet which is used for every order (about 100 orders per month). This Google Sheet acts as a template for every single order and includes some easy code which is written in a bound Apps Script project, to handle things like switching the status from started to finished, copying some cells etc.
My problem is, when someone of the team wants to use the created "buttons" in the sheet to activate the script, it asks for authorization for the script the change the sheet. If you enable it, everything works fine but then for every new order you have to enable it again, and again, and it gets really annoying for every team member.
I tried somehow to
turn it off in the security options as administrator
tried it in the GOOGLE CLOUD PLATFORM under API's and services
tried to make the code somehow public in the script editor options
...but nothing seems not to work. I used VBA programs a lot in Excel VBA but it was more a hobby and I'm not a computer scientist, otherwise it would maybe be easier to solve this problem.
Is there an easy way so every one of my team can work with the sheets created out of a template without any request from Google for authorization every time.
Kind regards.
The reason for the popups is that Google Apps Script is not part of Google Sheets itself, it's a separate application that uses OAuth 2.0 to get the permissions to make the requests by calling the APIs. The popup shows the scopes you are authorizing for. This means that you can't disable that.
Note that apps script could do more things that just edit the spreadsheet itself; it could get other files, get your personal information, call external servers, etc. Also, the authentication process will only happen once per file.

Google apps script running in the background and depleting my quota?

On my paid Google account, I have a lot of sheets using various scripts to fetch urls. I know there is a daily quote of fetches set, but the issue I have is that even if I don't open any of my sheets with scripts for over 24 hours, and then I open one, I get the over quota error message: Service invoked too many times for one day: urlfetch. I wouldn't have thought scripts would be running in the background, ie. without me opening them, but I can't explain this in any other way - does anyone know if this is so? Another way to put the question, how can I avoid getting such error?
Do you have any time based triggers set up for other scripts?
You can check by going to script.google.com and selecting My Triggers on the left hand side. Some of you scripts may be set to run even if you are not present.

google spreadsheet: no permission to access apps-scripts-editor, but I am owner

I have a frustrating Script Editor problem, I'm sure I'm doing something simple wrong - would be glad for any advice!
I select script editor (from within google spreadsheets):
Then I reach the permission denied error, suggesting I request access:
However, I am the owner of this spreadsheet, and I'm not receiving any permission emails:
So, any idea what's going on? I'm not receiving any emails after requesting permission.
Being owner of the spreadsheet does not necessarily mean you are the owner of the script. Try to find out who is the owner of the script and ask them to share the script with you.
While you will be able to view and edit the script, you'll still not be able to do some priviledged tasks such as depoying as a webapp, managing versions.
I can think of a couple of basic things that may cause issues...
Are you signed in to multiple accounts within the same browser? Some odd things can happen when multiple, enterprise and personal accounts are signed in at once.
I would clear your browsing data, ensure only one account is signed in and try again :)

Permission to run a site-script

In my organizzation, I created an internal site with a script callable from different pages inside that reads / writes data from various spreadsheets and send mail.
For testing, I shared the site and documents with a my colleague but he can't run the scripts because appears page to request permission:
"... This script is Requesting permission to do potentially harmful operations. Only authorize the script if you truly trust the author!"
if my colleague click on "authorize" nothing happens.
I give to my colleague the link of the script (not the page that embeds the script), clicking on "authorize" he received a long email from google where it is explained that authorized the execution of the script but instead continues to not work ..
The one way to allow the execution of script is to run the script directly from the editor to grant permissions.
I can't do it for other colleagues!!!
I'm really unhappy about this. I worked a lot on the script but now I realize that I can't do it to my colleagues for another google's big bug.
I have a script that uses also spreadsheet and mail service and I have not any difficulties with authorizations ...(after the red screen is approved user have full access to the app)
Are you sure there is not something else that could prevent your script to work with other users ? A document that is not shared or a call to an external api or whatever ? All I can say is that the current procedure is far more convenient than it used to be a few month ago and that I see not bug on that just now...
In my experience with scripts in spreadsheets, new users have to run the script, authorize it, and run it again.