More signal, less noise

How we prevent information overload with Astrobot for Slack

--

When juggling email, Slack, and other tools at work, it can be hard to stay on top of what’s most important. And for teams that rely heavily on Slack, it’s especially easy to let emails get lost in the shuffle.

Astro’s goal is to help you know what to focus on in your email and to make it easier to manage email and Slack side by side. Astrobot for Slack turns Slack into an intelligent email inbox, where you can manage, read, and reply to emails. From Astro’s email apps, you can share emails directly to Slack and search across Slack and email messages.

As we started building our Slack app, we heard from many Slack developers about a common pitfall: sending information to Slack can create a virtual firehose, which can lead to information overload and, ultimately, user drop off. We needed to figure out how to reduce distractions in Slack.

Here are three takeaways from our efforts to decrease noise and create a valuable app experience in Slack:

1. Provide options for what information flows to Slack

Think about what information you’re going to send to your users in Slack. Then consider if there’s a way for them to filter what information they receive. Information could be filtered or limited by sender, category, stage, assignee — whatever makes sense for your app.

In our case, our email apps already used AI to deduce what’s important to each user and sort emails into VIP, Priority, and Other inboxes. These naturally became options for what emails can come into Slack. This way, users can get the info they care about directly in Slack, without getting a flood of newsletters, transactional emails, and spam.

Filtering theinfo that goes to Slack

We use interactive message buttons to let users select what information they receive in Slack. It’s an obvious and clean way to present multiple options. We then make sure only emails in the selected category get sent to Slack. To do this, we use Amazon SNS to send notifications with details about the email’s categorization. SNS allows fanning out notifications to multiple SQS queues, including Slack.

We send notifications to Slack using the Service abstraction defined by Guava’s concurrency utilities, specifically AbstractExecutionThreadService. The thread polls for messages from SQS using the AWS Java SDK. Slack makes a couple of database checks, including whether the email account is registered in our Slack app and the user’s Slack notification settings, to ensure the user only gets emails in the category they’ve selected.

2. Consider where you’re sending information

If your app has a bot user, keep in mind that bots can be DM’ed, invited to channels, and kicked out of channels — just like human Slack users. Given this flexibility, we found it’s best to suggest how users interact with your bot during onboarding. Otherwise, users may get more notifications than they bargained for or add a bot to an inappropriate or irrelevant channel.

Specifically, if your app is sending personal info to Slack, it’s best to have your users set up a private channel dedicated to your bot. We recommend private channels over DMs since private channels in Slack provide more notification controls than DMs. During setup, we use message menus to allow users to select which private channel they want to add Astrobot to.

The values in this dropdown menu are not static, since private channels can be created or removed. We use a webhook-based mechanism that allows specifying an “Options Load URL” in our Slack app’s configuration. When the user opens the menu, values for the menu are populated based on the results of invoking the options URL.

Sending info to designated channels

To find the private channels for a given user, we use the groups.list method from the Slack Web API. This method returns a list of the user’s channels and allows filtering out public channels. The “is_mpim” field needs to be false for private channels. Below is an example JSON object for a private channel:

3. Use Slack and NLP for onboarding, help, and settings updates

Make it clear what your app does and how to set it up, and clarify this everywhere from your Slack app page to any help content on your site.

We recommend leveraging Slack for as much of the onboarding and support experience as possible. We’ve learned from building other onboarding flows that users usually want to get right to interacting with the app. So we have all setup steps happen inside Slack, instead of on our website during the signup flow. We also have slash command “/astrobot settings” to allow users to easily adjust their settings later on.

With the new deep linking feature, we can automatically direct people to Astrobot’s onboarding in Slack immediately after they’ve installed the app from the App Directory. This allows us to remove any friction between installation and onboarding.

We’re also adding a direct install URL to our App Directory listing, which will allow people to install our app directly from the App Directory without having to go to our website.

Providing help content in Slack via “/astrobot help”

We’ve even made help content accessible in Slack. In our case, we have a slash command “/astrobot help”. You can use Dialogflow or Amazon Lex to provide NLP-based help right in your Slack app. We use Dialogflow for NLP in our Slack app, since we use Dialogflow in our email apps already and we were able to reuse many of the commands and intents. We also found that Dialogflow offers a few more features that are useful, like built-in “small talk” responses, an extensive intent library, and contextual intents.

Here’s how we integrated Dialogflow with our Slack app to provide help content:

  • We created a bot user as part of our Slack app.
  • To receive queries made to our bot user, we used the Events API, which allows our bot user to receive and respond to events.
  • We then subscribed to the message event type, so when a user types a query to our bot user, Slack calls the request URL we specified in our app’s event subscriptions configuration. This is an endpoint you host and it’s a push model.
  • Slack delivers a JSON payload describing the request, and GSON converts it to a POJO before you process it further.
  • It’s important to verify that the incoming request is from Slack when you receive an invocation to your Event API listener URL. The payload contains a “token” field that you should read to ensure it matches up with the verification token stored in your Slack app configuration.
  • Our app responds to the event request with an HTTP 2xx within three seconds, otherwise Slack will consider the event delivery attempt failed.
  • We then sanitize the user’s query to remove formatting like bold, italics, links, and user mentions before we do the NLP processing. We map user @-mentions to email addresses, using the users.list API method from Slack’s Web API.

Below is a helpful Java regex Pattern we use to find the Slack markup:

  • Now that we have a sanitized text string, we use Dialogflow’s Java client. Dialogflow identifies the action that the user’s query maps to, and provides the text response. We then post this response to Slack, using the Slack Web API.

Clear onboarding and help content reduces support tickets, gives people a differentiated experience compared to similar apps, and delights users — ultimately leading to more retention after our app is installed.

Takeaways

Our mission at Astro is to help teams focus on what’s most important. So cutting down on noise, eliminating distractions, and helping users prioritize what’s important is core to what we do. Through listening to our users, tightening up how notifications work, and iterating on onboarding, we’ve improved retention and increased user satisfaction (measured by continued use of our app and feedback from our users).

But even if your mission and product aren’t tied to these ideas, we think it’s important you focus on preventing your app from being a firehose of information. We’ve found the key to success with Slack apps—and specifically bots—is well-organized information that feels as good as an interaction with a trusted co-worker.

Written by Roland Schemers, CTO, and Moiz Jinia, Engineer at Astro

--

--

Astro Technology (acquired by Slack)
Slack Platform Blog

Astro has been acquired by Slack! We’ve shut down our Astro apps as of 10/10/18, but you can find us at @SlackHQ making email and channels work better together