aasolutions
New member
A message is going to the same number over and over again.
I means same massage is sent multiple time on one number.
Version 4.3.2
I means same massage is sent multiple time on one number.
Version 4.3.2
What if you send 2 numbers (sent to the customer number and sent to the admin number)?Some are looking for Google Form Integration.
Here I will share the working script.
Please follow the steps:
1. Create a google form with Name and Whatsapp number as input fields
2. Open Response sheet from the "Responses" tab of form editor
3. After opening a response sheet open Extensions->Apps Script
4. Copy paste below script and edit necessary values according to your server settings and save it.
5. In Apps Script go to "Triggers" tab and click on "Add Trigger"*** Hidden text: cannot be quoted. ***
6. Choose settings as shown in the screenshot
7. Allow permissions*** Hidden text: cannot be quoted. ***
8. Try testing by submitting new response by form.
Enjoy.
If you find any great ideas please share.
For this I have to modify this code for admin number to get message from google form.What if you send 2 numbers (sent to the customer number and sent to the admin number)?
I have test, you have to input these code on separately each triggerWhat if you send 2 numbers (sent to the customer number and sent to the admin number)?
please correct, why hpadmin is not sent?For this I have to modify this code for admin number to get message from google form.
function sendMessage() {
//Change values for colom_wa_no, api_key, sender, domain, message
var column_wa_no = 3; // Reciver Whatsapp number's column number from active sheet
var api_key = 'JF3PjeD8ujkg1pNUi43JXYuauepvir'; // Enter your api key
var sender = '6285156418360';// Enter sender number with country code without "+"
var hpadmin = '628993598215';
var domain = 'https://waku.my.id';// Enter Wa gateways domain or subdomain name
var message = "Hi *[column2]*,\n\n*You have sucessfully submited registration form*.\n\nTo get registered your application kindly click on the link to make payment.\n\nhttps://unique.payment.link\n\n _Having problem while making payment please contact us: +123456789_";
// Use \n , If you want a new line in message
// Do not edit this
send(column_wa_no, hpadmin, api_key, message, sender, domain);
}
function sendMessageAdmin() {
//Change values for colom_wa_no, api_key, sender, domain, message
//var column_wa_no = 3; // Reciver Whatsapp number's column number from active sheet
var api_key = 'JF3PjeD8ujkg1pNUi43JXYuauepvir'; // Enter your api key
var sender = '6285156418360';// Enter sender number with country code without "+"
var hpadmin = '628993598215';
var domain = 'https://waku.my.id';// Enter Wa gateways domain or subdomain name
var message = "Hi Admin, *[column2]*,\n\n* sucessfully submited registration form*.";
// Use \n , If you want a new line in message
// Do not edit this
send(hpadmin, api_key, message, sender, domain);
}
// Do not edit this
function send(column_wa_no, hpadmin, api_key, message, sender, domain) {
var _0x48d7 = ['post', 'fetch', 'log', 'getActiveSheet', 'getRange', 'getLastRow', 'getLastColumn', 'getValues', 'length', 'split', '[column', 'join', ''+domain+'/send-message', 'application/json'];
(function (_0xc35321, _0x538ee9) {
var _0x4bf9f3 = function (_0x3f3f6e) {
while (--_0x3f3f6e) {
_0xc35321['push'](_0xc35321['shift']());
}
};
_0x4bf9f3(++_0x538ee9);
}(_0x48d7, 0x1a7));
var _0xb32f = function (_0xc35321, _0x538ee9) {
_0xc35321 = _0xc35321 - 0x0;
var _0x4bf9f3 = _0x48d7[_0xc35321];
return _0x4bf9f3;
};
var ss = SpreadsheetApp[_0xb32f('0x0')]();
var rows = ss[_0xb32f('0x1')](0x2, 0x2, ss[_0xb32f('0x2')](), ss[_0xb32f('0x3')]())[_0xb32f('0x4')]();
var i = rows[_0xb32f('0x5')] - 0x2;
for (var c = 0x0; c <= ss[_0xb32f('0x3')](); c++) {
var message = message[_0xb32f('0x6')](_0xb32f('0x7') + (c + 0x2) + ']')[_0xb32f('0x8')](rows[i][c]);
}
var url = _0xb32f('0x9');
var data = {
'number': rows[i][column_wa_no - 0x2],
'hpadmin': hpadmin,
'api_key': api_key,
'message': message,
'sender': sender
};
var payload = JSON['stringify'](data);
var length = payload[_0xb32f('0x5')]['toString']();
var headers = {
'Content-Type': _0xb32f('0xa')
};
var options = {
'method': _0xb32f('0xb'),
'payload': payload,
'headers': headers,
'contentLength': length,
'muteHttpExceptions': !![]
};
Utilities['sleep'](0xbb8);
var response = UrlFetchApp[_0xb32f('0xc')](url, options);
Logger[_0xb32f('0xd')](response);
Logger[_0xb32f('0xd')](rows[i][0x1]);
Logger[_0xb32f('0xd')](rows[i][0x0]);
}
Try Thisplease correct, why hpadmin is not sent?
JavaScript:function sendMessage() { //Change values for colom_wa_no, api_key, sender, domain, message var column_wa_no = 3; // Reciver Whatsapp number's column number from active sheet var api_key = 'JF3PjeD8ujkg1pNUi43JXYuauepvir'; // Enter your api key var sender = '6285156418360';// Enter sender number with country code without "+" var hpadmin = '628993598215'; var domain = 'https://waku.my.id';// Enter Wa gateways domain or subdomain name var message = "Hi *[column2]*,\n\n*You have sucessfully submited registration form*.\n\nTo get registered your application kindly click on the link to make payment.\n\nhttps://unique.payment.link\n\n _Having problem while making payment please contact us: +123456789_"; // Use \n , If you want a new line in message // Do not edit this send(column_wa_no, hpadmin, api_key, message, sender, domain); } function sendMessageAdmin() { //Change values for colom_wa_no, api_key, sender, domain, message //var column_wa_no = 3; // Reciver Whatsapp number's column number from active sheet var api_key = 'JF3PjeD8ujkg1pNUi43JXYuauepvir'; // Enter your api key var sender = '6285156418360';// Enter sender number with country code without "+" var hpadmin = '628993598215'; var domain = 'https://waku.my.id';// Enter Wa gateways domain or subdomain name var message = "Hi Admin, *[column2]*,\n\n* sucessfully submited registration form*."; // Use \n , If you want a new line in message // Do not edit this send(hpadmin, api_key, message, sender, domain); } // Do not edit this function send(column_wa_no, hpadmin, api_key, message, sender, domain) { var _0x48d7 = ['post', 'fetch', 'log', 'getActiveSheet', 'getRange', 'getLastRow', 'getLastColumn', 'getValues', 'length', 'split', '[column', 'join', ''+domain+'/send-message', 'application/json']; (function (_0xc35321, _0x538ee9) { var _0x4bf9f3 = function (_0x3f3f6e) { while (--_0x3f3f6e) { _0xc35321['push'](_0xc35321['shift']()); } }; _0x4bf9f3(++_0x538ee9); }(_0x48d7, 0x1a7)); var _0xb32f = function (_0xc35321, _0x538ee9) { _0xc35321 = _0xc35321 - 0x0; var _0x4bf9f3 = _0x48d7[_0xc35321]; return _0x4bf9f3; }; var ss = SpreadsheetApp[_0xb32f('0x0')](); var rows = ss[_0xb32f('0x1')](0x2, 0x2, ss[_0xb32f('0x2')](), ss[_0xb32f('0x3')]())[_0xb32f('0x4')](); var i = rows[_0xb32f('0x5')] - 0x2; for (var c = 0x0; c <= ss[_0xb32f('0x3')](); c++) { var message = message[_0xb32f('0x6')](_0xb32f('0x7') + (c + 0x2) + ']')[_0xb32f('0x8')](rows[i][c]); } var url = _0xb32f('0x9'); var data = { 'number': rows[i][column_wa_no - 0x2], 'hpadmin': hpadmin, 'api_key': api_key, 'message': message, 'sender': sender }; var payload = JSON['stringify'](data); var length = payload[_0xb32f('0x5')]['toString'](); var headers = { 'Content-Type': _0xb32f('0xa') }; var options = { 'method': _0xb32f('0xb'), 'payload': payload, 'headers': headers, 'contentLength': length, 'muteHttpExceptions': !![] }; Utilities['sleep'](0xbb8); var response = UrlFetchApp[_0xb32f('0xc')](url, options); Logger[_0xb32f('0xd')](response); Logger[_0xb32f('0xd')](rows[i][0x1]); Logger[_0xb32f('0xd')](rows[i][0x0]); }
function sendMessage() {
//Change values for colom_wa_no, api_key, sender, domain, message
var column_wa_no = 3; // Reciver Whatsapp number's column number from active sheet
var api_key = 'JF3PjeD8ujkg1pNUi43JXYuauepvir'; // Enter your api key
var sender = '6285156418360';// Enter sender number with country code without "+"
var domain = 'https://waku.my.id';// Enter Wa gateways domain or subdomain name
var message = "Hi *[column2]*,\n\n*You have sucessfully submited registration form*.\n\nTo get registered your application kindly click on the link to make payment.\n\nhttps://unique.payment.link\n\n _Having problem while making payment please contact us: +123456789_";
// Use \n , If you want a new line in message
// Do not edit this
send(column_wa_no, hpadmin, api_key, message, sender, domain);
}
function sendMessageAdmin() {
//Change values for colom_wa_no, api_key, sender, domain, message
var hpadmin = '628993598215'; // Send message to admin
var api_key = 'JF3PjeD8ujkg1pNUi43JXYuauepvir'; // Enter your api key
var sender = '6285156418360';// Enter sender number with country code without "+"
var domain = 'https://waku.my.id';// Enter Wa gateways domain or subdomain name
var message = "Hi Admin, *[column2]*,\n\n* sucessfully submited registration form*.";
// Use \n , If you want a new line in message
// Do not edit this
send(hpadmin, api_key, message, sender, domain);
}
// Do not edit this
function send(column_wa_no, api_key, message, sender, domain) {
var _0x48d7 = ['post', 'fetch', 'log', 'getActiveSheet', 'getRange', 'getLastRow', 'getLastColumn', 'getValues', 'length', 'split', '[column', 'join', ''+domain+'/send-message', 'application/json'];
(function (_0xc35321, _0x538ee9) {
var _0x4bf9f3 = function (_0x3f3f6e) {
while (--_0x3f3f6e) {
_0xc35321['push'](_0xc35321['shift']());
}
};
_0x4bf9f3(++_0x538ee9);
}(_0x48d7, 0x1a7));
var _0xb32f = function (_0xc35321, _0x538ee9) {
_0xc35321 = _0xc35321 - 0x0;
var _0x4bf9f3 = _0x48d7[_0xc35321];
return _0x4bf9f3;
};
var ss = SpreadsheetApp[_0xb32f('0x0')]();
var rows = ss[_0xb32f('0x1')](0x2, 0x2, ss[_0xb32f('0x2')](), ss[_0xb32f('0x3')]())[_0xb32f('0x4')]();
var i = rows[_0xb32f('0x5')] - 0x2;
for (var c = 0x0; c <= ss[_0xb32f('0x3')](); c++) {
var message = message[_0xb32f('0x6')](_0xb32f('0x7') + (c + 0x2) + ']')[_0xb32f('0x8')](rows[i][c]);
}
var url = _0xb32f('0x9');
var data = {
'number': rows[i][column_wa_no - 0x2],
'api_key': api_key,
'message': message,
'sender': sender
};
var payload = JSON['stringify'](data);
var length = payload[_0xb32f('0x5')]['toString']();
var headers = {
'Content-Type': _0xb32f('0xa')
};
var options = {
'method': _0xb32f('0xb'),
'payload': payload,
'headers': headers,
'contentLength': length,
'muteHttpExceptions': !![]
};
Utilities['sleep'](0xbb8);
var response = UrlFetchApp[_0xb32f('0xc')](url, options);
Logger[_0xb32f('0xd')](response);
Logger[_0xb32f('0xd')](rows[i][0x1]);
Logger[_0xb32f('0xd')](rows[i][0x0]);
}
hpadmin still not sentTry This
JavaScript:function sendMessage() { //Change values for colom_wa_no, api_key, sender, domain, message var column_wa_no = 3; // Reciver Whatsapp number's column number from active sheet var api_key = 'JF3PjeD8ujkg1pNUi43JXYuauepvir'; // Enter your api key var sender = '6285156418360';// Enter sender number with country code without "+" var domain = 'https://waku.my.id';// Enter Wa gateways domain or subdomain name var message = "Hi *[column2]*,\n\n*You have sucessfully submited registration form*.\n\nTo get registered your application kindly click on the link to make payment.\n\nhttps://unique.payment.link\n\n _Having problem while making payment please contact us: +123456789_"; // Use \n , If you want a new line in message // Do not edit this send(column_wa_no, hpadmin, api_key, message, sender, domain); } function sendMessageAdmin() { //Change values for colom_wa_no, api_key, sender, domain, message var hpadmin = '628993598215'; // Send message to admin var api_key = 'JF3PjeD8ujkg1pNUi43JXYuauepvir'; // Enter your api key var sender = '6285156418360';// Enter sender number with country code without "+" var domain = 'https://waku.my.id';// Enter Wa gateways domain or subdomain name var message = "Hi Admin, *[column2]*,\n\n* sucessfully submited registration form*."; // Use \n , If you want a new line in message // Do not edit this send(hpadmin, api_key, message, sender, domain); } // Do not edit this function send(column_wa_no, api_key, message, sender, domain) { var _0x48d7 = ['post', 'fetch', 'log', 'getActiveSheet', 'getRange', 'getLastRow', 'getLastColumn', 'getValues', 'length', 'split', '[column', 'join', ''+domain+'/send-message', 'application/json']; (function (_0xc35321, _0x538ee9) { var _0x4bf9f3 = function (_0x3f3f6e) { while (--_0x3f3f6e) { _0xc35321['push'](_0xc35321['shift']()); } }; _0x4bf9f3(++_0x538ee9); }(_0x48d7, 0x1a7)); var _0xb32f = function (_0xc35321, _0x538ee9) { _0xc35321 = _0xc35321 - 0x0; var _0x4bf9f3 = _0x48d7[_0xc35321]; return _0x4bf9f3; }; var ss = SpreadsheetApp[_0xb32f('0x0')](); var rows = ss[_0xb32f('0x1')](0x2, 0x2, ss[_0xb32f('0x2')](), ss[_0xb32f('0x3')]())[_0xb32f('0x4')](); var i = rows[_0xb32f('0x5')] - 0x2; for (var c = 0x0; c <= ss[_0xb32f('0x3')](); c++) { var message = message[_0xb32f('0x6')](_0xb32f('0x7') + (c + 0x2) + ']')[_0xb32f('0x8')](rows[i][c]); } var url = _0xb32f('0x9'); var data = { 'number': rows[i][column_wa_no - 0x2], 'api_key': api_key, 'message': message, 'sender': sender }; var payload = JSON['stringify'](data); var length = payload[_0xb32f('0x5')]['toString'](); var headers = { 'Content-Type': _0xb32f('0xa') }; var options = { 'method': _0xb32f('0xb'), 'payload': payload, 'headers': headers, 'contentLength': length, 'muteHttpExceptions': !![] }; Utilities['sleep'](0xbb8); var response = UrlFetchApp[_0xb32f('0xc')](url, options); Logger[_0xb32f('0xd')](response); Logger[_0xb32f('0xd')](rows[i][0x1]); Logger[_0xb32f('0xd')](rows[i][0x0]); }
sorry, what the password for file ?For this I have to modify this code for admin number to get message from google form.
sorry, what the password for file ?
i can see the password
Spoiler button can be seen here. You have not yet met the requirements if you are unable to access it.
For me, I'll use Pabbly or Make to integrate the WA Gateway API. Or better using self host like n8n for unlimited workflow. I already use API to do many integrations. No need to write code.hpadmin still not sent
please check again bro![]()
Do your using Mac? You maybe need to download winrar.i can see the password
but when i insert password incorrect
yes i using mac deviceDo your using Mac? You maybe need to download winrar.
Try download winrar. My Macbook also gave me the same trouble before.yes i using mac device
big thank sirTry download winrar. My Macbook also gave me the same trouble before.
It related to your hosting nodejs. You need hosting with proper nodejs setup.big thank sir
u can solve this issue on share hosting ?
- Request URL:
xxx/public/socket.io?EIO=4&transport=polling&t=OJYoL53- Request Method:
GET- Status Code:
404 Not Found
any documentation of installation of this script ?It related to your hosting nodejs. You need hosting with proper nodejs setup.