Answer the question
In order to leave comments, you need to log in
How to get an email that changes a google spreadsheet?
I would like to indicate the author of the changes in the column after the change is made.
There is an onEdit trigger, but how can I find out the username/soap of the person who makes the edit?
Answer the question
In order to leave comments, you need to log in
For simple triggers like onEdit and custom functions , the user object is not available , you can see this if you make the following code:
function onEdit(e) {
SpreadsheetApp.getActiveRange().setValue(Utilities.formatString("email: %s",e.user.getEmail() ));
}
function onEditTrigger(event) {
var userEmail = event.user.getEmail(); //Email пользователя
//Что-то делаем...
};
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question