Automate WhatsApp messages using python in 2 lines of code

Hello everyone,  in this video we are going to make a WhatsApp automation script. so you can send WhatsApp msg as scheduled.

Sometimes we cant wish our close people on their birthday or other special occasions at the right time. so there you can use the help of python. he will do that for you. it will open your browser and go to WhatsApp web and send the msg to your loved one at the right time. is that great right.

so I am telling you that can be done within 2 lines of code. Yes, you heard me.

so first You need Python and the PyCharm IDE on your pc  (or you can use any of your IDE) or download that.

then we have to include our dependencies for our project. Open your terminal and download the dependency

pip install pywhatkit

after installing this we can open our code editor and lets write this code

import pywhatkit
pywhatkit.sendwhatmsg("+91123456789","test",16,44,20) #number with country code

I will explain the function.

pywhatkit.sendwhatmsg(“phone_num “,”message “,time_hour, time_min, wait_time)

Okay, that’s done. now, what if you want to send an image ?? 

Let’s make that ..

import pywhatkit
pywhatkit.sendwhats_image(phone_no="+918129505560", img_path="C:/Users/Ajith/Pictures/pic.jpg", caption="test message", wait_time=15)

we cant add the exact time for sending images but we can add wait time from now.

 

Yes, now you simply schedule the messages and get into your bed watch Netflix or prime to relax. the python will do the rest for you.

Don’t too much trust him.  😛 

 

 

Share with your friends:

Ajith Jojo Joseph

Self taught, dedicated young entrepreneur with many licensed products under his sleeve. Passionate about technology, business and excellence in general.

HTML Form to Email Using JavaScript and SMTP server 🚀

Hello Everyone, 🙋‍♂️ In this tutorial, we are going to look at how to send emails from HTML Form to […]

22 September, 2021

How to make pretty URL in PHP using .htaccess

Hello Everyone, Here in this tutorial, you will learn How to make a pretty URL in PHP using .htaccess. and […]

18 September, 2021

Submit Form Without Refreshing Page PHP and Javascript

Hello Everyone, In this tutorial, we are going to learn, How to submit a form without reloading. yeah, that’s so […]

HTML from to Email using SMTP in PHP with Source code

Hello Everyone, In this tutorial, I am going to teach you how to send an email from an HTML form […]

16 September, 2021

Newsletter

Subscribe to our weekly Newsletter and stay tuned.


Free PHP Invoicing Software

Gmax CRM Lite is an Invoicing and project management tool for small businesses, features including client management , invoicing , quotation and project management

Download for free