Auto Reply to WhatsApp Messages with AI

By Wajahat Updated on

In this tutorial, I will show you how to automatically reply to messages on WhatsApp. I will show you how we can reply to keywords and how you can set up AI for automatic WhatsApp replies. The AI is trained on your own data, such as your website and documents of your business.

For this tutorial, I will use a software business as an example. I will guide you step-by-step, so I will show you:

  • What chat automation tool you should use
  • How you can connect it to any phone number on WhatsApp
  • And how you can create your own WhatsApp automations

I will even give you the template for free, so you can just copy-and-paste it and don’t have to build it yourself.

Let’s dive in!

How To Set Up Auto Reply On WhatsApp?

Setting up auto-replies for WhatsApp is incredibly simple. In fact, all you have to do is follow four simple steps:

Step 1: Buy A New Phone Number

The first step you should do is buy a new phone number.

To automatically reply to messages on WhatsApp, you need to connect your phone number to a chat automation platform.

And even if you’ve used WhatsApp Business in the past, it’s recommended (by WhatsApp) to buy a new phone number.

This is because there are often problems when connecting an existing WhatsApp number to a chat automation platform.

So you need to buy a new number, and this phone number should be able to receive text messages because we need to verify the number later on.

And if you want to get started quickly, I recommend buying an eSim. An eSim is a digital sim card that you can buy online and use within a couple of minutes (if your phone has this feature).

Step 2: Create a Free ManyChat Account

Moving on to the second step, you need to create a free Manychat account. It’s a chat automation platform that we’ve been using for the past four years for all our clients simply because it’s:

  • Easy to use – you can start without any chat automation experience
  • No code – you won’t have to write a single line of code
  • Cheap – there’s a free plan and their paid plan starts at $15/month

To create an account, just click on the button below:

Create Free Manychat Account

Now, just click on Get Started Free:

manychat-get-started-free

Choose WhatsApp:

Get started with WhatsApp as your first channel with manychat
And sign in with your Facebook account:

Continue with your Facebook account to log in to Manychat
When you log in through Facebook, your Manychat account will be automatically created.

Account dashboard of ManyChat

Step 3: Connect Your Phone Number To ManyChat

The next thing you need to do is connect your phone number to Manychat. For this, click on Settings, select WhatsApp and click Connect:

Connect WhatsApp number to Manychat

Now, click on Connect My Own Number:

Connect my own number option on ManyChat

When you do this, a new tab will open, which will go to Facebook.  Here, you need to click on Continue:

Continue with your Facebook account

Click on Get started:

Connect Manychat to a Phone Number for WhatsApp

The next thing you need to do is select your Meta Business Account. If you have a Facebook page, then you already have a Meta Business Account.

If not, you can create one here. But remember, the account name must be the same as your actual business name. Now, you can either create or select a WhatsApp Business account. I already have one, so I’ll use that for this tutorial.

So select your Meta Business account and click on Next:

Add Business Information for your WhatsApp account

Then, you need to select your WhatsApp Business Account or create a new one.

If you create a new one, you will need to add business information. Here, it is important that the name of your WhatsApp Business account is exactly the same as the official name of your business.

So you can select your WhatsApp Business account and create a create a new WhatsApp Business Profile:

Choose or add a WhatsApp Business account

Next, fill in the information for your WhatsApp Business Profile and click on Next:

Add a WhatsApp Business Profile

Important: This information will also be shown on your profile in the WhatsApp app. 

After this, you’ll need to fill in your phone number and choose whether you want to get the verification code on a call or through text. You can just fill in the phone number you bought before and choose for Text Message:

Verify your WhatsApp Phone number

Then, Facebook will send you a verification code via SMS and you can just fill that in.

And that’s it! You connected your Manychat account to your WhatsApp phone number!

To check if it’s connected, go back to Settings and then choose WhatsApp. Here, you should see that the Number Status is Connected and the Account Status is Approved:

