reminders - Reminds And Send me Email -
i'm trying develop reminds app. code framework need. have 3 spreadsheets, , intend, in each spreadsheets, monitor deadlines. when deadline less 5 days, should send e-mail. has worked in following manner:
function sendemails() { var sheet = spreadsheetapp.getactivespreadsheet().getsheetbyname('2016.2'); var clientesinfo = sheet.getrange(2, 7, sheet.getlastrow() - 1, 2).getvalues(); //data de hoje na coluna g2; (var = 0; < clientesinfo.length; i++) { if (clientesinfo[i][1] < 5 && clientesinfo[i][1] >= 0 ) { mailapp.sendemail("roger@tr.br", "atenção! prazo se esgotando(isso é apenas um teste)", "verifique tarefas que estão próximas de vencer, em: https://g.gl/plgtru7"); } `enter code here` } }
but want that same code, can monitor multiple spreadsheets, spreadsheet 2016.2. how should do? create multiple ifs? if have 100 sheets? 100 ifs?
Comments
Post a Comment