DrupalCon Baltimore 2017: Plugging in your Bot - An extensible bot framework for Drupal 8
Channel: Drupal Association
Date: 26/04/2017

Chatbots. We know that’s about all you need to write to get people interested these days, but we trust you’re a more discerning crowd than most, so we’ll expand on the thought a bit more.



While experimenting with bot integrations using Drupal 8, we came across this project on Github, published by the White House. It’s a simple module that provides a tool for building a chatbot on Facebook’s Messenger Platform. It’s simple and engaging; you should check it out.



But once you’ve checked it out you should join our session, where we take the Drupal bot integration tool the White House built and we push it to the next level.



By decoupling the module from Facebook, we enabled it to integrate with other platforms, like Slack, and to build our own custom clients. We also made custom back-ends available, allowing for the bot workflow and steps to come from different sources, including user managed content within Drupal.



How did we do it?



In brief: we forked the Facebook Messenger module and refactored it so that both the client and the back-end leverage the Drupal 8 Plugin API. We extracted the original client to Facebook Client and the original back-end to Default Workflow. Then we added two additional clients: Slack client (for Slack bot integrations) and Web client (for our custom web app), plus we added an additional back end: Managed Content Workflow (which provides a user interface within Drupal for the creation of workflows and steps).



By opening up the original Facebook Messenger module through use of the Plugin API, and by demonstrating additional integrations, we believe we will make experimentation with bots in Drupal more accessible to others in the community.



Come to our session and see how easy it is to be leading the chatbot charge.



What you will learn:

What are some common use-cases for bots
What are the essential components of a bot (client, intents, entities)
How to configure a Drupal 8 site to be the back end for a Facebook Messenger or Slack bot.
How to extend the Bot Framework module to provide additional clients and back-end integrations.