https://github.com/ajay-develops/whatsapp-bot
A WhatsApp bot extension to send messages
https://github.com/ajay-develops/whatsapp-bot
whatsapp-bot
Last synced: 3 months ago
JSON representation
A WhatsApp bot extension to send messages
- Host: GitHub
- URL: https://github.com/ajay-develops/whatsapp-bot
- Owner: ajay-develops
- Created: 2023-06-17T13:52:45.000Z (about 3 years ago)
- Default Branch: multi-user-baileys
- Last Pushed: 2023-08-28T18:40:40.000Z (almost 3 years ago)
- Last Synced: 2025-09-15T00:54:53.000Z (10 months ago)
- Topics: whatsapp-bot
- Language: JavaScript
- Homepage:
- Size: 179 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# whatsapp-web.js-automatic-messaging-solution
a custom solution to send automated whatsapp messages using a CRM or POST requests.
# development commands
## To install the chrome extension
- `cd client`
- `npm i`
- `npm run dev`
- goto `chrome://extensions/`
- enable `developer mode`
- click `load unpacked`
- navigate to the `client` folder and select the `dist` folder
## To start the server locally
- `cd server`
- `npm i`
- `npm run dev`
- send message url - `http://localhost:8080/send-message`
- request type - POST
- JSON payload -
```json
{
"customData": {
"secret":"the secret key generated and authenticated by the chrome extension",
"phoneNumber":"the phone number you want to send message along with country code",
"message1":"the message you want to send",
"message2":"you can send multiple messages and the server will randomly choose one messsage and send it"
}
}
```
# production commands for ubuntu
```bash
# update ubuntu
sudo apt update
# install nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
source ~/.bashrc
# install node
nvm install --lts
# installing the pm2 service
npm install -g pm2
# delete the logs after a certain amount of time
pm2 install pm2-logrotate
# clone this repo
git clone https://github.com/templar-ajay/whatsapp-bot.git
cd whatsapp-bot/server
npm i
```
Start the server
```bash
# start the process using pm2
pm2 start server.js --name server
# check logs of the process
pm2 logs 1
# here 1 is the id of the process
```