1/ Facebook Ads – Messenger
Your chatbot’s basic function is to automatically reply to messages sent to your page via Messenger.
However, the fact remains that most Facebook pages receive little initial traffic. This is why it’s a good idea to encourage users to visit your page via a Facebook Ads campaign.
This type of campaign is similar in structure to the classic “Click to access website” campaign, the only difference is that instead of sending users to a specific URL, you’ll send them to Messenger, by choosing “Messenger” as the destination.
Next, you have two options:
• Automatically send a message to users after they have clicked on the ad• Send an initial message in JSON format, which can include buttons or images
In our case, the chatbot will activate automatically, so the field can be left blank.
2/ Create a basic Chatbot using Chatfuel – no coding necessary
There are several different ways to create a chatbot for Messenger:
• Starting from scratch (well, with just the Messenger API). This takes a lot of time, and you’ll need to know how to code.• Using existing frameworks such as Microsoft Bot Framework, API.AI or WIT.AI. This is a bit faster, but you still need to write some code.• Using a platform like Chatfuel, which is completely free and allows you to create a bot using a simple drag-and-drop interface.
Chatfuel has a classic “SaaS freemium” model – you can create as many chatbots as you wish for free, as long as you don’t exceed 1 subscriber limit (or some other limitation, like messages sent per month).
Customer interaction is key to any successful business. In the past, this often meant having a dedicated customer service team to answer questions and resolve issues. However, with the rise of chatbots, businesses can now automate many of these interactions, freeing up human customer service representatives for more complex tasks.
A/ Write the script for your chatbot
The first thing to do is to write down the script for the conversation that your bot will have with the customer. To do this, create a flowchart for your bot’s conversation, either on paper or using apps like draw.io.
As you can see here, the only objective of this bot is to generate leads for our product Dolead Campaign Manager. It therefore follows a pre-written script and does not have any “artificial intelligence”. If the user enters text that the bot does not recognize, it will simply send the user a default response.
The aim here is to create a Minimum Viable Product (MVP) for your chatbot: give it the essential features that you need, and it can be improved upon in the future.
B/ Enter your script into Chatfuel
We’re only going to use the “Build” feature here, which lets you enter pre-written conversation sequences. The “Setup AI” feature is used to create a (limited) artificial intelligence, while the “Broadcast” feature can send a message to all users, similar to a newsletter.
First, give your bot a name, and connect it to a Facebook page (preferably your company’s page). Now click on the bot, then on the “Build” menu. The bot has two required blocks:
• Welcome message: The first message that a new user will receive when interacting with the bot.• Default message: The message that the bot will use to reply to a sentence that it didn’t understand.
A Messenger bot created using Chatfuel is made up of blocks. Each block has a precise goal: Say hello, see if the user is interested in the offering, get information from leads, send the information to Zapier, etc.
These blocks consist of “cards” that represent a type of conversation or a specific action. You will usually use one card to write a message to a user, another to receive a reply, etc.
For this example, we’ll only be using the following cards:
• Text: to send text to the user.• Typing: to give the impression that the bot is typing a message. This may seem unnecessary, but it’s actually essential, as it “humanizes” the bot.• Quick Replies: to send pre-written replies to the user.• User Input: to ask the user a question and collect their answer.• Go to block: to move from one block to another if certain conditions are met.• JSON API: to send the information to Zapier.
C/ The Welcome block
Let’s start by customizing our chatbot’s “welcome message”. Here’s how I set up the Dolead bot: I included an introductory message to very briefly present the bot to the user, then a “Typing” card, followed by another text message asking the user about his or her interest in automizing AdWords campaigns. I then added two quick reply options, Yes/No.
If users answer “No”, they are sent to a “end of conversation” block. Answering “Yes” continues the conversation, sending the user to a block dedicated to collecting more information.
3/ Create a Zap on Zapier to collect your leads
First things first, if you don’t yet know about Zapier, I highly recommend that you check it out! Zapier is a SaaS web application that lets you automate lots of different things: collecting leads from a webhook, copying appointments from Google Calendar to Todoist or a Hubspot contact to Trello, etc.
To collect our leads, we’ll first need to create a “Zap”. A Zap is made up of a series of tasks that Zapier will automatically run based on a series of pre-defined events. The free version of Zapier lets you use up to 5 Zaps for 100 tasks per month.
To begin, choose “Webhook” as the “Trigger” for your Zap (the task that will launch the Zap). Configure the webhook as a “Catch Hook”. This configuration is set up, by default, to expect a GET or POST request to the URL that Zapier will create for you. And remember, we’ve already configured Chatfuel to send GET requests!
Use the URL that Zapier provides you, and copy and paste it into Chatfuel’s JSON API card. This way, when Chatfuel sends a request to this URL, Zapier will receive it automatically.
Then click on “test” to try out your bot on Messenger. Enter some information, and when the conversation is finished, go back to Zapier. You should have received a confirmation of the test, with the information that you gave your chatbot a few seconds earlier.
Open a new tab and create a new Google Spreadsheet, with columns for the various different lead attributes, and save it on your Google account.
Now create a Google Spreadsheet action on Zapier and select your Google account. Then select the Spreadsheet that you have just created, and add each lead attribute to the corresponding row.
There you go! All you need to do now is confirm and launch your Zap. It will automatically update your Google Spreadsheet with the leads you receive via your bot.