WhatsApp connection status for ManyChat

If it’s not, repeat the process we went over in step three again.

Step 4: Auto Reply To Greeting Messages

Once your phone number is successfully connected to Manychat, you can create the content for your WhatsApp chatbot.

The first thing we’re going to do is create an automated greeting message. So, when someone reaches out to you on WhatsApp, the chatbot will automatically greet them.

To create this message, go to Automation and click on New Automation:

Add a New Automation in Manychat

Now click in the top right corner and rename the chat flow. For this tutorial, we’ll call it WhatsApp Greeting Message.

Rename automation in ManyChat

In Manychat, each automation consists of a trigger and the content of the flow. To set up the trigger, click on Add Trigger.

ManyChat Add Trigger button
Then, choose WhatsApp and click on User sends a message with a Keyword:

Trigger flow in WhatsApp if someone sends a message with a keyword

Now, click on +Keyword to add different options. You can add words like Hi, Hey, Hello, and more. Once you’ve done that, click on Create:

Add a WhatsApp keyword for greetings with Manychat

The next step here is to create the actual greeting message. To do this, go over to the content flow and choose WhatsApp.

Choose first step WhatsApp option for ManyChat automation

Here, you can add the actual text. But, when you’re creating your greeting message, remember you need to:

  1. Greet the user.
  2. Tell them they are talking to a chatbot.
  3. Let them know if the chatbot doesn’t know the right answer, they can be connected to a real support agent.
  4. Ask their question and tell them what they need to do.

Here’s the example message I created for this tutorial:

Hey! 👋 I’m the Mailerlite Assistant.
I will try to answer your question. If I don’t know the answer, I can always connect you with a support agent.
What is your question about?
Just type in your question below 👇

Now, all you have to do is click on the Set Live button, and your automation is working!

Set live option WhatsApp greeting message on ManyChat

Auto Reply to Keywords on WhatsApp

When we send an automated response to the greeting, the user will reply to it. To keep the conversation going, we’ll need to create another automation. For this tutorial, let’s assume the user is asking for the return policy of MailerLite.

We can go back to Automation and click on New Automation:

Add a New Automation in Manychat

Add a New trigger to the Automation. Again, choose here for User sends a message with a keyword:

Trigger flow in WhatsApp if someone sends a message with a keyword

Then set this keyword to Message contains return or refund.

And you must add a Message Condition and set this to Message contains policy, so it looks like this:

Trigger option refund WhatsApp keyword in ManyChat

So if someone asks a question about the return policy or refund policy, this automation will trigger.

And in this automation, we will add a WhatsApp Message and then give the answer to their question:

We are required to provide a refund only if we terminate our Services to you without cause before the end of a year for which you have paid. There is no other circumstance in which you will be entitled to a refund from us.

For this example, I just copied the response from the MailerLite Knowledge Base:

WhatsApp refund policy message template in ManyChat

And then after you answer their question, you always want to ensure a good customer experience.

So after you asked it, you must ask: Did I answer your question?

Then you can add two buttons named:

  1. Yes, it does!
  2. No, I need help

WhatsApp action button in ManyChat

Now, continue making the automation flow. If the user is satisfied with the response and answers “Yes,” your next message should thank them. If they say no, your next message should say something like, “No problem, we will now connect you to one of our support agents.”

WhatsApp refund policy automation preview in ManyChat

This is another great feature of Manychat. Manychat has a built-in live chat you can use to transfer conversations to humans.

Before I tell you how to connect a user to an agent, you need to know that in Manychat there are two types of conversations:

  1. Closed conversations – handled by your chatbot
  2. Open conversations – handled by support agents

To assign a conversation to an agent, add a Next step and choose for Action:

Add an action to the WhatsApp refund policy automation.

Now, choose the Live Chat option, and then click Mark conversation as Open.

Add the action Mark Conversation as Open in Manychat

