- Initialize the project
npm init
npm install --save botbuilder restify
Use snippet: echo_bot
-
Register A Bot: https://docs.microsoft.com/en-us/bot-framework/portal-register-bot
-
Export bot framework app creds
export MICROSOFT_APP_ID=<APP_ID>
export MICROSOFT_APP_PASSWORD=<PASSWORD>
- Start the bot process
npm install -g nodemon
nodemon app.js
- Download and run Ngrok: https://ngrok.com/download
ngrok http 5000
-
Download Bot Emulator and connect: https://github.com/Microsoft/BotFramework-Emulator/releases
-
Test that the bot replies
Connect to Messenger: https://docs.microsoft.com/en-us/bot-framework/channel-connect-facebook
Facebook Page: https://www.facebook.com/pg/Car-Service-Bot-353467028405680
Page ID: 353467028405680
Create new Facebook Application: https://developers.facebook.com/apps
-
Log in https://console.api.ai/
-
Create a new Agent for your bot
-
Train the agent with the provided Entities and Intent Data - api.ai/entities & api.ai/intents
-
Test it in the console GUI and look at the payload format
-
Install the Api.ai SDK for node
npm install --save apiai
- Export the Api.ai agent access key
export APIAI_ACCESS=<ACCESS_KEY>
Use snippets: bot_apiai_utils & bot_nlu
Use snippet: bot_dialog
npm install --save isomorphic-fetch
Use snippet: bot_reply_with_venues, bot_venues_cards & bot_backend
Use snippet: bot_send_location