简体   繁体   中英

Google Services Quota for Telegram Bot (Google Apps Script)

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!

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 to create PDF files from Google Apps Script and have not encountered an issue with daily quota so far.从 Google Apps 脚本创建 PDF 文件,到目前为止还没有遇到每日配额问题。 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 .

  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!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM