function onEdit(e) {
const sheet = SpreadsheetApp.getActiveSheet();
const sName = sheet.getName();
if(sName === 'Q&A sheet' && e.range.columnStart == 9 && e.value == "TRUE") {
var row = sheet.getLastRow();
var question = sheet.getRange(row, 5).getValue();
var notify_body
= "[info][title]This question has been entered by the answer.[/title]\n"
+ "question : " + question + "\n"
+"----------------------------------------\n" [/info]";
var roomId = "xxxxxx"//chatwork room id
var client = ChatWorkClient.factory({token: "0c0219265533a8b8e71d160bda27ec44f"});//Enter your chatwork access token
client.sendMessage({room_id: roomId, body: notify_body});
}
}
Can anyone help me to fix these scripts? I have searched the internet but have not found a solution.