How to send Bulk message in whatsapp using Java script

Charlie
3 min readMay 21, 2020

--

Hello Every one in this tutorial, I am going to tell you about how to send Bulk Messages to particular user or group in whats-app using java Script.

First of all hoe have to open whats-app web in your web browser.

now you have go to inspect element — for that right click and select “inspect element” in menu. or you can use shortcut key to directly open inspect element window in web browser

for — chrome: use this shortcut key to open inspect element “F12” or “Ctrl+Shift+I”

for — fire fox: use this shortcut key to open inspect element “Ctrl + Shift + C”

important : whom you went to send the bulk message using this script. you have to display his/her name on screen

I am using chrome web browser to do this.

Whats-app Message Broadcast
web whats-app

after scanning Qr code. “web.whatsapp.com” open your whats-app in web browser

Send Message to this group

after opening this in your web browser nor you have go to inspect element, here I am using Chrome browser so simply press key “F12” and it will open the inspect element window.

and go to Console tab — in inspect element

If you went to go directly console tab in inspect element Press this key “Ctrl+Shift+J”

Note : this is only for chrome users. I test It.

Open console Window

Here i am sending message to “Test” Group. So in my case this is display in the screen. If you went to send message To that group or person that is down in your chat. so scroll down to that chat and After that you have to open the inspect element Window.

Now past this Script in the Console Window.

<script>

function simulateMouseEvents(element, eventName)
{

var mouseEvent = document.createEvent(‘MouseEvents’);

mouseEvent.initEvent(eventName, true, true);

element.dispatchEvent(mouseEvent);
}

name = “” //You have to Specify name of the user you want to do this prank ☺ ☺ ☺ ☺

simulateMouseEvents(document.querySelector(‘[title=”’ + name + ‘“]’), ‘mousedown’);

function startTimer()
{

setTimeout(myFunc, 3000);
}

startTimer();

var eventFire = (MyElement, ElementType) => {

var MyEvent = document.createEvent(“MouseEvents”);

MyEvent.initMouseEvent

(ElementType, true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);

MyElement.dispatchEvent(MyEvent);
};

function myFunc()
{

messageBox = document.querySelectorAll(“[contenteditable=’true’]”)[0];

message = “My Message”; // Replace My Message with your message

counter = 100; // Replace 5 with the number of times you want to send your message

for (i = 0; i < counter; i++) {

event = document.createEvent(“UIEvents”);

messageBox.innerHTML = message.replace(/ /gm, ‘’); // test it

event.initUIEvent(“input”, true, true, window, 1);

messageBox.dispatchEvent(event);

eventFire(document.querySelector(‘span[data-icon=”send”]’), ‘click’);

}
}
</script>

In script you have to specify the name of the group or person in name variable and Replace the Massage with your Message. And Also specify the count “How many time you went to send Message to that Group or Person”

Message Send to Test Group

You can send this king of bulk message in whats-app using above given java script

note : Don’t Miss use this kind of script this is only for educational purpose

Important : If your whatsapp is updated then this is not working with new update it will show you an error message in the console tab. But don't worry i wiil write story to overcome this error or provide another solution.

--

--