Translate

Get Email Notifications for Edits in Google Spreadsheet


How to Get Email Notifications for Edits in a Google Spreadsheet

Google Sheets is a fantastic collaboration tool—but if you're not actively monitoring it, changes can slip by unnoticed. Whether you're tracking a shared project, managing data submissions, or simply want peace of mind, setting up email notifications for edits in Google Sheets helps you stay informed in real time.

In this blog post, you’ll learn how to get email alerts for edits using built-in features and Google Apps Script for advanced use cases like custom triggers, specific cell monitoring, or user-based alerts.


✅ Why Set Up Email Notifications for Edits?

You may want to receive alerts when:

  • A team member edits shared data

  • A Google Form submits a new response

  • Someone makes unauthorized or unexpected changes

  • Specific rows, columns, or cells are modified

  • You want to keep a history or log of changes


Method 1: Use Google Sheets’ Built-in Notification Rules

Google Sheets includes a simple built-in feature to send email notifications on edits or form submissions.

How to Enable It:

  1. Open your Google Sheet.

  2. Click Tools > Notification rules.

  3. Choose:

    • When: “Any changes are made” or “A user submits a form”

    • How often: “Email – right away” or “Email – daily digest”

  4. Click Save.

Pros:

  • Easy to set up

  • No coding required

  • Works for general edit notifications

Cons:

  • No control over which cells or types of edits trigger the email

  • Cannot customize the email content

  • Daily digest can be delayed


Method 2: Use Google Apps Script for Custom Edit Notifications

If you need more control (e.g., alerts for changes to a specific cell, row, or by a certain user), use Apps Script.

Basic Script to Send Email on Any Edit:

  1. Go to Extensions > Apps Script

  2. Delete default code and paste:

function onEdit(e) {
  var sheet = e.source.getActiveSheet();
  var range = e.range;
  var value = e.value;
  var user = Session.getActiveUser().getEmail();

  var message = `
Spreadsheet Edited:
Sheet: ${sheet.getName()}
Cell: ${range.getA1Notation()}
New Value: ${value}
Edited By: ${user}
Timestamp: ${new Date()}
`;

  MailApp.sendEmail("your-email@example.com", "Google Sheet Edited", message);
}
  1. Replace "your-email@example.com" with your actual email address.

  2. Save the script. This will now trigger every time an edit is made.

Important Notes:

  • onEdit() is a simple trigger—it runs automatically, but cannot access user info unless you use an installable trigger.

  • To get full user info, install the trigger manually (see below).


Method 3: Create an Installable Edit Trigger (for Advanced Features)

If you want access to full event data (e.g., user email), you must use an installable trigger.

How to Set It Up:

  1. Open Apps Script from the spreadsheet.

  2. Click the clock icon on the left (Triggers).

  3. Click “+ Add Trigger.”

  4. Choose:

    • Function: onEdit

    • Event source: From spreadsheet

    • Event type: On edit

  5. Save and authorize the script.

This version lets you get the user email and handle complex logic.


Advanced: Send Notification Only for Edits in a Specific Cell or Range

Here’s how to send email only when a specific cell is changed (e.g., cell B2):

function onEdit(e) {
  var sheet = e.source.getActiveSheet();
  var range = e.range;

  if (sheet.getName() === "Sheet1" && range.getA1Notation() === "B2") {
    var message = `Cell B2 changed to: ${e.value}`;
    MailApp.sendEmail("your-email@example.com", "Important Cell Edited", message);
  }
}

Or trigger based on changes in a column:

if (range.getColumn() === 3) { // column C
  // send email
}

Bonus: Log All Edits and Send a Summary Email

You can log each edit to a separate sheet and send a daily summary:

function logEdit(e) {
  var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Edit Log");
  if (!sheet) {
    sheet = SpreadsheetApp.getActiveSpreadsheet().insertSheet("Edit Log");
    sheet.appendRow(["Timestamp", "Sheet", "Cell", "New Value", "User"]);
  }

  var user = Session.getActiveUser().getEmail();
  sheet.appendRow([new Date(), e.source.getActiveSheet().getName(), e.range.getA1Notation(), e.value, user]);
}

Set this script to run on an onEdit installable trigger.


Troubleshooting Tips

Issue Solution
No emails received Make sure you authorized the script and email is correct
onEdit not triggering Use installable trigger instead of simple trigger
Can’t access user email Simple triggers don’t support this—use installable
Too many emails Add logic to filter only important edits

Conclusion

Setting up email notifications for Google Sheets edits gives you better control, visibility, and accountability—especially when multiple collaborators are involved.

For quick alerts, use Google’s built-in notifications. For advanced use (specific cells, custom formatting, user tracking), use Apps Script and installable triggers. With a few lines of code, you can build a fully customized monitoring system—right inside your Google Spreadsheet.