function getData() { var sheetName = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Main");
var queryString = Math.random(); var cellFunction = '=IMPORTHTML("https://www.investing.com/technical/commodities-technical-summary","table",4)'; var datetime = Utilities.formatDate(new Date(), "IST", "yyyy/MM/dd HH: mm:ss"); sheetName.getRange('A1').setValue(cellFunction); sheetName.getRange('g2').setValue(datetime); }
function sendNotification() {
var sheetName = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Main");
//if("D13" == sheetName.range.getA1Notation() || "D12" == e.range.getA1Notation()) {
if("C13" == "Strong Buy" and "h13"=now() diff 1 minutes) {
//Define Notification Details var recipients = "[email protected]"; var subject = "Update"+e.range.getSheet().getName(); var body = "cell C13 has been updated";
function getData() {
var sheetName = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Main");
var queryString = Math.random();
var cellFunction = '=IMPORTHTML("https://www.investing.com/technical/commodities-technical-summary","table",4)';
var datetime = Utilities.formatDate(new Date(), "IST", "yyyy/MM/dd HH: mm:ss");
sheetName.getRange('A1').setValue(cellFunction);
sheetName.getRange('g2').setValue(datetime);
}
function sendNotification() {
var sheetName = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Main");
//if("D13" == sheetName.range.getA1Notation() || "D12" == e.range.getA1Notation()) {
if("C13" == "Strong Buy" and "h13"=now() diff 1 minutes) {
//Define Notification Details
var recipients = "[email protected]";
var subject = "Update"+e.range.getSheet().getName();
var body = "cell C13 has been updated";
var datetime = Utilities.formatDate(new Date(), "IST", "yyyy/MM/dd HH: mm:ss");
sheetName.getRange('H13').setValue(datetime);
//Send the Email
MailApp.sendEmail(recipients, subject, body);
}
}
//Send the Email MailApp.sendEmail(recipients, subject, body); } }