Exception Error: not authorized to call MailApp.sendEmail

49 views
Skip to first unread message

Simon Parfait

unread,
Jun 28, 2024, 11:11:53 AMJun 28
to Google Apps Script Community
Capture d’écran 2024-06-28 à 12.06.47.png
Here is the code.
I want to send an email when a specific column is modified in my Google Sheet (when delivery dates are modified) however I keep receiving this error (code 72 : 13) and can't seem to find a solution. 
I tried the links it gave me but it's a literal maze for me lol.

George Ghanem

unread,
Jun 28, 2024, 1:30:32 PMJun 28
to google-apps-sc...@googlegroups.com

The issue is the fact that you are using the onEdit simple trigger. Simple triggers can only be used to modify the spreadsheet itself and not use any external services such as sending an email. You can change this to an installed trigger by changing the name of the function, defining the trigger manually and doing the required authorization approval. But note that any user of the spreadsheet will also need to do the authorization for the trigger to work for them.

Hope this helps.


--
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/0ea2f2be-84c1-4756-a078-df7854f36309n%40googlegroups.com.

Alex

unread,
Jun 29, 2024, 12:32:29 AMJun 29
to Google Apps Script Community
George is right

Simon Parfait

unread,
Jul 1, 2024, 2:36:49 AMJul 1
to Google Apps Script Community
Okay thank you very much!
Reply all
Reply to author
Forward
0 new messages