Lead Developer Relations | gupshup.io
Mar 27, 2017
Gupshup and PubNub are pleased to announce the addition of the Gupshup BLOCK on the PubNub BLOCKS catalogue. You can now trigger a bot action via a PubNub BLOCK.
PubNub is a global Data-Stream Network (DSN) that provides the infrastructure that makes real-time communication possible. PubNub works primarily on the Publish/Subscribe model. This means that when data is uploaded (published), PubNub will immediately push out that data to anyone that was interested in it (subscribers). Messages sent through PubNub are sent on a channel. Channels are unique to a publish/subscribe keyset. Now, most messages sent across the PubNub network need to be modified either before or after the message has been fired from the publisher. For instance, you may want to transform the message content or filter all the messages according to criteria. This is where the concept of BLOCKS comes in.
PubNub in association with Gupshup has added a BLOCK that enables you to connect your chatbot created on the Gupshup platform, to real-time data streams. Thus you can trigger any action on the bot based on an input. There are many ways to use a chatbot in conjunction with a data stream. For instance, you can control a smart bulb or any other IoT-enabled home automation device using a chatbot. You can also query real-time dashboards for live and updated cuts of data, and view it using a chatbot. This BLOCK also will enable you to easily add a chatbot channel to your existing application.
The Gupshup BLOCK uses the HTTP endpoint capability of a bot created on the Gupshup platform. Essentially, each bot created on Gupshup has an endpoint and this endpoint can be used to either trigger a function within the bot or store data for the bot. For more details about the HTTP endpoint of the bot, read this.
For a step-by-step guide on creating a chatbot on Gupshup and using the PubNub block to trigger a bot action, read this guide.