Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

shittybin/auto-msg-whatsapp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 

Repository files navigation

WhatsApp Message Automation with Python + Selenium

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.


⚑ Features

  • 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

πŸ“¦ Requirements

Make sure you have the following installed:

  • Python 3.8+
  • Google Chrome
  • ChromeDriver (auto-installed with webdriver-manager)

Install dependencies

pip install selenium webdriver-manager

πŸ“‚ Project Structure

β”œβ”€β”€ contacts.csv         # List of contacts (name, number)
β”œβ”€β”€ main.py     # Main script
└── README.md            # Documentation

πŸ“ CSV Format

Your contacts.csv must have the following headers:

name,number
Alice,+911234567890
Bob,+919876543210

▢️ Usage

  1. Clone this repository:

    git clone https://github.com/your-username/whatsapp-automation.git
    cd whatsapp-automation
  2. Run the script:

    python send_whatsapp.py
  3. A Chrome window will open β†’ Scan the QR code with WhatsApp on your phone.

  4. Messages will be sent automatically βœ…


πŸ’¬ Custom Message

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.


⚠️ Notes

  • Use responsibly β€” WhatsApp may block accounts for spammy behavior.
  • Add delays between messages to reduce risk.
  • Works only with active WhatsApp Web sessions.

βœ… Example Output

πŸ‘‰ 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!

πŸ“œ License

MIT License. Use at your own risk πŸš€

About

python code for automatic msg sender

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages