I'm working into the migration of a large list to Google Groups from Google Apps Script.
After some creation of members, i'm having this Exception:
Exception: Service invoked too many times for one day: premium groups read.
There is one way to know the available quote of reads for integrate this verification into my code.
This is my function:
function readSheet(){
var sheetId='MY-ID';
var sheet = SpreadsheetApp.openById(sheetId);
var toIgnore = 1;
var mData = sheet.getDataRange().offset(toIgnore, 0, sheet.getLastRow() - toIgnore).getValues();
for (var i = 0; i < mData.length; i++) {
/*Here verify quota*/
addUsertoGroup(mData[i][0]);
}
}
How I can achieve this?
Your script reaches a quota or limitation.
You can see the daily quotas for
Groups read
in the table below:You can use a try..catch statement to ignore the error: