0
votes

I have a script in Google Apps Script that sends me an email using the MailApp.sendEmail() function. I ran it once in the editor and it asked me to authorize the script so I did. I then scheduled it to run with a project trigger, but when it does I get an error email from Google Apps Script that says: "Authorization is required to perform that action.".

Why is it getting an authorization error when running as scheduled vs running from the editor and how do I make sure it is authorized?

NOTE: I have the @OnlyCurrentDoc tag at the top of the script.

1
What kind of trigger did you use? - user3717023
I used a time based trigger so that it would run hourly once a day. - Alex Egli
I think this is a known bug but the bug post used Python API Client Library for executing apps script. To have update or progress about it, you may check out that link or if you feel its a totally diferrent scenario you can file a bug. Hope it helps - Mr.Rebot
My script started working so I think you're right about it being that bug. Can I set your comment as the answer? - Alex Egli

1 Answers

0
votes

I think this is a known bug. To have update or progress about it, you may check out that link. Hope it helps