How many times a webapp script can be called? - google-apps-script

I have a Google Apps Script which returns JSON from the content of a spreadsheet. The script is deployed as a webapp run by the owner of the script. The JSON is then used to feed a Google Maps website accessible by everybody.
Is there any kind of limits on how many times the script can be called
by the website?

You didn't mention wether the site has an apps-script gadget to retrieve data or not so I guess it hasn't.
The main limit you are going to meet is the total computing time if your script is called very often. The maximum for 1 day is 1 hour : looking at the usual execution time you can have a rough idea of the number of executions per day, and from there the number of requests.

Related

Is maximum number of Apps Script projects created per day applicable to container-bounded projects?

I am thinking of building my own application using AppScript and Spreadsheet.
I wonder if the maximum limit of AppScripts per day(mentioned in the link below) is applied to container-bounded projects or not.
https://developers.google.com/apps-script/guides/services/quotas
I'd like to run a script which copies a spreadsheet with a container-bounded project everytime it is runned.
My script is going to be runned more than 100 times per day, so, in other words, it creates more than 100 spreadsheets and the corresponding container-bounded projects per day. This number theoretically exceeds the limit that the official reference says.
However, when I tried copying a spreadsheet manually more than 50 times, I found no error message or assertion. Also, the copied scripts are all working in each spreadsheet.
I still wonder if my use of AppScript is safe or not.
I would appreciate it if you kindly give me advice.

Measure my current usage consumption on google app script

I have a google app script that execute the following actions:
Read a incoming webhook, write some information on a google spreadsheet, update a google contact and generates several outbound webhooks.
It takes aproximately 5 seconds to execute the whole script.
I would like to know how much times per day I can execute this script. I have seen the following web page but I am not sure in which feature my actions might fit, since there is no description of what those each feature means.
https://developers.google.com/apps-script/guides/services/quotas
Also I check in the google app script dashboard in hope I could find the current usage of my app script, but I only found that my script is execute 500 times per day for an average of 5 seconds per execution. In the future I am going to need to execute this app script more times, but I will like to know which is limit.
¿Where can I find my current app script consumption and which are the quotas for the features I am currently using?
As mentioned in the comments, Google Apps Script has a quota page that shows execution limits on various services.
Please note that you can get quota exception messages if you go near these limits but not go over them entirely.
Since you mentioned that you may need to execute your script more than 500 times a day, you might want to start optimizing your functions to take less time. You can start searching for resources on how to do this, for example in this post: Tracking total execution time Google apps script for an account

Google Apps Scripts self-starting at night

Context: I have a Google Spreadsheet with some data imported from the external API + some calculations done. API access + calculations are done using Google Apps Script. All those functions are within two files that belong to one project. Today in the morning I noticed multiple
Exception: Service invoked too many times for one day: urlfetch. errors. Strange enough, as neither I nor the second collaborator was working overnight. When I checked executions, it turned out there were multiple executions over the night. It looked as if the document was refreshed every 20-30 minutes.
Questions
How can I check what triggered those functions?
Any ideas how to prevent those executions?

Does Google Appscript running as Web App contributes to the Total trigger runtime quota?

I have created a UI Page with Google Apps Script, it fetches data from a spreadsheet and display it in the Page. A function (added in JS Page) is called at a certain time interval continuously to refresh the content in the Page with the help of JavaScript method "setInterval(functionName,Time)". No other triggers are set for this refresh thing.
When I see the executions, the refresh things runs as a web app only.
Is the web App running time included in the total trigger run-time quota for apps script?
The doGet(e) and doPost(e) functions are sometimes referred to as triggers in the documentation so I believe using Web Apps do count towards your trigger quotas. They also count towards your script usage quotas as well.
You can run the script for 6 minutes on each execution, for daily executions time there is no reference but you might reach the limitation of triggers total runtime which is 90 min / day
To check other limitations please see: Quotas for Google Services

What is the Quota of created folders per day?

I have checked quota of number of action per day like creating document and spread and etc.... at Google Quota , but didn't find limits for Folder creation and when I run the script for creating hundreds of folder it stopped after a while alerting me that I have exceed my limitation per day, So What is the Quota of created folders per day ?
Anther question : How by script I get number of limits per day, Is it coming from this below code
DocsList.DEFAULT_RESULT_SIZE;
DocsList.MAX_RESULT_SIZE;
Anther Question : How to get driveWriteVolume rateMax?
Thanks
Google doesnt publish that quota as well as many others mainly because they are meant to reduce abuse and publishing them could help the abuse.
There is no api to get the published ones either.
Basically from apps script you should do a user's worth of work. I have a script that can create over 200 folders but havent tried it with more.