Namokonov

zapuskator

Jun 15th, 2021
917
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function zapuskator(array) {
  2.   array = array.filter(t => t.some(g => g));
  3.  return array[-2]
  4.   const length = array.length;
  5.   const property = PropertiesService.getScriptProperties();
  6.   const rows_property = property.getProperty('rows');
  7.  
  8.   if (rows_property < length) {
  9.     property.setProperty('rows', length);
  10.     UrlFetchApp.fetch(ScriptApp.getService().getUrl() + '?row=' + array[-1].join()).getResponseCode();
  11.   return 'письмо отправлено!'
  12.   }
  13.   return length
  14. }
  15.  
  16. function doGet(e) {
  17.   MailApp.sendEmail('grclubpoker@gmail.com', 'тема: привет!', e.parameter.row)
  18. }
RAW Paste Data