I want to know if there is a way, if there is something change in a specific cell automatic WhatsApp should send
Asked
Active
Viewed 74 times
1 Answers
0
First register in https://panel.rapiwha.com/landing/login.php. Link your phone and get the API key from the web site. Then try the below code in your Google Sheet.
//
function onEdit(e) {
var api_key="xxxxxxx"; //from the Rapiwah web site
var mob="919123456789"; // with country code without +
var s = e.source.getActiveSheet(), r ;
var shtn=s.getName();
if(shtn=="Plan") { //checks that we're on the correct sheet
r = e.range;
var old=e.oldValue;
var nval=r.getValue();
var linecol = r.getColumn();
var linerow = r.getRow();
if(linerow === 3 && linecol===4 ) { //checks the B3 cell was changed
var wpurl= 'https://panel.rapiwha.com/send_message.php?apikey='+api_key+'&number='+mob+'&text=Cell B3 in Plan Sheet changed from '+old+' to ' + nval;
var formurl3 = wpurl.replace(/#/g, "");
var formurl4 = formurl3.replace(/,/g, "");
var formurl = formurl4.replace(/ /g, "%20");
var response = UrlFetchApp.fetch(formurl);
}
}
}
//

arul selvan
- 616
- 4
- 17