How to Send Automatic Email Notifications from Google Sheets Using Apps Script

Monitoring spreadsheets manually to catch stock shortages, overdue invoice payments, or new customer form submissions takes valuable time away from running your business. Instead of checking cell values line-by-line every day, you can configure Google Sheets to automatically send custom email alerts directly to your inbox when specific conditions are met.

In this step-by-step tutorial, you will learn how to write a simple Google Apps Script that monitors your spreadsheet and sends automated emails without requiring third-party paid add-ons.


Why Use Apps Script for Email Notifications?

Google Apps Script is a cloud-based JavaScript platform built into Google Workspace. Using native code rather than external automation apps gives you complete flexibility:

  • 100% Free: No monthly subscription fees or third-party connector limits.
  • Fully Customizable: Include dynamic cell values (names, dates, amounts) in the subject line and email body.
  • Automated Triggers: Run scripts automatically on fixed time schedules (e.g., daily at 9:00 AM) or instantly when a row is modified.

Step 1: Prepare Your Google Sheet Layout

To follow along with this tutorial, create a simple spreadsheet tracking inventory levels or client project deadlines. Ensure your headers sit in Row 1:

Column A (Item Name) Column B (Stock Quantity) Column C (Reorder Level) Column D (Recipient Email)
A5 Hardcover Journal 5 10 admin@example.com
Spiral Notebook A4 45 15 admin@example.com

Step 2: Add the Apps Script Code

Click on Extensions → Apps Script in the top navigation bar of Google Sheets. Delete any default code in the script editor and paste the following snippet:

function sendLowStockAlerts() {
  var sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
  var data = sheet.getDataRange().getValues();
  
  // Loop through rows (skipping header row 0)
  for (var i = 1; i < data.length; i++) {
    var itemName = data[i][0];
    var currentStock = data[i][1];
    var reorderLevel = data[i][2];
    var recipientEmail = data[i][3];
    
    // Check if stock is equal to or below the reorder threshold
    if (currentStock <= reorderLevel && recipientEmail !== "") {
      var subject = "⚠️ Low Stock Alert: " + itemName;
      var message = "Hello Team,\n\nThe item '" + itemName + "' has dropped to " + 
                      currentStock + " units, which is below the reorder threshold of " + 
                      reorderLevel + " units.\n\nPlease reorder soon.";
      
      MailApp.sendEmail(recipientEmail, subject, message);
    }
  }
}

Step 3: Test and Authorize Your Script

  1. Click the Save disk icon in the toolbar.
  2. Click the Run button at the top of the Apps Script editor.
  3. A pop-up titled "Authorization Required" will appear. Click Review permissions, select your account, click Advanced, and then select Go to Untitled project (unsafe) to grant your script access to send emails on your behalf.
  4. Check your email inbox—you will receive automated alerts for any row where current stock is less than or equal to the reorder level!

Step 4: Set Up an Automated Daily Trigger

To run this check automatically every morning without opening Google Sheets manually:

  1. In the Apps Script editor, click the Triggers icon (clock symbol) on the left sidebar.
  2. Click + Add Trigger in the bottom right corner.
  3. Under Choose which function to run, select sendLowStockAlerts.
  4. Under Select event source, choose Time-driven.
  5. Select Day timer and pick your preferred time slot (e.g., 8am to 9am).
  6. Click Save.

Daily Email Quotas & Limitations

Google enforces standard daily email sending limits for Apps Script to prevent spam:

Account Type Daily Email Recipients Limit
Standard Personal Google Account (@gmail.com) 100 emails / day
Paid Google Workspace Business Account 1,500 emails / day

Best Practices for Reliable Automation

  • Prevent Duplicate Emails: Add a "Status" column (e.g., Column E) in your spreadsheet and update it to "Email Sent" inside the code loop so your script doesn't re-send notifications for the same row every single day.
  • Keep Templates Professional: Use HTML formatting inside MailApp.sendEmail() to add bold text, tables, or buttons to your automated notification emails.

Comments