1. Home
  2. Web
  3. Stop failures for google apps script emails

How to stop ‘failures for Google Apps Script’ emails

Google Scripts is a useful tool that allows you to run scripted actions on files in Google Docs, Drive, Sheets, Slides, etc. If you’re willing to invest a little time in it, you can probably write your own Google Script but you’ll find there are plenty of them available online that you can simply import. A Google Script, like most other scripts, relies on triggers or certain parameters to run and when those triggers fail to run, the script itself cannot run and ultimately fails. When a script fails to run, you get an email with the subject “failures for Google Apps Script” that tells you which triggers failed. Here’s how you can stop getting these emails.

Fix “failures for Google Apps Script”

The first thing you should do is check out which script has a failing trigger. You can find out from the email itself. Decide if the script is still useful for you and if it isn’t, it’s a good idea to just delete it. If you still need to use the script, you need to figure out why those triggers are failing.

Error Messages

A script can fail for any number of reasons but you generally get one of these error messages in the email. An error message will be accompanied by triggers that are failing.

  • Authorization is required to perform that action
  • Exceeded maximum execution time
  • Service using too much computer time for one day

Analyzing triggers

The “failures for Google Apps Script” email will help here again. Look through it and it will show you two things; filters and triggers that are being used by a script, and that are failing. The subject will tell you which script is having problems e.g., in the screenshot below, I have a script called ‘Google Drive Expiration’ that is failing to run. The trigger that is failing is a time-based trigger that is supposed to expire a file at a certain time. The error message says it needs “authorization to perform the action” which it’s unable to get.

First, examine the scripts that are running by visiting this link. If you find the script, you can troubleshoot it. Troubleshooting steps generally depend on the type of script so we can’t go into detail on how to fix a script.

Next, you want to look at the filters and triggers. Visit this link, and select the Filters and the Triggers tab in the column on the left. You will see the triggers that have been configured. You can edit them, or delete them. It depends on what you need to do to fix the script. In many cases, you will be able to reapply the trigger and fix the problem.

Delete Triggers

It is possible that you once used a script and deleted it later. Its triggers may still exist and they are trying to run but failing which is why you get the email for a failed script run. In that case, you can just delete the trigger and the emails will stop.

If all else fails, you can block the email but we don’t advise that you do so if you use a lot of Google Script.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.