Streamlining the Workflow with Google Scripts
"Scripting Light"
Learning to Code
http://www.codecademy.com/tracks/javascript
The Google Tutorial Site:
http://developers.google.com/apps-script/articles
Existing Examples:
Andrew Stillman: youpd.org/google-apps
Book: Google Script: Enterprise Application Essentials: Adding Functionality to Your Google Apps
Steps before watching this video.
Click this LINK for a copy of the template.
(Note: you must be logged into you Google Account.)
Link to the Template
Copy The Following Code
function sendEmails() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getSheets()[5];
var startRow = 1; // First row of data to process
var numRows = 1; // Number of rows to process
// Fetch the range of cells A1:D1
var dataRange = sheet.getRange(startRow, 1, numRows, 5)
// Fetch values for each row in the Range.
var data = dataRange.getValues();
for (i in data) {
var row = data[i];
var emailAddress = row[1]; // First column
var subject = row[2]; // Second column
var message = row[3]; // Third column
MailApp.sendEmail(emailAddress, subject, message);
}
}