A few months ago, I had an Upwork freelancer build me an google API that would auto respond to incoming business emails on gmail that included certain keywords in the subject line. The program was set to run every 10 minutes so that my customers would get prompt replies (prompt replies are essential in my line of business). It is generally working fine, but every so often I receive an email from google with one of the following four error messages.
-Service invoked too many times for one day: gmail. (line 49, file "Code") |
-TypeError: Cannot read property “length” from undefined. (line 34, file “Code”) |
-getEmails |
Message no longer valid. (line 49, file "Code") |
|
-getEmails |
TypeError: Cannot read property "length" from undefined. (line 34, file "Code") |
time-based |
I am not tech savvy at all, so I am like a deer in the headlights trying to figure out what the issues are. The only error message I understand is “service invoked too many times for one day: gmail”
I use standard gmail, not G Suite. I see that the “email recipients per day” is limited to 100. I am trying to figure out if I have to upgrade to G Suite to solve the “service invoked too many times” error message.
In assessing this, I am wondering about a few things.
First, what is counted towards the 100 email tabulation?
Only emails sent?
All emails that are both sent and received?
Are google calendar invites counted towards the number of “emails sent?”
Are google calendar acceptances or declinations from the party that I invited counted towards the number of “emails sent?”
Second, I cant even figure out how I went afoul of the rule, since it does not seem like I went over the 100 email limit on the occasions when I received the “service invoked too many times” error message. As an example, on June 5, I received the error message. But I counted only 28 emails received and 7 emails sent over the entire June 4 - June 5 period. It is not entirely clear to me how the 24 hour period is calculated (does it start at 12am or at another time when the API was loaded into gmail?), so I think I was overly liberal in including more messages than a strict 24 hour period and still I wasn’t even close to the line.
Third, I am left wondering what the category of "email recipients per day" means? This is limited to 100 on gmail and 1,500 on G Suite. https://developers.google.com/apps-script/guides/services/quotas
How is this different than the “daily sending limit” of 500 on gmail and 2,000 on G Suite? https://support.google.com/a/answer/166852
I spent hours reading through threads on stackoverflow yesterday and there seems to be mass confusion about google sending limits since the rules are written in chart form, in short-hand that lends itself to multiple interpretations and with no long-form, prose explanations to follow.
Also, any idea what the other 3 error messages are about in plain English? Is there a way to fix the API code so that I don’t get these error messages anymore?
I can share the google sheet that has the API code if anyone needs to examine it.
I sent this question directly to someone who works at google who I found through github and his response was "The short version is that Apps Script has lots of additional internal quotas besides those listed in the documentation, and you are running afoul of it. There is nothing you can do except reduce the frequency of your script."
This response confused me even more. What is the frequency limitation? Is this a reference to "triggers total run time?" If yes, how do I tabulate how many minutes my tigger is running for? Most days the script works fine, so if I was running the script too frequently wouldnt it run afoul of the rules every day?
Go easy on me guys. I am a computer simpleton.
--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/589b93e5-fbcf-4b9f-b92c-5d9892399429%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-community+unsub...@googlegroups.com.
I was able to open the sheet by pulling the following URL from the screenshot:
https://docs.google.com/spreadsheets/d/1Te9Bu_NLHpwYWrnGVls06fvwZYLAqI6kDLRhELLaoow/edit#gid=0
The file is owned by "Alexandr Samokhin" who I assume is the developer. His contact info is as the top of the script so OP may want to consider contacting him to troubleshoot his issues.
I was able to open the script and
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/589b93e5-fbcf-4b9f-b92c-5d9892399429%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/cf63e3e8-7eab-4270-b36e-7309afc58b5c%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-community+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/589b93e5-fbcf-4b9f-b92c-5d9892399429%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-community+unsub...@googlegroups.com.