4.18 out of 5
1046 reviews on Udemy

ChatBots: How to Make a Facebook Messenger Chat Bot in 1hr

We will Create a Parrot Bot Together! This course is a Step by Step Guide in Building a Chat Bot for Facebook Messenger
Stefan Kojouharov
85,437 students enrolled
English [Auto-generated] More
Build a Chat Bot for Facebook Messenger
Learn how to Build a Server
Learn how to Deploy Bot in the Cloud
Learn how to connect a Bot to Facebook Messenger
Learn how to connect Webhooks to Facebook Messenger
Learn how to set up Chatbot in Fb Messenger
Learn how to Add Access token to Chatbot
Learn about Facebook Messenger Chatbot best practices
Learn how to manipulate what a Chatbot says
Intro to Artificial Intelligence in Chatbots
Facebook Messenger Protocol and User Interface Elements

> Top Course on Chatbots on Udemy with 9,000+ Students! Facebook is already reporting that over 40,000 Bots Have Been Built and more are coming. Join the Bot Revolution! <

You will Learn How to Build a ChatBot for Facebook Messenger in 1 hour! You will learn by building 2 bots for Facebook Messenger: a parrot bot and a bot for your favorite football team.

We teach you how to Build a Bot in 2 Ways:

  1. Coding: In the Coding Section, you will be making a Parrot Bot in Node.js using our sample code. 
  2. Without Coding: You will be making a Bot for you Favorite Football Team without any coding.

Anyone can make a Bot using this course! This course was Designed so even a complete newbie could create the Football Team Bot.

What you Need to Be Successful in this Course:

  1. Computer and Internet Connection
  2. Desire to Learn: Passion for Chatbots & Ai
  3. 1 Full Day: Some students can complete this course as quickly as a few hours. If you are new to programing, I suggest you take the day and run through this course content first then replay it and build the Parrot Bot. 

What technologies are Included? For the front end we will be using JaveScript and Node.js for the backend. You can however use anything you want for the backend (php, ruby, etc). Here is a brief summary of technologies used in this course:

  • Heroku Servers to Host and Deploy Bot
  • Node.js & JaveScript to program the Chat Bot
  • Visual Studios as IDE
  • Github for Repository
  • Facebook Page & Developer Account

*Everything you Need will be provided in this course for Free 

You Should take this course if:

  • You have a desire to learn how to make ChatBots
  • You are new to Chat Bot building
  • You want to make a Chatbot Today

This course is ideal for anyone who wants to learn how to make a chatbot from scratch. We will focus on the main components of building a chatbot which includes building the server, adding your code to it, deploying it in the cloud, and connecting it with Facebook Messenger. 

As an intro course to chat bot development, we will briefly discuss Artificial Intelligence and Machine Learning however this topic is too advanced for the course. We will be using javascript and node.js to build our chatbot; however, this is not a course on javascript/node.js or command line.

Quick Intro

How to Take this Course

Zero Coding: Making Bots in 10 Minutes without Coding

What we are Building
Initial Setup
Create CF rockets bot
RSS Feed Integration
Create a menu
Integrate the menu
Setup AI
Subscribe to a weekly digest
Google Search
Chat to Human
Connect to Facebook Messenger

Sharing your Bot

Chatbot Discovery

Chat Bot Discover: How will people find your Bot?

Bots are so new, that there aren't even Bot Stores Yet! Facebook showcases a few select bots, but there is no way to discover, search or find cool new chat bots. Chatbot discovery is in its infancy and if you build a chatbot there is no assurance that an audience will come! As a result you will have to leverage some of the new communities in this space. People are still very excited and it's still easy to capture people's imagination. This is the perfect time to create a chat bot.

BONUS: Making a Parrot Bot in Node.js (For Coders)

Course Into

Welcome to the Course and Congrats!

