How to bring your Google app scripts to Google Cloud Platform? - google-apps-script

I have scripts that I made with Google script editor. Basically what my scripts do is make and change google SpreadSheets, Slides, and Docs. It is logical that Google puts a limit on the amount of computing that you can do. The error that I get is this:
Error in Apps Script executions Overview
My question is how can I bring my scripts to Google Cloud Platform and pay for the computing power? So that I can finish my work. I am not sure where to start in the Google Cloud Platform. Or can I use my own computer as computing power?
Any Help, tips, or tricks are welcome, 😅 Thank you 🙏

Google Apps Scripts are already part of your default project in Google Cloud Platform, and it is GCP that manages your quota for services and API's that are being executed in those scripts.
Please check your codes, identify areas in which there are a lot of API executions, and try to optimize, for example, removing API calls within loops, etc. Here is a reference of quotas that are managed in GCP for Apps Script:
Quotas for Google Services
If the code is already optimized, then you can apply for increased quota here:
Monitor API Quotas

Related

Quota on Googles External Services [duplicate]

We make substantial use of Google Apps Script, and today I saw this error:
UrlFetch failed because too much upload bandwidth was used in Code (gci standalone script):219
I found lots of links to Google Apps Engine quotas, and how to check Apps Engine quota usage. However the Apps Engine quotas all showed as 0 in the Google Cloud developers console. This is not surprising since we don't use Apps Engine, but I was unable to find a similar breakdown for Google Apps Scripts.
Is there one?
On another note, this question: Are there quotas for incoming requests to a Web App?
has an answer:
urlFetch quotas do not apply unless you are making the call to the spreadsheets api v3 directly without spreadsheetApp.
We use UrlFetch to retrieve CouchDB data. I would like to monitor the amount of quota for this service that we use. Is there a way to do so?
You can call the quota for the send emails quota but don't think you can do it for urlfetch.

How to access Cloud Platform for a Google Apps Script when the link is missing

Normally when I go to Resources > Cloud Platform project... in Google Apps Scripting, I see it says This script is currently associated with project: and I have a direct link to the cloud project associated with this script.
However, for some of my scripts, I see the following:
This script has an Apps Script-managed Cloud Platform project.
This is problematic because when I try to enable the Advanced Calendar API, for example, I don't know where to find my Cloud Platform project.
Normally I would click that link and then enable the Google Calendar API in the dashboard, for example.
Turns out if you see This script has an Apps Script-managed Cloud Platform project. the set up for advanced services is actually much easier.
Simply go to Resources > Advanced Google Services... and enable the one you want. No need to muck around with the Cloud Platform settings!

Service invoked too many times in a day

I am using paid google suite. Have created a google sheet and a script to be used with that sheet that uses Language.translate.
I am trying to run the script but it says
"Service invoked too many times for one day: translate".
How can I solve this problem. Paying for the service is no problem. Just need clean instructions.
Thanks in advance.
I haven't done this myself, but I believe you have to open the Google Cloud Platform project associated with your script (Resources > Cloud Platform project), enable the Translate API there and setup a billing account for this project.
I'm not sure if the Apps Script built-in Translate API interface, LanguageApp will work out of the box with this setup or if you'll have to switch to manual UrlFetch invocation of the API. My guess is that the built-in will work, but it isn't hard to switch either.
Anyways, your calls to Translate API should then be enabled and cost $20 per 1 million characters translated.

How to capture/view Google App Script usage in Google API Console

How can usage of Google App Script libraries like GmailApp, CalendarApp, and PropertiesService be tracked through the Google API Console?
While Google App Script projects do show up inside the API console, none of them show any activity when selected. I understand that individual Google APIs need to be enabled for a project in order for their usage to be visible in the API console, but none of the App Script APIs seem to be available in the list Google APIs to choose from.
My only guess is that Google App Script usage cannot in fact be tracked through the Google API Console, which is a shame since many users seem to hit their app script quota limits and would benefit from the ability to track and visualize their script's resource usage.
Yes, it is true that you cannot track the usage of individual libraries of Google App Script in the Google Developer Console except for the MailApp. The MailApp has a method of getRemainingDailyQuota() that returns the number of remaining emails a user can send for the rest of the day. You can check in this documentation the different quotas and limitations that you can do with the Apps script. I also suggest you to make a feature request about this issue.

Where can I view Google Apps Script quota usage?

We make substantial use of Google Apps Script, and today I saw this error:
UrlFetch failed because too much upload bandwidth was used in Code (gci standalone script):219
I found lots of links to Google Apps Engine quotas, and how to check Apps Engine quota usage. However the Apps Engine quotas all showed as 0 in the Google Cloud developers console. This is not surprising since we don't use Apps Engine, but I was unable to find a similar breakdown for Google Apps Scripts.
Is there one?
On another note, this question: Are there quotas for incoming requests to a Web App?
has an answer:
urlFetch quotas do not apply unless you are making the call to the spreadsheets api v3 directly without spreadsheetApp.
We use UrlFetch to retrieve CouchDB data. I would like to monitor the amount of quota for this service that we use. Is there a way to do so?
You can call the quota for the send emails quota but don't think you can do it for urlfetch.