Introducing Chatbots for Glip Developers
Chatbots, or bots for short, are a great way to extend the capabilities of RingCentral’s Glip team messaging solution by adding applications that interact with users via text chat. Bots have become extremely popular as people spend more time on chat and prefer to interact with multiple services through a single chat app than multiple separate apps such as website or mobile apps.
With the beta launch of Glip’s REST APIs, it’s now possible to build your own Glip bots. You can build these using Glip’s APIs directly or using popular bot frameworks such as Botkit, Errbot, Hubot and Lita as well as the Motion AI visual conversation designer which are covered below.
Common applications include handling notifications from other applications as well as interactive queries to either third-party apps or specific bot functionality. Popular use cases include:
- Have bots handle incoming notifications from your apps into Glip teams so you don’t have to check different sites for updates.
- Query third-party service so you don’t have to visit different sites to get information.
How Do Chatbots Work?
A chatbot app is a service that connects to Glip and does a few primary things:
- Keep track of conversations it has with people and teams
- Listen to new messages from Glip or other sources
- Post and respond to messages in Glip conversations
To set up an app to do this using the Glip API you need to do the following:
- Create a bot and subscribe to posts in the group using the post event filter. The subscription can be a real-time notification subscription (via PubNub) or a webhook subscription.
- Extract the personId and groupId to keep track of where the conversation is happening.
- Process the data and use the REST API to post a message back to the conversation.
A lot of the above is automatically handled for you if you use one of the existing bot frameworks and adapters mentioned in the next section. If you would like to build your own, you can investigate the code for those bots.
Of note, your bot can run on your private network our on the public network. If you use our subscription API for real-time notifications, you can run your service privately, or even on your own system. If you wish to use webhooks your webhook URL endpoint must be accessible on the Internet.
Bot Framework Support
Bots can be built from the ground up using Glip APIs or they can be built on bot frameworks which provide common bot capabilities and interfaces for adding more. One of the advantages of using a pre-built bot framework is that you can quickly access capabilities built on those frameworks as soon as you add Glip support.
- Errbot — Python bot framework with over 480 plugins on Github. Errbot support is provided by Kirill Konshin.
- Lita — Ruby bot framework with over over 420 handlers listed on plugins.lita.io. Use the lita-glip adapter on RubyGems to use Lita, written by myself.
These are listed on the RingCentral Developer Chatbots page along with bot adapters using RingCentral SMS.
If you have questions on using any of the above bot frameworks, please reach out to us on the Dev Community, Stack Overflow or Github issues for individual repos. If you would like us to look into supporting another bot framework, reach out to us on the Dev Community.
Visual Bot Design
For bots, the conversation is the UI. Early on all bot conversations were coded by hand, however, over time visual bot designers have been created to make creating bot conversations easier. One of the early leaders in this space is Motion AI which can be easily hooked up to Glip using Lita with the lita-motionai handler. Please let us know if you would like to use other visual designers.
Finally, our team has put together some simple example bots for you to use and get started with.
- Sample starter Glip bot using Hubot
- Sample starter Glip bot using Botkit
- Sample Salesforce Glip bot using Botkit
- Sample IBM Watson Glip bot using Botkit
- Sample Motion AI Glip bot using Lita
- Sample Get Satisfaction Glip bot using Hubot
Launch the Bots!
Bots are a great way to add integrations and other capabilities to Glip. If you’d like to do this, please try out our APIs and bot support listed above. If you have questions, please reach out to us here, on the Dev Community, Stack Overflow or Github repos. Looking forward to hearing your great Glip bot stories!