
Below the messages are sorted with the latest one sent/received at the top. We make use of the time at which the record was created to sort the messages. We build a dashboard here listing all the user’s and messages belonging to their conversation. This completes the backend part of our chatbot.Ĩ. This will allow us to keep the messages organised by time.

We’d be storing respective messages under each user’s name along with the time they were sent or received. Now since we managed to send and receive messages, we’ll be saving all the messages into our DynamoDB table. We’ll also have to keep a track of the messages we receive and send especially since our chatbot’s replies are hardcoded so that we may add more replies to user’s messages in the future.ħ. This mostly completes our job but only sending/receiving messages wouldn’t suffice. We can assign a reply to all possible messages we’d be receiving from our users.Ħ. All the messages we send and receive would be through Gupshup’s API. Format of the request would be this way,ĭon’t forget to include your Gupshup’s API-key in the request headers of the post request.ĥ. We reply to user’s message by making a post request to Gupshup’s API using axios. We could add a human touch to our messages by addressing the user by their name like “Hello Smit”.Ĥ. For example, if user’s input message is “Hi” like in the above case, we could respond with a “Hello”. Now depending on the user’s input text, we can write a reply. From Guphup’s API, we receive the user’s name, number and their input text.

But before we begin that, let’s look at the input we’d be receiving at our API Gateway from Gupshup’s API.ģ. Once our AWS resources are setup and checked they are linked and working well together, we are good to write our logic into the lambda function. We’ll start off by writing the serverless yml file which will setup all the necessary AWS resources that’ll be required for our application.Ģ. We’d be using serverless framework to make our jobs easier.


This is where the endpoint for the lambda function that will be responsible for deciding the replies to be sent should be entered. Scroll down to the bottom and click on the “Callback URL”. Gupshup has a sandbox mode, which is a demo environment that can be used to test your app.Ĭreate an app > Provide a unique name > Next > Go to the Dashboard.Ĭlick on the app you just created. Here we’ll be using Gupshup’s API for our job. The latter is the easiest option as they have already taken care of the heavy task of setting up an API for whatsApp. Once you have your WhatsApp business Account, the next important thing is to either setup the whatsApp client API on your own or to go via a Facebook approved partner using their API. There are a whole set of procedures for this set by facebook. The very first thing we’d be needing is a WhatsApp Business Account.
AWS CHATBOT ICON HOW TO
In this post, I’ll walk you through how to build a WhatsApp chatbot on AWS using one of Facebook’s official WhatsApp partner’s API. This gave rise to WhatsApp chatbots, which helps huge businesses to serve their customers. This allows businesses to leverage whatsApp’s platform to offer better service for their customers. But it was only until recently WhatsApp opened its doors to the commercial world into its system through WhatsApp Business API. Almost everyone you know is likely to be found on WhatsApp. It has approximately 2 billion users across the globe. WhatsApp is the most popular messaging platform in the world.
