Build a hybrid human + AI messaging experience on Slack
Bring humans in the loop in minutes using Wordhop + Botkit
Our journey building Wordhop on Slack’s platform began in the spring of 2016. We started with a simple bot monitoring service that sent alerts to a Slack channel anytime our bot was unable to communicate with users. We could also drill down and get some basic reporting with charts and graphs. Our goal was to get real-time insights, identify bottlenecks, and make adjustments to our conversational experience.
As Slack’s platform evolved, we realized that we could act on insights without leaving Slack. When our bot was unable to communicate, we could take over live and engage users directly, then resume the bot when we were done. Enabling human + AI messaging experiences became Wordhop’s core value proposition.
Use cases for a human + AI hybrid messaging solution
Get feedback on your UX
Build a bot and include a feedback button. You can set up a Wordhop alert trigger using the keyword “Feedback”. When your users enter their feedback, Wordhop will capture that and send it to you on Slack. You can even pause your bot and get 1 on 1 with your user for additional feedback, or thank them personally for providing feedback. Wordhop will automatically resume your bot when you’re done.
Manage employee relationships
Build a bot that answers your employees most frequently asked questions. Loop in HR when your employees have more personalized questions, or issues they want to discuss. Maintain a full transcript of the conversation.
Deliver customer service
Build a support bot that answers frequently asked questions. Include a button to request live support and/or enable users to enter words like “human” or “agent” to get live support. Wordhop will notify you on Slack and open a channel for you to get 1 on 1 with your customer. If you need to loop in a specialist, simply mention them in your channel with your customer and team-up to solve complex customer problems.
Build a consulting service
Build a bot that delivers useful stories related to your industry and your specific area of expertise. Provide this as a free value-added service and include an automated message that you’re available for questions that relate to each story shared by your bot. Using Wordhop, take over and respond to questions. Use that as an opportunity to engage the user in live conversation and up-sell consulting services on a fee-for-service basis.
Create a trademark service
Build a trademark service through Slack. A bot could search trademarks in the USPTO database, collect the information it needs to file a mark, collect payment, and then monitor and provide updates on the mark. Loop in a human paralegal when the USPTO has issues and requests changes to the filing, then resume the bot to provide further status updates from the USPTO.
(Implementation: Harder, but likely worth the time.. This one feels lucrative)
Let’s create a human + AI messaging experience
I’m going to show you how to create a human + AI messaging experience using Botkit + Wordhop.
We’ll use Glitch (Formerly GoMix) to host and deploy the app. Glitch is a web-based code editor that features instant deployments, so you can edit, host and test your bot’s code in one place.
Step 1) Add Wordhop to Slack
To get started: Add Wordhop to Slack
Step 2) Tell Wordhop about the bot you’re going to build
Once you add Wordhop to Slack, follow the prompt to Add a Bot (You can also say “Add a bot” at any time to Wordhop). Tell Wordhop the name of the bot you are going to build, then click Continue.
3) Get Keys From Wordhop
Wordhop will give you an API Key and a Client Key. Each bot deployment has it’s own unique Client Key while an API Key is for your Wordhop account.
4) Create a new Slack app
Click Create New App at https://api.slack.com/apps. After you’ve chosen a name and which team your app will live in, note the Client ID and Client Secret from the App Credentials view. You will need these to get your app up and running.
Once you’ve collected those keys, set up your default username in the Bot Users section and save your changes to continue:
5) Start a Glitch Project
When you remix our Glitch project you can test things out quickly and you can continue to build on it later.
Start with Botkit + Wordhop for Slack:
Click the title of the project in the top left corner and it will give you the option to Remix This. Click that to make the sample project your own. This will copy the a Wordhop enhanced Botkit Starter Kit into a new project that you can save with your own name.
6) Add your Keys to your Glitch project and run
Glitch safely stores your keys in an .env folder. Paste your clientId and clientSecret values in here. Also add your Wordhop API Key and Wordhop Client Key for the specific bot deployment. Don’t worry — if anyone remixes your project, your keys won’t be shared.
Once you’ve included your app credentials, click Show Live to get your bot server running. This will start up the Glitch instant hosting and deployment magic. You’ll need to have this server running for Slack to confirm your app’s endpoints and finish your configuration.
7) Get your app talking to Slack
Now you just need to get your environment variables set so your app and Slack can communicate with each other.
Return to your Slack app settings and navigate to OAuth & Permissions.There, paste in your Redirect URL, which is your own, remixed Glitch URL plus “/oauth”, like this example:
You can grab the URL from Glitch by clicking the “Copy” button
Copy the URL from your browser window and paste into your settings.
Save your changes and confirm your Redirect URL to continue.
Add a Bot User
Create a username and enable the Online notifier in the Bot Users section.
Enable Interactive Messages
You’ll want to enable Interactive Messages for your app, so go ahead and do that too. That would be your Glitch URL, followed by “/slack/receive”:
Type that URL into the Request URL field to enable Interactive Messages.
Enable and subscribe to Slack events
Now go to Event Subscriptions and turn the toggle on to enable Slack events! Paste in the same Request URL you used for Interactive Messages.
Now, subscribe to the events your apps requires below. For the purposes of this example, we’re going to subscribe to some Bot Events that allows this bot to hear messages wherever they’re posted.
Add your new app by clicking the “Add to Slack” button and select a team. If you’ve configured everything correctly, you’ll see a screen like this one:
Authorize your bot and you’re good to go. To test your integration, send your new bot a command you know it won’t understand and look for a “No Response” alert in in the Slack channel where you added Wordhop (A DM by default). If you like, say
alerts to Wordhop to filter alerts and minimize noise in your channel.
Congratulations! You just created a basic hybrid human + AI conversational app with Glitch using Botkit + Wordhop.
Some things to consider before you go:
- If you want to build a human + AI experience and host it yourself, we provide code examples on Github.
- If you implement any of the use cases suggested in this article, please let me know. I’d love to see your implementation!
- I’m a Co-founder of Wordhop. When I’m not building the future, I like writing about it, so please follow me on Medium if you enjoyed this piece, or on Product Hunt to see what I’m building.
- Recommend, or share this if you found it useful. It gives me 🔋 to write knowing people find value in it.