Hello,
Is there a way to set up google sheets notification so that it will notify a certain person within a shared workbook when a specific column is edited?
Specifically, I own a workbook shared between me and another person. Is there a way to set up notifications so that the other person will be notified and changes are made to cells in column D?
Many thanks!!!
@Cuongdinh - This functionality is not available out of the box, but you can leverage google apps script with a trigger, and it should do the job.
// Create a trigger to trigger email notification everytime when the monitored column is edited.
function setupTrigger() {
ScriptApp.newTrigger('columnDEdit')
.forSpreadsheet(SpreadsheetApp.getActive())
.onEdit()
.create();
}
// monitor the column for editing, and send email when edited.
function columnDEdit(e) {
const monitoredColumn = 4; // Column D, change this as required
const notifyEmail = 'user@exameple.com'; // change this as required
if (e.range.columnStart === monitoredColumn) {
const sheetName = e.source.getSheetName();
const cellValue = e.value;
const rowNumber = e.range.rowStart;
const subject = `Google Sheets: Column D updated in ${sheetName}`;
const body = `A change has been made in column D (row ${rowNumber}) of the sheet '${sheetName}'. The new value is: ${cellValue}`;
MailApp.sendEmail(notifyEmail, subject, body);
}
}
User | Count |
---|---|
5 | |
3 | |
1 | |
1 | |
1 |