This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function cekNilai(nis) { | |
// Buka sheet | |
let sheetUrl = "URL_GOOGLE_SHEETS"; | |
let file = SpreadsheetApp.openByUrl(sheetUrl); | |
let sheet = file.getSheetByName("Sheet1"); | |
let last_row = sheet.getLastRow(); | |
// Ambil data | |
let nilai_list = sheet.getRange(`A2:C${last_row}`).getValues(); | |
let nilai_filtered = nilai_list.filter(el => el[0] == nis); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function doPost(e) { | |
// Buka sheet | |
let sheetUrl = "YOUR_SHEET_URL"; | |
let file = SpreadsheetApp.openByUrl(sheetUrl); | |
let sheet = file.getSheetByName("Sheet1"); | |
// Rapikan data | |
let req = JSON.stringify(e).replace(/\\/g, "").replace("}\"", "}").replace("\"{", "{"); | |
let reqJson = JSON.parse(req); | |
let senderMessage = JSON.stringify(reqJson["postData"]["contents"]["senderMessage"]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function SendMessage(nomor_wa, pesan) | |
{ | |
var url = 'https://pati.wablas.com/api/v2/send-message'; | |
var token = 'YOUR_SECURITY_TOKEN_HERE'; | |
var headers = { | |
'Authorization' : token, | |
'content-type' : 'application/json', | |
}; |