2
votes

I am not sure if this is the right platform to ask but I have a few questions with regards to Google Services quotas. I'll be running a one-day event that relies heavily on the use of a telegram bot which is operated using GAS. I'm worried that I will exceed my daily quota for Google Services on that day. Hence, I have a couple of questions to ask regarding this:

  1. Does the quota for Document creation apply to PDF creation as well? In particular, I am creating PDFs using .createFile(blob). Does this count towards the 250/day limit?

  2. Is it possible for me to track how many Google Services quotas I am left with for the day? In particular, I would like to keep track of the number of UrlFetchApp.fetch() quotas I am left with since telegram bots rely heavily on this feature.

  3. Is it possible for me to temporarily increase the number of Google Services quotas I have for just one day?

Thank you! Any help is deeply appreciated!

1
The notion of how many operations you have left for a day doesn't really apply lets say that you have a quota of 24 operations that you can perform each day. That means that you can only have one ever hour if you do two in an hour then you have exceeded the quota.Cooper
Is a PDF a document? If so, then I think it counts against your quota.Cooper
Can you increase your quota for one day. Probably not unless you setup an Account and give google a way to bill you for the increase. But that's between you and Google not us. I think you can do this in a Cloud Platform Project. But I have to admit I avoid extra charges.Cooper
Can you share the script to test it? Or have you tried to see if it hits the quota?Kessy

1 Answers

1
votes

Thank you for your responses! Just to update everyone, I have resolved the issues I have posted here. Please see the responses to the above problems below:

  1. I have been using folder.createFile(Blob) to create PDF files from Google Apps Script and have not encountered an issue with daily quota so far. This is the case even if I generate > 900 of such files within one day. Hence, I have reason to believe that the create Documents quota listed under: https://developers.google.com/apps-script/guides/services/quotas does not apply to the creation of PDF files.

  2. Following Kessy's comment, I have decided to manually record my quota consumption using a simple script. This was achieved by creating a new sheet in my workbook, and updating the sheet every time a fetchURL call is implemented. The script is as follows:

    var log = SpreadsheetApp.openById(logSheet_ssId).getSheetByName("logSheet") var fetch_count = log.getRange(1,1).setValue(log.getRange(1,1).getValue() + 1) var fetch_time = log.getRange(1,2).setValue(new Date())

...where the total number of fetchURL calls is updated in cell (row = 1, col = 1) using fetch_count, with a timestamp in cell (row = 1, col = 2) showing when the last fetchURL was called (fetch_time). This helps me to keep track and manage my fetchURL quotas better.

  1. Following what I did in questions 1 and 2, I realised that there wasn't a need for me to temporarily increase my quotas for my event. As such, I did not look into a solution for question 3.

Hope my findings are useful to those of you who are facing similar issues! Have a good day!