This is a quick overview of what the course is about and how it is structured. You will learn how to build a server and deploy your chatbot to the cloud. Then we will connect your chat bot to Facebook messenger using webhooks and an access token. Finally, we will learn about Facebook Messenger Cards and other UI/UX features. We will manipuate the cards and play around with what the bot says. Lastly, we will discuss whats possible with Chatbots and Chatbot Discovery.

The Bot that We Will Be Building

Welcome to the Course! Lets Build Your First Chatbot for Facebook Messenger!

This is the intro to the course and we have a lot to cover. First and foremost, incase there is any confusion, we will cover what a chat bot is and what a chatbot does. Facebook Messenger chatbots have certain characteristics and features. We will go over some of the high level components of facebook chatbots. 

What Lecture Covers: 

  • Clarifying what a Chatbot is and what it does on Facebook Messenger
  • Playing with 3 Different Bots on Messenger
  • Go Over the Aha Moment Labs Bot
  • Go Over the Smart Notes Bot that this course is based on
  • Cover the Functionalities of the Smart Notes Bot that we will be using in this course

What you will be building:

  • We are building a Parrot Bot that is based on the repeat function of the Smart Notes Chat Bot. 
  • At the end of this course you will have a Chatbot that Parrots back what you say
  • The bot will have a trigger word that makes the chat bot respond in a different way: with cards!
  • The Cards will be in a Carousel and have a number of Links
Most Important Lesson: Course Workbook

How to Make a Chatbot for Facebook Messenger Workbook PDF

Course workbook is a Step by Step Downloadable PDF Guide that contains all of the important links and code snippets. The workbook makes copying and pasting code possible while also giving additional information about the steps you will be taking.

Here is what is included in the Chat bot workbook:

  • Workbook works in Conjunction with the Video
  • Links to Tools
  • Code Snippets
  • Detailed explanations and Pics
  • Available for Download in Resources
Settingup Your Dev Enviroment

Chatbots: How to Build a Chat bot - Setting up your Developer Environment

This Lecture focuses on what is needed to build chat bots for facebook messenger. We will discuss technology required to build a chat bot from scratch! We will be using javascript to build our bot and node.js as our backend technology. We will make our bot using Microsoft's Visual Studio's Development Environment. 

This lessons covers:


  • Visual Studio Code
  • Node JS

Sign Ups:

  • Heroku
  • Sing Up for Git
Build the Server

Chatbots: How to Build a Chat bot - Building the Server

In this lesson we will build our server! We start by downloading the Heroku toolbelt and all of the Node.js dependencies we will be using. We will also make sure that our npm is up to date!

What this Lesson Covers:

  1. Install of Heroku Toolbelt
  2. Install of node.js dependencies
  3. npm up to date
  4. Start Project folder and initiate npm 

Using node.js is one of the best technologies for making chat bots for messenger. Node.js allows us to pull a lot of functionality into our javascript -which is the front end language of messenger chat bots. Additionally, node.js runs very fast so there isn't a performance issue when it comes to using node for chatbot building. 

Creating your Index.js File

Chatbot Time!

In this lesson we will be creating the main file of your Parrot Bot. The parrot bot function of repeating what a users says is one of the main components of our Smart Notes Bot and was used in making it. We will be using some of the code from that project along with other code, much of which was proved by facebook.

Facebook Developers

Facebook makes code snippets available on their developers site. The code snippets are for building some of the core functionality that is available in messenger. This includes facebook messenger cards, carousel, payment cards, and more. 

The Facebook Messenger Cards for Chatbots have a few main characteristics:

  • Image: optional
  • Title
  • Description
  • Buttons: up to 3 buttons. Can be url or payloada 

Since much of the code is available online via facebook and due to the fact that this is not a course on javascript or node.js we are providing the code in Resources. 

Download the index.js file.

Creating Procfile

Building Chat Bot Server On Heroku requires a Procfile which allows heroku to communicate with your app/chat bot. Building a procfile is very fast and easy and we will show you exactly how to do it. We have also made one available for download in resources.

Commit Code with Git and Send it to Heroku

How to host your Chat Bot in the Cloud:

