Automate Whatsapp

Aryaman Srivastava
1 min readFeb 18, 2021

--

Many people due to insufficient sleep are not able to stay awake till midnight to wish their loved one’s a Happy Birthday or any other special occasions

To this, a Package named Pywhatkit was developed and since then sending automatic WhatsApp messages through python has never been easier.

In this article, We will cover how to automate WhatsApp messages with just 2lines of code, Yeah you heard that right.

Requirements: pywhatkit 

To run the script, You need to run the following commands.

In Terminal:

pip install pywhatkit

In the Main File:

import pywhatkit
pywhatkit.sendwhatmsg('#phone-number','#message',#Hour,#Min

Replace(refer to above picture)

#phone-number : phone number of recipient 
#message : you want the message to be
#Hour : the Hour(24 hour clock) {for eg: 20,00} if you want it to send message at 8PM
#Min : the Minute if you want to be precise {for eg: 20,45} if you want it to send message at 8:45PM

Hard Requirements:
1) Computer should be left running
2) Script should be running
3) Your WhatsApp should be connected with Whatsapp Web
4) The computer should be connected with wifi

Now you are Good to go, You may refer to My GitHub repo if you face any difficulty

--

--

Aryaman Srivastava
Aryaman Srivastava

Written by Aryaman Srivastava

AI/ML Enthusiast, Developer, Student for life

No responses yet