Building Facebook Messenger (or other) Bot for leads

  1. Create a lead rotation using this documentation: Build a lead form for your website

  2. We are going to use Home - Flow XO for our Chat Bot, but it is possible to use other chat bot services if they allow to send gathered data with HTTP requests.

  3. Sign up for Home - Flow XO

4. Create a “Blank Flow”:

5. Click “Start by adding new trigger” and select “Catch-all”:

*** Note: This is just a simple example. The “Catch-all” trigger is going to be activated immediately after user opens the business page for the first time. Probably it is better to use other trigger “New Message” and assign key words inside (e.i. “Apply”, “Register” etc), so when client send one of that messages the survey will be activated.

6. After clicking “Next” you are able to indicate what bot/bots are going to use this trigger (in case you are going to have many bots).

7. Let’s create actions to gather needed information from user:

8. We need the similar action for Last Name:

9. It is better to add a validation for an Email action:

10. Add a Phone action in the same way, we should get this flow:

11. Now we should add an action to send the gathered from client data to CostCertified:

12. Put a Name,

take a lead rotation URL from the first step

and put it into Request URL field. Set Method to POST, Content Type to JSON and add four data parameters:

  • user_fname

  • user_lname

  • user_email

  • user_phone

Click on “fish”-sign for each parameters and find corresponding Answer field from an opened popup.

Click “Next”.

13. After client’s data sent you might want to show him a success message. Click “Add Action” (plus-button) and select “Send a Message”

Give a name and put the best message:

Click Next. Now the flow is almost ready and we can test it.

14. To test the flow we need to enable it. Click “Off” (right top page area), so the flow get “On” status:

Click green message button (right bottom page area). Test messenger appears.

15. You can test your flow with test data, but keep in mind the test data is going to be sent to CostCertified as your new Lead.

16. Now we need to create a bot that is going to use the created flow and be connected to Facebook page.

To do that you need:

  • Facebook account

  • Facebook page (you business Facebook page) created with the account

Create a bot:

17. Select “Messenger”:

** Note. You can use other messengers like Slack/Telegram/etc to use this bot

18. Put a name for the bot, Welcome Text (optional), other fields. It is useful to click and read the “detailed instructions” for creating you Messenger bot.

Click on “Login to Facebook”. Depends on you logged in or not it is going to ask you to select your Facebook account and your business page where the bot will be connected to. Also it is going to ask for permissions.

After permissions were granted you should be able to see and connect your Facebook Page:

Click “Next” and then “Done”.

Congratulations! You messenger bot is ready, connected to your business page and waits to gather leads for you.