Hello Roger, this forum is about App Engine <https://cloud.google.com/appengine/>, a component of the Google Cloud Platform <https://cloud.google.com/> that is not related to Apps Script.
You can find out how to get help for Apps Script in this document <https://developers.google.com/apps-script/support>. On Friday, August 18, 2017 at 2:12:23 PM UTC-4, roger roger wrote: > > I am trying to run this script in a googlesheet, but, the following erros > msg appears: Service called many times not same day; or, em > portuguese: Serviço chamado muitas vezes no mesmo dia: email. (linha 29, > arquivo "Copia_20171") > > function sendEmails20171() { > > var planilha2017_1 = > SpreadsheetApp.getActiveSpreadsheet().getSheetByName('2017_1'); > //"Armazena" a planilha 2017 na variável 20171 > var manipula2017_1 = planilha2017_1.getRange(1, 7, > planilha2017_1.getLastRow() - 1, 2).getValues(); //Configura pra pegar > linhas e colunas de planilha20171, > //armazenando-os na variável manipula20171 > var colunaAssunto = planilha2017_1.getRange(1, 2, > planilha2017_1.getLastRow() - 1, 2).getValues();//pega o assunto, linha 2, > coluna 3. > var colunaSecaoResp = planilha2017_1.getRange(1, 8, > planilha2017_1.getLastRow() - 1, 2).getValues();//pega a seção, linha 2, > coluna 8. > var colunaTitularSecao = planilha2017_1.getRange(1, 10, > planilha2017_1.getLastRow() - 1, 2).getValues();//pega o titular da seção, > linha 2, coluna 10. > > var nomePlanilha = planilha2017_1.getName(); //pega o nome da planilha > var email = '[email protected]'; > > var link2017_1 = 'https://goo.gl/xF5Nbg'; > var linkCelula = ' > https://docs.google.com/spreadsheets/d/1YiLCBggDIJKKPYEM2JYEwG2B4wSV3dO0NoiapNtAiM/edit?ts=561cf0ae#gid=1588829769&range= > '; > > for (var i = 0; i < manipula2017_1.length; i++) { > if (manipula2017_1[i][1] <=300 && manipula2017_1[i][1] > -720 ) { //o > alerta dispara quando faltam menos de cinco dias para vencer e até depois > de dois > //anos vencidos - e não cumprido. > var assuntoPlanilha = colunaAssunto[2][5];// pega o assunto da > planilha > var secaoResp = colunaSecaoResp[3][5];// pega a seção responsavel > var titularSecao = colunaTitularSecao[i][1];// pega o titular da > seção. > var link2017Celula = linkCelula+[i+1]+":"+[i+1]; > > var dias = manipula2017_1[i][1]; //pega os dias vencidos > var assuntoEmail = secaoResp + " - \nPrazo de monitoramento em " > + '"' + nomePlanilha + '"' + " vencendo em " + dias + " dias"; > > > MailApp.sendEmail(email, assuntoEmail, "Assunto: " + > assuntoPlanilha + " \nSeção Responsável: " + secaoResp + " \nSeção > Responsável: " + > + "\nPara maiores detalhes, clique aqui: "); > > } > } > } > > -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/google-appengine. To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/68c8c237-243f-491b-8443-365b464e9685%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
