Answer the question
In order to leave comments, you need to log in
How to allow Google Apps Script to send email to any Spreadsheet user?
A script has been made for one Google Spreadsheet. When some cells change, sends email to fixed addresses via MailApp.sendEmail()
The document was created by User-A.
The document is accessed by User-A, User-B and User-C. All with the right to make changes.
The script was created by user User-B. When he set up a trigger for launching the desired function when changing this document, there was a request for permissions, a warning about an unverified script and continuing at your own peril and risk only if you trust the developer. OK.
У вас отсутствует разрешение на вызов функции sendEmail (строка 13, файл Код)
Answer the question
In order to leave comments, you need to log in
The description is not enough, the code is not visible, although you can already guess where the error is hiding. Separate concepts:
Judging by the description, User-B was authorized, and the rest of the users were not. Force these users to go through authorization, and they will have permission to run functions.
How to force users to log in is the developer's problem, not Google's. But, having no serious contradictions in technical terms, this approach is difficult to understand in practice. Examples of applications whose code can be the same up to a comma.
When developing a client-server application, you need to take care of multi-user access. It is necessary to develop a process and order of access, and only after that figure out how to implement it. For example,
Personally, it would be unpleasant for me that someone requires me to send some letters to no one knows where and why, surviving an already meager quota.
Review your application. What goals does it pursue? What have you already achieved? Is that how it works? Give an example code and the essence of the application.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question