This project automates sending personalized WhatsApp messages using Python, Selenium, and Chrome WebDriver.
It reads contacts from a CSV file and sends messages automatically via WhatsApp Web.
- Keeps your WhatsApp Web login session
- Reads contact names and numbers from
contacts.csv - Sends custom messages automatically
- Skips contacts if an error occurs
- Works with Google Chrome
Make sure you have the following installed:
- Python 3.8+
- Google Chrome
- ChromeDriver (auto-installed with
webdriver-manager)
pip install selenium webdriver-managerβββ contacts.csv # List of contacts (name, number)
βββ main.py # Main script
βββ README.md # Documentation
Your contacts.csv must have the following headers:
name,number
Alice,+911234567890
Bob,+919876543210
-
Clone this repository:
git clone https://github.com/your-username/whatsapp-automation.git cd whatsapp-automation -
Run the script:
python send_whatsapp.py
-
A Chrome window will open β Scan the QR code with WhatsApp on your phone.
-
Messages will be sent automatically β
In send_whatsapp.py, update this section:
# Build personalized message
message = f"""Hi {name},
Thanks for signing up for XYZ
"""You can use f"""Hi {name} ...""" to personalize messages.
- Use responsibly β WhatsApp may block accounts for spammy behavior.
- Add delays between messages to reduce risk.
- Works only with active WhatsApp Web sessions.
π Scan the QR code in Chrome, then press Enter here...
β
Loaded 50 contacts from CSV.
π© Sent to Alice (+911234567890)
π© Sent to Bob (+919876543210)
β
All messages sent!
MIT License. Use at your own risk π