Whatsapp Automation using Python

https://f002.backblazeb2.com/b2api/v1/b2_download_file_by_id?fileId=4_za8a2358db1d7f91b68b30916_f102abcf1291a0829_d20220823_m163820_c002_v0001151_t0026_u01661272700223

We at times tend to forget to wish someone on
their birthday forget to reply to important
messages, in such cases, this WhatsApp
automation enabling, is really helpful. We needn’t
literally type the messages, but things happen
automatically, and the bot does the smart work!!

 

THINGS DONE TO IMPLEMENT
WHATSAPP AUTOMATION:

1. Installed the pywhatkit package and imported
2. The sendwhatmsg() function with some
required parameters is given
3 . Initially the WhatsApp web is opened
automatically
4. Just a minute before, the message gets typed
and, at the exact time, the message is sent to the
a respective person automatically (Nothing is done
manually)

 

GOAL OF THE IDEA:
1. We need not stay awake late night till 12, to
wish someone on their birthday
2. Late night wishes are done by the bot

3. Important replies to the WhatsApp groups are
done
4. Responses to the messages which are quite
serious and prior (to the teacher / boss) are
done automatically

 

As said, only 2 lines of code are important , and
the second line is the most important , where we
use the function, inside the parenthesis, we need
to pass three required parameters

 

1. Mobile number with the correct country
code (say for example: +91) (within ‘’)
2. The message to be sent (within ‘’)

3. Set the time (hour, minutes) (say for
example : ‘12’ , ‘56’)
When the code is run, there will be a display , that
within these many number of seconds,
THE WHATSAPP WEB IS OPENED
AUTOMATICALLY.

 

Just for an instance, if you set the time as 12:56 ,
by 12:55 , the WhatsApp web is opened
automatically and the message gets typed , and
then by 12:56 , the message is sent.

 

These amazing things are done using python , and
the wonderful fact is , to do these , we don’t
actually even write 100 or 105 lines of code , but
only very few.

 

INSIDE THE CODE:
The pywhatkit package is imported
 
Just as another extra line , the sendwhatmsg()
function is used , and inside the paranthesis , 3
parameters are passed 
 
1. The mobile number
2. The message to be sent 
3. The time 

 
With this the whatsapp web is opened
automatically and the message is typed
automatically just a minute before and it is sent
exactly at the time set

 

World-class learning for you        

– Start learning with Easy Shiksha today and get certified        

– Authorized certificate recognized everywhere 

 

 

Leave a Reply