create trigger if checkbox checked

124 views
Skip to first unread message

nagastar

unread,
Mar 17, 2023, 8:01:59 PM3/17/23
to Google Apps Script Community
hello,
I just want to run this function if in column J the checkbox is checked then in column E it will send data according to the row checkbox that is checked in column J.
how to create the correct condition if the checkbox is checked?

function autoReply() {
 var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("sheet");
 var row = sheet.getLastRow();
  var question = sheet.getRange(row, 5).getValue();
 //[info][/info]
 //[title][/title]
 var notify_body
  = "[info][title]this question has been answered[/title]\n"
    + "question : " + question + "\n"
    +"----------------------------------------\n" [/info]";

 var roomId = "200385145"//

 var client = ChatWorkClient.factory({token: "0c0219265533a8b8e71d160bda27ec3f"});
 client.sendMessage({room_id: roomId, body: notify_body});
}
Reply all
Reply to author
Forward
0 new messages