Google apps script 如何通过Google Sheets中的定时触发器调用浏览器通知

Google apps script 如何通过Google Sheets中的定时触发器调用浏览器通知,google-apps-script,google-sheets,Google Apps Script,Google Sheets,我想比较两个单元格的值并发出浏览器通知。 到目前为止,我已经能够显示浏览器消息框 我将触发器设置为5分钟,但下面的代码不执行。是的 function checkValue(e) { var ss = SpreadsheetApp.getActive(); var sheet = ss.getSheetByName('Active Calls');//ss.gets var valueToCheck = sheet.getRange('C5').getValue(); var valu

我想比较两个单元格的值并发出浏览器通知。 到目前为止,我已经能够显示浏览器消息框

我将触发器设置为5分钟,但下面的代码不执行。是的

function checkValue(e)

{

var ss = SpreadsheetApp.getActive();


var sheet = ss.getSheetByName('Active Calls');//ss.gets


var valueToCheck = sheet.getRange('C5').getValue();
var valueShort = sheet.getRange('J5').getValue();
var scrip = sheet.getRange('A5').getValue();
//var scrip1 = "Short Pls"+script
//Browser.msgBox(scrip1+ " "+valueShort+ " ");
   // Browser.msgBox(scrip+ " "+valueShort+ " ");

//chrome.

if(valueToCheck < valueShort)

{
  Browser.msgBox(scrip+ ' short pls' +valueShort+ ' ');
 //var notify1 = new Notification =(scrip+ " "+valueShort+ " ");

//MailApp.sendEmail('amitbajaj768@gmail.com', 'Short call', 'at: ' + scrip+ '.');

}
函数校验值(e)
{
var ss=SpreadsheetApp.getActive();
var sheet=ss.getSheetByName('Active Calls');//ss.gets
var valueToCheck=sheet.getRange('C5').getValue();
var valueShort=sheet.getRange('J5').getValue();
var scrip=sheet.getRange('A5').getValue();
//var scrip1=“短Pls”+脚本
//msgBox(scrip1+“”+valueShort+“”);
//msgBox(scrip+“”+valueShort+“”);
//铬。
if(valueToCheck
基于时间的触发器没有绑定的UI实例。因此您不会收到提示、祝酒等。编写一个侧栏(可以运行常规JavaScript)使用
setInterval
google.script轮询您的工作表。运行
,然后显示
警报或发送电子邮件(或者返回发送电子邮件并避开侧栏)