DEV Community

Prem Kumar
Prem Kumar

Posted on

WhatsApp messages as a Service

This is my idea for the ongoing Twilio Hackathon. A web service that lets you send WhatsApp messages to yourself programmatically, serving as a notification system.

Some Background

This idea struck me when I was setting up a seedbox. The seedbox, which is hosted on a Google Cloud Instance is used to download torrents (Linux ISOs, of course :P) and then upload them to a folder in my Google Drive. The thing was I had no way of knowing that if the downloaded file has been uploaded to the drive or not other than to refresh the Google Drive website regularly or tailing the logs of my seedbox.

I needed some kind of notification service, which can notify me that the upload is complete. The first thing that came to my mind was emails. I can shoot myself an email using some email provider like Gmail which lets me use the service over SMTP. But emails felt clunky to me and it also came with the risk of the email getting buried in spam. The ideal solution for me was WhatsApp! It would be so nice to send myself a WhatsApp message rather than an email for this kind of notifications. And Twilio's WhatsApp messaging API makes this solution very approachable.

Use Case

My use case is simple. I needed a service that I can use to send myself notifications on WhatsApp without much fuss.

Idea

I plan to create a web-service, on which a user can register himself/herself and add some WhatsApp numbers to their account. Then they can use the API to programmatically send messages to previously registered mobile numbers. To make this easier a command-line client would be great. I plan on implementing something like this:

$ wnotify "File Uploaded"
Message sent to the default number.
Enter fullscreen mode Exit fullscreen mode

The user can also create reminders using the WebUI or by sending a message through WhatsApp, which then will be delivered to the user when scheduled.

Some Implementation Details

I started learning Golang recently and I am thinking of using it in this project. For the WebUI, I am going to use ReactJS as I am quite familiar with it.

I would like the message sending logic to be modular. So in the future, I can easily expand it to services other than WhatsApp, like Slack, Telegram, Mattermost, etc.

This service can also be leveraged for reminders etc. Maybe a plugin system makes sense here.

I would love to hear your opinions about it so please let me know what you think about it. :)

PS: This is my first post on Dev, so yay!

Top comments (0)