A local WhatsApp automation application built with Selenium and Electron GUI. This tool reads phone numbers and messages from a CSV file and automatically sends WhatsApp messages through WhatsApp Web.
- Automated WhatsApp message sending
- CSV file support for bulk messaging
- ⏱Configurable delays between messages
- Electron-based GUI
- Local execution - your data stays on your machine
Before running this application, ensure you have the following installed:
- Node.js (v18 or later) - Download Node.js
- npm (comes with Node.js)
- Google Chrome browser (Selenium uses Chrome for automation)
- A CSV file with your contacts and messages
Create a file named whsend.csv in the project root directory with the following format:
WHATSAPP,MESSAGE
919999999999,Hello from bot!
918888888888,Your custom message here
Important Notes:
- Include the country code in phone numbers (e.g.,
91for India) - If no country code is provided, the script will automatically prepend
91 - Make sure there are no spaces in the phone numbers
git clone <repository-url>
cd whatsapp-senderOpen PowerShell or Command Prompt and navigate to the project folder:
cd path\to\whatsapp-sender
npm installThe application comes with default settings in config.js:
module.exports = {
csvFile: "whsend.csv", // CSV file name
minDelay: 10000, // Minimum delay between messages (ms)
maxDelay: 20000, // Maximum delay between messages (ms)
waitAfterLogin: 12000, // Wait time after opening WhatsApp Web (ms)
waitAfterTyping: 3000 // Wait time after typing message (ms)
};You can adjust these delays based on your needs:
- Increase delays to appear more natural and avoid detection
- Decrease delays to send messages faster (not recommended)
The project uses Electron Builder to create a Windows installer (.exe).
npm run distThis will create a Windows installer in the dist/ folder.
- Navigate to the
dist/folder after building - Run the installer (e.g.,
WhatsAppSender Setup.exe) - Install the application
- Launch the installed app from your Start Menu or Desktop
npm start- Launch: The application opens Chrome browser using Selenium
- Login: Navigate to WhatsApp Web and scan the QR code (if not already logged in)
- Processing: The app reads contacts and messages from
whsend.csv - Sending: Messages are sent automatically with random delays between each message
- Completion: Once all messages are sent, the browser closes
- The first time you run the app, you'll need to scan the WhatsApp Web QR code
- Keep your phone connected to the internet
- Make sure WhatsApp is active on your phone
- Test with a small CSV file first (2-3 contacts)
- Don't send too many messages too quickly (risk of account ban)
- Use realistic delays (10-20 seconds between messages)
- Avoid sending spam or unsolicited messages
- QR Code not appearing: Wait for the configured
waitAfterLogintime - Messages not sending: Check if phone numbers have proper country codes
- Browser closes early: Increase delay settings in
config.js - Chrome driver issues: Make sure Chrome browser is up to date
whatsapp-sender/
├── src/
│ ├── openChat.js # Opens WhatsApp chat
│ └── message.js # Types and sends messages
├── config.js # Configuration settings
├── index.js # Main application logic
├── start.cjs # Entry point
├── package.json # Dependencies and scripts
├── whsend.csv # Your contacts CSV file
└── README.md # This file
# Install dependencies
npm install
# Run in development mode
npm start
# Build Windows executable
npm run dist
## License
[Add your license here]
## Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
## Support
If you encounter any issues or have questions:
1. Check the Troubleshooting section above
2. Review your `config.js` settings
3. Ensure your CSV file is properly formatted
4. Make sure all prerequisites are installed