Skip to content

CliffLolo/WhatsApp_Message_Sender

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python Automated WhatsApp Messages Sender

This script sends WhatsApp messages automatically from WhatsApp web application to contacts. The name of the contact, their phone number and the message you want to send to all of them at once are saved in an excel file.

  • The user scans web QR code to log in into the WhatsApp web application.
  • The script reads a message from an excel sheet.
  • The script reads each row and then searches for the contact number in the search box.
  • If the number is found on WhatsApp, it will send a customized message to them otherwise it will read the next row.

Tools Used

  • Python 3.8
  • Selenium Web Driver
  • Google Chrome
  • Pandas
  • Xlrd
  • Selenium

You will also need an excel file that contains 3 columns- the name of your contact, their phone number and the message we want to send to all of them

SetUp

  • Clone this repo

  • Create an environment using :

    conda create -n "env name" python=3.8
    
    
  • Activate the environment using:

    conda activate "env name"
    
  • Install Packages using:

    pip install -r requirements.txt 
    
    

Approach

  • Import Packages

  • Store your session details so that you do not have to be logging in to WhatsApp web every time

  • Initialize chrome and then specify the path to the location where the chromdriver is located. Also, add the options as you initialize chrome. You can also add a maximum wait time for an element to load on a webpage

  • Once chrome is initialized we can now open the WhatsApp web URL

    It will open a WhatsApp web interface which automatically asks you to scan the QR code

  • Now, read the data from the excel file

  • This loop each row and then searches for the contact number in the search box. If the number is found on WhatsApp, it will send a customized message to them otherwise it will read the next row

Resources used

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages