Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ryanvolum/backChannelBot
This is a basic bot that uses the DirectLine backchannel to send and receive event messages to an instance of WebChat
https://github.com/ryanvolum/backChannelBot
Last synced: 2 months ago
JSON representation
This is a basic bot that uses the DirectLine backchannel to send and receive event messages to an instance of WebChat
- Host: GitHub
- URL: https://github.com/ryanvolum/backChannelBot
- Owner: ryanvolum
- Created: 2017-01-23T01:06:41.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-02-08T18:01:17.000Z (almost 8 years ago)
- Last Synced: 2024-08-03T18:20:18.078Z (5 months ago)
- Language: JavaScript
- Homepage:
- Size: 59.6 KB
- Stars: 20
- Watchers: 3
- Forks: 8
- Open Issues: 2
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
- awesome-botframework - backChannelBot - This is a basic bot that uses the DirectLine backchannel to send and receive event messages to an instance of WebChat. (Integrations / Other)
README
# Back Channel Bot
NOTE: Running this demo requires running the [WebChat backchannel sample page](https://github.com/billba/BotFramework-WebChat/tree/master/samples/backchannel) which sends events of activity name "buttonClicked" and receives events with activity name "changeBackground.
This is a basic bot that uses the [DirectLine](https://docs.botframework.com/en-us/restapi/directline3/) backchannel to send and receive event messages to an instance of [WebChat](https://github.com/billba/BotFramework-WebChat).
This highlights the ability for a bot to communicate with a page that embeds the bot through WebChat. In other words, our bot can:
* Send events to a page that hosts an instance of WebChat - demonstrated by the bot sending an activity of type "event" and of name "changeBackground", which changes the background color of the parent page.
* Listen for events from the page that hosts an instance of WebChat - demonstrated by the bot responding "I see you clicked that button" when it receives an event named buttonClicked.![Dialog Structure](./demo.gif)
To run the demo, pull the [WebChat repo](https://github.com/billba/BotFramework-WebChat) and follow instructions for running the samples. Create a bot from the [bot portal](dev.botframework.com) and (for testing) add keys to the connectorSetup.js file. Either [deploy the bot to Azure](https://docs.botframework.com/en-us/node/builder/guides/deploying-to-azure/) or [use ngrok to tunnel back into your machine](https://docs.botframework.com/en-us/node/builder/guides/core-concepts/#debugging-locally-using-ngrok)