WhatsApp Bulk Message Sender πŸ“±

A powerful Node.js application for sending bulk WhatsApp messages using the Baileys library.

🌟 Features

  • βœ… Send single message to multiple contacts
  • βœ… NEW! Send multiple messages to multiple contacts
  • βœ… Send individual messages to single contacts
  • βœ… Load contacts from a text file
  • βœ… Load multiple messages from a text file
  • βœ… Automatic delay between messages to avoid blocking
  • βœ… Compact QR code authentication
  • βœ… Progress tracking and error handling
  • βœ… Detailed summary reports

πŸ“‹ Prerequisites

  • Node.js (v14 or higher)
  • A WhatsApp account
  • Active internet connection

πŸš€ Installation

  1. Clone or navigate to this directory
  2. Install dependencies:
npm install

πŸ“ Setup

1. Prepare Your Contacts File

Create a contacts.txt file in the project root with the following format:

9876543210, John Doe
9876543211, Jane Smith
9876543212, Bob Johnson

Format: phone_number, name

  • Phone numbers can be with or without country code
  • If no country code is provided, +91 (India) is assumed by default
  • Names are optional but recommended for tracking

2. Run the Application

node main.js

3. Authenticate

  1. When you run the app, a QR code will appear in the terminal
  2. Open WhatsApp on your phone
  3. Go to Settings β†’ Linked Devices β†’ Link a Device
  4. Scan the QR code displayed in the terminal
  5. Wait for "βœ… WhatsApp connected successfully!" message

πŸ“± Usage

Option 1: Single Message to Multiple Contacts

  1. Run the application: node main.js
  2. Choose option 1 for single message bulk messaging
  3. Enter the path to your contacts file (or press Enter for default contacts.txt)
  4. Type your message (press Enter twice when done)
  5. Confirm to send
  6. Wait for the messages to be sent

Option 2: Multiple Messages to Multiple Contacts

NEW! Send multiple different messages to all contacts in sequence.

  1. Create a messages.txt file with your messages separated by ---:
Hey! This is the first message. Hope you're having a great day! 😊
---
This is message number 2. Just wanted to check in with you!
---
Final message here! Thanks for being awesome! πŸŽ‰
  1. Run the application: node main.js
  2. Choose option 2 for multiple messages
  3. Enter the path to your contacts file (default: contacts.txt)
  4. Enter the path to your messages file (default: messages.txt)
  5. Review the messages that will be sent
  6. Confirm to send
  7. All messages will be sent to all contacts in sequence

Example: If you have 3 contacts and 3 messages, each contact will receive all 3 messages (9 total messages sent).

Option 3: Single Message to Single Number

  1. Run the application: node main.js
  2. Choose option 3 for single message
  3. Enter the phone number
  4. Enter your message
  5. Message will be sent immediately

βš™οΈ Configuration

You can modify the settings in main.js:

const CONFIG = {
  DELAY_BETWEEN_MESSAGES: 3000, // Delay in milliseconds (3 seconds)
  MAX_RETRIES: 3, // Maximum retry attempts
};

Recommended Delays

  • Small batches (< 10 messages): 3-5 seconds
  • Medium batches (10-50 messages): 5-10 seconds
  • Large batches (> 50 messages): 10-15 seconds

⚠️ Warning: Sending too many messages too quickly may result in your number being temporarily banned by WhatsApp!

πŸ“Š Example Output

πŸš€ Initializing WhatsApp Bulk Message Sender...

πŸ“± Scan the QR code below with your WhatsApp:

[QR Code displayed here]

βœ… WhatsApp connected successfully!

πŸ“‹ WhatsApp Bulk Message Sender
==================================================

Options:
1. Send bulk messages from contacts file
2. Send message to a single number

Choose an option (1 or 2): 1
Enter contacts file path (default: contacts.txt): 

πŸ“‹ Loaded 3 contacts from contacts.txt

πŸ’¬ Enter your message (press Enter twice to finish):
Hello! This is a test message.
Thanks!


πŸ“ Message to send:
--------------------------------------------------
Hello! This is a test message.
Thanks!
--------------------------------------------------

Confirm sending? (yes/no): yes

πŸ“€ Starting to send messages to 3 contacts...

[1/3] Sending to John Doe (9876543210)...
βœ… Sent successfully to John Doe
⏳ Waiting 3s before next message...

[2/3] Sending to Jane Smith (9876543211)...
βœ… Sent successfully to Jane Smith
⏳ Waiting 3s before next message...

[3/3] Sending to Bob Johnson (9876543212)...
βœ… Sent successfully to Bob Johnson

==================================================
πŸ“Š BULK MESSAGE SUMMARY
==================================================
βœ… Successful: 3
❌ Failed: 0
πŸ“ˆ Total: 3
==================================================

✨ Done! Press Ctrl+C to exit.

πŸ”’ Security & Privacy

  • Authentication data is stored locally in auth_info_baileys/ folder
  • Keep this folder secure and never share it
  • The application doesn't send any data to third parties
  • All messages are sent directly through WhatsApp's servers

⚠️ Important Notes

  1. Rate Limiting: WhatsApp may temporarily ban your number if you send too many messages too quickly
  2. Legal Use: Only use this tool to send messages to people who have consented to receive them
  3. Terms of Service: Make sure your use complies with WhatsApp's Terms of Service
  4. Spam: Do not use this tool for spamming or sending unsolicited messages

πŸ› Troubleshooting

QR Code Not Appearing

  • Make sure your terminal supports Unicode/ASCII art
  • Try using a different terminal emulator
  • Check your internet connection

Connection Issues

  • Ensure you have a stable internet connection
  • Try restarting the application
  • Delete the auth_info_baileys folder and re-authenticate

Messages Not Sending

  • Verify the phone numbers are in the correct format
  • Check if the recipient has blocked you
  • Ensure your WhatsApp account is not temporarily banned

πŸ“„ License

ISC

πŸ‘€ Author

Suresh

🀝 Contributing

Feel free to submit issues and enhancement requests!


Disclaimer: This tool is for educational and legitimate business purposes only. The author is not responsible for any misuse of this application.