I'm trying to run a check that would send an email automatically if the due date is tomorrow on a piece of equipment. The problem is that I'm not sure if I can possibly use this -> https://developers.google.com/apps-script/reference/spreadsheet/relative-date?hl=ru To run the check. This is what I have so far, hopefully someone can help me here, I'm still fairly new to app script, and am honestly not the best coder in general. Combine that with my inability to find good examples for app script, and my problems are fairly compounded.
function emailForLaptops() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet1 = ss.getSheetByName('Main');
var tomorrow = new Date(TOMORROW);
var active = sheet1.getActiveRange().getValues(); // gets the active highlighted data
var data = sheet1.getRange("C3:D21").getValues();
data.forEach(function(row) {
if (row[1] == tomorrow){
MailApp.sendEmail(row[2], "Code Admin Test", "This is a test to see if an email can be sent via app scripting");
}
});
}