How to automate a message to Whatsapp via Python?

In this blog we are going to see how to automate a message on Whatsapp via python.

Texting at any time is a hectic task. We can make the use of python to perform this task and get our work done in a very short time.

Let us look in this blog how to automate a message.

Automation of message.

The steps to be followed are:

Step 1: install pycharm on your system from the link given.

https://www.jetbrains.com/pycharm/

Step 1

Step 2:

Step 3: Download and install the IDE.

Step 4: Now first we need to create a new project

And then name the project.

Now we need to open the pycharm terminal and install pywhatkit in it.

install:
    pip install pywhatkit

And now after the installation we can go ahead and start our automation process.

Now we need to import pywhatkit in it.

Code:
 import pywhatkit
   Now we need to make the use of pywhatkit and send the message:
   pywhatkit.sendwhatmsg("phone-number", "The message", hours, minutes)
....
We need to enter the phone number with the country code or else the compiler will pop error.
Now the output and full code is:

import pywhatkit
pywhatkit.sendwhatmsg("+xyz", "This is prequelcoding.in", 13, 49)
And run this code the output would be:

After the code is successfully compiled you will be redirected to your whatsapp web.

For a visual clarity refer to:

Automation of message

This is it for this blog if you like this blog do share and subscribe to us for more interesting content.

How to automate a message to Whatsapp via Python?
Scroll to top