Sending automated WhatsApp messages

WhatsApp by default does not provide an API to send messages, making it difficult to automate things, but where there is a will there is a way.

WhatsApp do support voice commands, and we can program our computers/mobiles to “Say” things programatically, which means, there’s still a way 🙂

Here’s a video of my laptop talking to one of my mobiles, sending WhatsApp message:

Here’s the script I wrote:

sleep 5
set -x #echo on
say -v Veena -a 46 "Okay Google"
sleep 3
say -v Veena -a 46 "send whatsapp message to Gagan Deep Singh"
sleep 7
say -v Veena -a 46 "Only a life lived for others is worth living."
sleep 7
say -v Veena -a 46 "send"

3 thoughts on “Sending automated WhatsApp messages”

Leave a Reply

Your email address will not be published. Required fields are marked *