Advertisement
Namokonov

zapuskator

Jun 15th, 2021 (edited)
1,725
0
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.     const length = array.map(t => t[0]).length;
  4.     const property = PropertiesService.getScriptProperties();
  5.     const rows_property = property.getProperty('rows');
  6.  
  7.     if (rows_property < length) {
  8.         property.setProperty('rows', length);
  9.         const url = 'https://script.google' + '?row=' + array[length - 1].join();
  10.         return [
  11.             [new Date(), url, UrlFetchApp.fetch(url).getResponseCode()]
  12.         ]
  13.     }
  14.     return length
  15. }
  16.  
  17. function doGet(e) {
  18.   MailApp.sendEmail('grclubpoker@gmail.com', 'тема: привет!', e.parameter.row)
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement