Reputation: 31
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:
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?
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.
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!
Upvotes: 2
Views: 361
Reputation: 31
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:
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.
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.
Hope my findings are useful to those of you who are facing similar issues! Have a good day!
Upvotes: 1