Skip to content

Diagnostic reference

Service invoked too many times for one day

Why Google Apps Script throws Service invoked too many times for one day for email, urlfetch, or calendar, what the daily caps are, and how to pace runs.

Updated November 26, 2026

Apps Script error

Exception: Service invoked too many times for one day: email.

What it means

Google enforces daily per-account quotas on Apps Script services, including email recipients (100 recipients per day on consumer Gmail accounts, 1,500 recipients per day on Google Workspace accounts), UrlFetchApp requests, and Calendar writes. Every script running under the same Google account shares that daily pool. Once you hit the cap, calls fail until the 24-hour window resets.

Related error messages

  • Exception: Service invoked too many times for one day: urlfetch.
  • Exception: Service invoked too many times for one day: calendar.
  • Exception: Service invoked too many times in a short time: calendar.

Before and after

The code before and after the fix.

Problem 4 changed lines
function sendReminders(rows) {
  rows.forEach((row) => {
    GmailApp.sendEmail(row.email, 'Reminder', row.message);
  });
}
Fixed 28 changed lines
function sendReminders(sheet) {
  const remaining = MailApp.getRemainingDailyQuota();
  if (remaining < 1) {
    Logger.log('Daily email quota is exhausted. Wait for the 24-hour reset.');
    return;
  }

  const lastRow = sheet.getLastRow();
  if (lastRow < 2) return;
  const rows = sheet.getRange(2, 1, lastRow - 1, 4).getValues();
  let sent = 0;

  for (let index = 0; index < rows.length; index += 1) {
    const [email, subject, body, status] = rows[index];
    if (!email || status === 'Sent') continue;
    const recipients = String(email)
      .split(',')
      .map((address) => address.trim())
      .filter(Boolean);
    if (recipients.length === 0) continue;
    if (sent + recipients.length > remaining) {
      Logger.log('Stopped before row ' + (index + 2) + ' to stay inside the daily recipient quota.');
      break;
    }
    GmailApp.sendEmail(recipients.join(','), String(subject), String(body));
    sheet.getRange(index + 2, 4).setValue('Sent');
    sent += recipients.length;
  }
}

How to fix it

  • Call MailApp.getRemainingDailyQuota() before a batch so the script stops cleanly when quota is low.
  • Stamp a Sent status column right after each external call so the next day's run skips completed rows.
  • Open Triggers and Executions to check for duplicate triggers, every-minute schedules, or an onEdit loop firing repeatedly.
  • Store repeated UrlFetchApp responses in CacheService instead of calling the external URL on every run.

Things to check

  • You cannot reset a daily quota early. The window resets about 24 hours after the first request that used that quota.
  • One email sent to 20 recipients counts as 20 against your daily email quota, not 1.

In the Apps Script editor

Catch errors like this before clicking Run.

myFunction (published as Error Checker for Google Apps Script on the Chrome Web Store) checks your code while you edit at script.google.com. Diagnostics, autocomplete, and rule-based quick fixes are free without an account, run in your browser, and request no Google Drive, Gmail, or Apps Script project OAuth scopes.