I have a call to a toast message within an installable onEdit trigger function that displays a message in the Google Sheets interface whenever an edit is made. The message s
As you can see in the documentation:
Apps Script requires user authoritaztion to access private data from built-in Google Services or advanced Google services
That means you can share your script with anyone, but they need to log in to use the script.
If my understanding is correct, how about this answer? Unfortunately, even when the installed OnEdit event trigger is used, when anonymous users are edited, toast()
and Class Ui cannot be used. So as one of several workaround, I would like to propose to use the images. Fortunately, insertImage()
can be used for this situation. So I'm using this workaround. Please think of this as just one of several answers.
Before you use this script, please prepare an image for displaying.
Before you use this script, please set the file ID of the image. And please install the OnEdit event trigger for the function of showMessage()
.
function showMessage(e) {
var fileId = "###"; // Please set the file ID of the image.
var sheet = e.source.getActiveSheet();
var blob = DriveApp.getFileById(fileId).getBlob();
var image = sheet.insertImage(blob, 2, 3);
Utilities.sleep(3000);
image.remove();
}
If I misunderstood your question and this was not the direction you want, I apologize.