It's to to Commit Your Chat Bot to the Cloud. We will commit it to Heroku using git and get the chatbot working in the cloud. Once this is complete, your facebook messenger chat bot will be ready for connecting it to facebook messenger. 

There are many ways to commit your Chat Bot to the Cloud, such as AWS, Heroku and other Server Hosts. We have made it easy by using Heroku and git.

Connecting to FB Messenger

How to Connect your Chat Bot to Facebook Messenger

In this lesson we will connect your Chatbot to Facebook Messenger. There are a number of things to consider once you have created an app on facebook's developer portal. We will cover all of the different configuration options and add messenger to our portal. Next we will connect our Chatbot to our App Page which will produce a token.... but lets not get too far ahead. In this lesson your will learn how to connect FB Messenger with you Chatbot.

Setting up your FB Bot

Set up Facebook Messenger For Chat Bots:

You will need to:

  1. Sing up for Facebook Developer Account
  2. Create a Facebook Page for you Chat Bot
  3. Create a New App
  4. Add Messenger 

In this lesson we go step by step on setting up Facebook Messenger for you Chat Bot

Set Up Webhook

Chatbots and Facebook Messenger Webhooks

Chatbots work via webhooks. This is how the Chatbot knows what to say and when to say it. All of its responces depend on webhooks!

In this less you will learn what a webhook is and how to connect your Chatbot to Facebook Messenger using a webhook! There are a number of options and elements that go into setting up webhooks and you will learn about each! 

Using Access Token

Getting and Using your Facebook Access Token for you Chat Bot

After you connect your App with a Facebook Page, Facebook Messenger will generate an access token for you. You will use this token and input in into your index.js file. This token authenticates your app and allows you to connect your chat bot with the corresponding facebook page. 

Chat Bot Access Tokens

Overall they are easy to set up and this lesson makes it even easier!

Trigger Facebook to Send Message

How to Trigger Facebook to Send Messages

So far you have connected your App to Facebook Messenger using a webhook and have gained access to a facebook page using an access token, but what about sending messages?

We need to trigger Facebook to Send Message and we this with a simple Curl command!

In this lesson you will see exactly how to trigger facebook to send message and get your Chat Bot to respond!


This is a Quick and Simple Checklist to make sure that we are up to speed. We insure that each and every step has been taken in building our Chat Bot. We also make sure that our chatbots has been connected to facebook properly using access token, webooks, and curl as well as insuring that the latest code has been pushed to Heroku.

It's Alive! Playing with your new Bot

Time to Play with your Chat Bot! 

In this lesson we begin by playing with your new chatbot! See how it responds to your inputs and play around with the links. Do you see a difference between sending 'hi' and 'yo' to your chat bot?

Manipulating you Chat Bot

Chatbot Responses, UI/UX, and Manipulating What your Bot Says

In this lesson we will explore the different UI/UX elements in the messenger chatbots and how to manipulate what the Bot Says. We will play around with the different trigger words for the chat bot and we will change around the Cards and Carousel. 

Exploring What's Possible

Chatbot User Interface and User Experience

Eventhought the UI/UX seem to be very simple for the Chatbot, there are still many things to consider. We will look at some of the popular chat bots and consider both the value proposition and the user experience. Chat bots can be a great way do certain activities while being very poor at others. User experience and inherent value of conversations will dictate which bots win out in the end.

Using .BOT to Improve Discovery & Trust
You can view and review the lecture materials indefinitely, like an on-demand channel.
Definitely! If you have an internet connection, courses on Udemy are available on any device at any time. If you don't have an internet connection, some instructors also let their students download course lectures. That's up to the instructor though, so make sure you get on their good side!
4.2 out of 5
1046 Ratings

Detailed Rating

Stars 5
Stars 4
Stars 3
Stars 2
Stars 1
30-Day Money-Back Guarantee


2 hours on-demand video
5 articles
Full lifetime access
Access on mobile and TV
Certificate of Completion