Then, you should add another action, click on Live Chat again, and now choose Assign conversation to assign it to a specific team member.

Add the action Assign Conversation in Manychat

And then you can choose the support agent (or group of support agents) you want to assign to the conversation:

Assign the conversation to a specific team member or group

After that, add another action, choose for Live Chat and then Notify Assignees to send a notification to the team member:

Add the Notify Assignee action in Manychat

Then, click on Set Live, and your automation will be working:

Preview of Refund Policy automation in WhatsApp

Auto Reply to WhatsApp Messages with Custom AI

Up until now, we set up automated replies using keyword triggers. But let’s turn things up a notch and see how we can use AI trained on our own data to respond to user queries.

Manychat doesn’t have built-in AI, so that’s why we are going to use Chatbase. It’s an AI tool that you train on your own data, like your website or documents. And it’s only $19/month, which is extremely cheap.

If you haven’t used it before, just click the button below to create a Chatbase account:

Create Chatbase Account

In Chatbase, I created a chatbot that is trained on a part of the Mailerlite Knowledge Base. So if I go to Sources, you can see that it’s trained on these URLs:

Whatapp Chatbase sources

Once it has been trained on the data, you can immediately start talking to it:

Example of a chatbot in Chatbase trained on the Mailerlite knowledge base.

 

So what we need to do now, is that every time someone asks a question in WhatsApp, we need to send the question to Chatbase.

Then, Chatbase gives the answer and we are going to send back that answer to Manychat.

And to do this, we are going to use Make. Make is an integration platform you can use to connect two applications without any code. And in this case, we use it to connect Manychat to Chatbase.

Just click on the button below to get 30 Days Make Pro for Free:

Get 30 Days Make Pro Free

This might sound like a lot, but I actually have a step-by-step tutorial on how you can set up the integration between Manychat and Chatbase via Make:

To integrate the two, in Manychat, go to Settings, then click WhatsApp. Now hover over to default reply, then click Select Existing.

Default reply for WhatsApp in Manychat settings

The Default Reply is the automation that will be triggered if someone sends a message and no other automation is triggered in Manychat.

Then, select the WhatsApp Default Reply automation. I’ve already created this automation before, and it’s part of the free template, I’ll share with you. So you can just use that. Once you’ve installed my template, click Pick This Automation.

WhatsApp default reply automation options on ManyChat

Here’s what the automation looks like:

WhatsApp default reply automation preview on ManyChat

There are two important things to remember here. First, when you click on the trigger, make sure that the Default Reply trigger is set to every time:

WhatsApp default reply trigger on ManyChat

This makes sure that every time we get a message on WhatsApp, it’s sent directly to Chatbase. Next, you can see that the last user input is saved to a custom field in Manychat (called “Chatbase – Question”).

This input is the question we get from customers on WhatsApp. Then, the question to Chatbase through Make. Here’s what the integration looks like in Make:

Manychat and Chatbase Integration via Make.com

This integration works in four steps:

  1. Make gets the question from Manychat.
  2. It sends the request to Chatbase.
  3. Then it updates a custom field in Manychat with the answer from Chatbase.
  4. After that, the answer is sent back to WhatsApp by sending a Manychat automation (“Send a flow” in the image above)

And the flow we will send to the user is the “Chatbase – Answer” flow in my template:

The Chatbase answer automation for WhatsApp in Manychat

And that’s all!

Now, you have a chatbot that can send greeting messages, reply to simple queries, and use AI for responses.

All that’s left to do is click Set Live. Here’s how it would look in WhatsApp:

Preview of WhatsApp greeting auto reply

Free Template for Automatically Replying to WhatsApp Messages

And that’s how you automatically reply to messages on WhatsApp!

If you want to get started quickly, just fill in the form below and download my FREE template:

 

Your Turn!

That’s all it takes to set automated replies on WhatsApp.

How are you going to use WhatsApp chat automation?

Let me know in the comments below!

Leave a Reply