DEV Community

Cover image for WhatsTer - The ChatBot I built for TwilioHackathon
Aditya Mitra
Aditya Mitra

Posted on

WhatsTer - The ChatBot I built for TwilioHackathon

I really felt that the post for the twiliohackathon was insufficient and hard to understand. My friends told that they liked the bot and the webapp. They encouraged me to write full blog post on it. Since I had very less time to write a full article on it before the hackathon was to end, I wrote it now. (Yeah, I finished completing the project it in the last moment! :P)

I am not good with emojis but I have tried used them !

What is it?

brand

WhatsTer is a Chat bot created using Twilio's Messaging API for Whatsapp.

This bot is very useful when you want to :

  1. Synchronize your data between your whatsapp messenger and a personal account of yours (where you can view them)

  2. Want to know what's there in an image (Image Recognition)

  3. Mail to any email recipent from from your WhatsApp Messenger

  4. Laugh at some jokes!

GET STARTED

To start using Whatster, first you need to join my twilio sandbox.
You can easily do this just by clicking here or by texting join decide-wish to +1(415)523-8886.

Now type hi to see what it can do for you.

what it can do for you

Now type login to get an OTP from the bot.
Use this OTP to login to the whatster account. Visit the whatster website.

whatster website login page

You will be logged in!

Important. The above steps are very IMPORTANT and highly recommended before you start sending messages to the bot

How to use it?

I will explain all the functions this bot can perform one by one.

Saving messages and Getting them

If you send messages to this chat, it will be automatically saved to your account.

Important - *You have to login at least once to the Whatster App to start saving messages*

pssst! Quick Start---> Click Here

Type in the chat

demo 1

Get it in the website

demo 2

It even works when you FORWARD any message or media to it.

demo 3

It is saved in Whatster

demo 4

You can click on the file to get a link of it and preview it in a new tab.

demo 5

Image Analysis

image recognize

pssst! Quick Start---> Click Here

The Whatster bot enables you identify a lot of items in an image just by sending or forwarding it. It uses Clarifai for image recognition.

Start by just typing clarifai and then sending an image.
The bot will do the complex image analysis for you.

image analysis

Mail

command

pssst! Quick Start---> Click Here

Yeah! The bot can send a mail for you.
I have used Nodemailer and Twilio's SendGrid to send emails.
Just type mail to get started. It will also send you a couple of instructions which you can refer as a help.

sending it

Now just type the email-address where you want the email to be sent and in the next line type your message.

You can even send a file (of any type) and along with a message (not necessary) to the recipent.

mailing it

The email sent from whatsapp chat will be recieved to the address you mailed to. Just ask the sender to open up the inbox to see it.

receiving it

The hidden part which is scratched off in those images was my friend's email-address. However, it will be the recipent's email address where you want to send the mail.

Jokes

joke command

pssst! Quick Start---> Click Here

For fun, I added this feature ;P.

Just type joke to the bot to have some laugh.
Don't forget to forward that joke to your friends.

joke

Where did you get these ideas from?

Before I finish writing this post and you reading it, I want to tell you how I came up with these ideas.

Problem is the mother of all inventions.

The Saving Messages Service

I got this idea from one of my friends who used Telegram Messenger. That was one of his reasons why he liked Telegram over Whatsapp.

You see I like Telegram because there is a saved messages chat where I can just forward my messages or media or send them in directly which is in sync with my Telegram account.

You guessed it ... I came up with this idea to include such a functionality in Whatster where anyone can forward messages to this chat and get their messages saved in to their account.

  • Thanks Saurav *

The Image Analysis service

Actually, this was a problem which I faced. I sometimes could not interpret properly what items were present in the image or what was the image focusing on when someone sent me some image over Whatsapp.

I thought that I will resolve that problem with Whatster

Now, it is really easy for me to interpret those difficult images.

The Mail Service

This was a problem faced by aunt. Whatsapp is most widely used messenger. Some of my relatives only know to operate Whatsapp (besides phone and sms). So, when somebody asked my aunt :

Sujata, email that doctor's report to Rakesh's work-address so that he can tell what exactly the doctor meant.

By the way, Rakesh was their family friend and doctor by profession

My aunt used to call me to do the email for her. Now, I added the mail service to Whatster so that she can easily send an email.
Believe me, now she sends me an email daily (with a good morning message!).
Who said my aunt could not send an email?

The Joke Service

I just did not like open up the browser and search for a joke to make my group laugh. I made Whatster do that for me.

Final Words

I really liked creating Whatster.

Please show this post to do your family and friends so that they too can use Whatster.
I have really designed it keeping in mind that is user friendly and does not requires minimum technical knowledge to use it.

I am open to edits and suggestions to this post and for Whatster.

I encourage you to contribute to my repo to Whatster

GitHub logo aditya-mitra / whatster

Twilio Hackathon 2020 Using Twilio Whatsapp API

WhatsTer - WhatsApp Bot

Actions Status

Live at https://whatster.web.app

Get Started

Send join decide-wish as text message to Twilio's number [+1 (415) 523-8886] or click here to start the bot.

About

WhatsTer is a User-Friendly WhatsApp Chat Bot created using Twilio's Whatsapp API. This bot enables you to do image-recognition, send emails with or without attachments to any receiver, sends you jokes, and most importantly, it saves any message or media that you send (or forward) to it, in a database which is accessible on the WhatsTer website.

How it works

When you send a message to the bot, it checks for a command.

The commands are as follows. Follow instructions received via WhatsApp text -

Type <login> 'to log into Whatster to read messages and media sent in this chat.'

Type <mail> 'to send an email to any email address of your choice with or without an attatchment.'

Type <clarifai> 'to

If you face any issues, please do say it the repo or by clicking here

Just so that this post does not get longer, I will explain the setup and the local development in another post. I will also explain all the technical stuff and the technologies I used in that post. [Coming Soon]

Thanking

I really thank Twilio for conducting this awesome hackathon and giving all the participants an oppurtunity to contribute.

I really thank Dev.to where I always learn some awesome stuff from fellow developers.

I also thank my friend Aditya Dalmia who helped me in the last moment and without whose help I really would not have been able to complete this project on time.

Lastly, I want to thank you for reading my post and using Whatster.

Top comments (0)