GithubHelp home page GithubHelp logo

leonardoleo / hotelbot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from waylo-api/hotelbot

0.0 1.0 0.0 1.39 MB

Create a hotel booking chat bot in 10 minutes

License: Other

JavaScript 100.00%

hotelbot's Introduction

HotelBot built using the Waylo API

You can clone this repo to create your own hotel booking Facebook Messenger chatbot in 10 minutes. The hotel bookings are provided by Waylo API and you earn a share of the revenue.

If you want to test out a HotelBot first, try Waylo Bot

Build Your Hotel Booking Bot and Monetize

Creating this version will give you a Facebook Messenger chat bot.

Demo

You can read our FAQ to learn more about the monetization. The average earnings per booking from your bot is ~ USD 10.

How is this possible in 10 minutes?

This is an example of bot to bot communcation. You only set up a simple FB bot with a button. Waylo's API takes care of the Natural Language Understanding, getting access to inventory and handling payments.

Requirements

Edit 5 parameters in config/default.json.

```
{
"appSecret": "<Add your appSecret>",
"pageAccessToken" : "<Add your pageAccessToken>",
"validationToken": "<Add your validationToken>",
"serverURL": "<Add your server URL(eg https://<example>.herokuapp.com)",
"wayloKey": "<Add your waylo API KEY>"
}
```

If you have set up a few bots, create a FB app, page and head over to Waylo Developer site and create your API key. You should be good to go. If not, you can follow the steps outlined here.

You can see the API request Here

You would need node, npm and git installed to follow along.

Get Started

Build the server

  1. Create an app on heroku.com or your favorite server

    Heroku Take note of the server URL.

  2. Create a new folder Hotelbot and clone this repo

    git clone https://github.com/waylo-api/HotelBot.git
    
  3. Add heroku remote

    git remote add heroku [email protected]:<project>.git
    

    where is the name of your Heroku app in Step 1.

  4. Install dependencies

    npm install
    
  5. Add config parameters

    Edit config/default.json and add the following parameters

    "validationToken": "",
    "serverURL": "",
    

    Add any string as your validation token. "serverURL" is the server URL in Step 1. Leave others blank for now.

  6. Commit all code to Heroku

    git add .
    git commit -am "first commit"
    git push heroku master    
    

Setup the Facebook App

  1. Create or configure a Facebook App here https://developers.facebook.com/apps/. Take note of the App Secret in the App Dashboard.

    App Dashboard

  2. In the app go to Messenger tab (or add product and then add Messenger) and click Setup Webhook. Here you will put in the URL of your Heroku server(Typically https://.herokuapp.com/webhook) and a token in Step 5 of Build the server. Make sure to check all the subscription fields.

  3. Create a Facebook Page

  4. Get a Page Access Token and save this somewhere.

    Page Access Token

  5. Subscribe your page to the App.

  6. Add config parameters

    Edit config/default.json and add the following parameters

    "appSecret": ,
    "pageAccessToken" : ,
    

    "appSecret" is your FB App Secret in Step 1 of "Setup the Facebook App". "pageAccessToken" is the Page Access Token you noted in the previous step.

Get Waylo Hotel API key

  1. First, sign up for a free account at Waylo developer account

You'll need the Page Access Token in Step 4 of Setup the Facebook App

  1. Note the API key and add config parameters

Edit config/default.json and add the following parameters

"wayloKey": <WAYLO API KEY>
  1. Commit all changes to Heroku

    git add .
    git commit -am "Waylo API first commit"
    git push heroku master    
    
  2. You should be all set. Open your Facebook page and start chatting with your new hotel booking bot! Congrats you have just enabled bot monetization.

License

See the LICENSE file in the root directory of this source tree. Feel free to use and modify the code.

#BAB - Build Awesome Bots

hotelbot's People

Contributors

waylo-api avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.