I'm aware that I can extract a cell entry at mentioned timestamp and send the value to my mail id like below.
function triggerMail() {
// Fetch the monthly sales
var toGoRange = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("NetWorth").getRange("H741");
var toGo = toGoRange.getValue();
// Fetch the email address
var emailRange = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("NetWorth").getRange("J2");
var emailAddress = emailRange.getValue();
var date = Utilities.formatDate(new Date(), "GMT+5.30", "dd/MM/yyyy")
// Send Alert Email.
var message = '[' + date + ']' + ' Still toGo Rs.' + Number((toGo).toFixed(2)) + ' this month'; // Second column
var subject = 'Daily ToGo Report';
MailApp.sendEmail(emailAddress, subject, message);
};
Is there any way to store the value of toGo in the spreadsheet cell?. So that I can get an entry in the spreadsheet every day (currently, I'm getting an email every day)