Scroll to Top
💻
Free Code
Users get ready-to-use code at no cost.
📋
Easy Copy
Copy and use the code instantly.
Quick Learning
Understand concepts fast and clearly.
📝
Step-by-Step
Follow simple instructions to implement.
📅 April 23, 2025 💻 Tutorial ⭐ Beginner Friendly

Sending Bulk Email From Apps Script

Author Avatar

Ashish Dwivedi

Editorial Team • Tech Writer

About This Tutorial

Send bulk WhatsApp messages effortlessly using tools like Google Sheets and automation. Reach multiple users at once, save time, personalize messages, and streamline your customer communication workflow instantly.
  1. Step 1: Click on the Copy button to copy the code snippet.
  2. Step 2: Paste the copied code into your project’s script editor.

Apps Scripts Blog

Read Blog

📂 javascript
⚡ script1.js
⚡ script1.js
function sendEmail() {
  var ss = SpreadsheetApp.getActiveSpreadsheet();
  var sheet1 = ss.getSheetByName('Sheet1');
  var sheet2 = ss.getSheetByName('Sheet2');
  var subject = sheet2.getRange(2, 1).getValue();
  var n = sheet1.getLastRow();
  for (var i = 2; i < n + 1; i++) {
    var emailAddress = sheet1.getRange(i, 2).getValue();
    var name = sheet1.getRange(i, 1).getValue();
    var serviceAcquired = sheet1.getRange(i, 3).getValue();
    var message = sheet2.getRange(2, 2).getValue();
    message = message.replace("", name).replace("", serviceAcquired);
    MailApp.sendEmail(emailAddress, subject, message);
  }
}