search

Adding a chatbot to Slack


You can deploy the same chatbot, with the same knowledge base, on multiple channels, including Slack.

This means you can automate the answering of frequently asked questions, wherever your customers (or team, in the case of internal support scenarios) are asking them. All your chat forms and escalations will work on Slack too.

To set up your bot in Slack, you'll first need to create a Slack app, and then, with the help of the FAQ Bot team, connect it to your FAQ Bot.

This article describes the steps you need to take, and the information you'll need to provide to the FAQ Bot team. It also details some chatbot elements that will appear differently on Slack.

Prerequisites

Before you get started, you will need:

Create an app in Slack

You first create an application in Slack, which generates the information you need to configure the Slack channel for your FAQ Bot .

  1. Go to Your Apps panel and sign in to your Slack account.
  2. Select Create New App, or Create an App if this is your first application.
    1. On the Create an app page, select From scratch.
    2. On the Name app & choose workspace page, for App Name, enter the name of your Slack application.
    3. For Pick a workspace to develop your app in, select a workspace for your app.
    4. Review and agree to the Slack API terms of service.
    5. Select Create App.

Add a new redirect URL

Once the app is created, add a redirect URL to your app.

  1. Select OAuth & Permissions.
  2. In the resulting pane, under Redirect URLs, select Add a new Redirect URL
  3. In the input box, enter https://slack.botframework.com  and select Add.
  4. Select Save URLs.

Subscribe to bot events

After you add the redirect URL, you need to subscribe to events for the bot to work. 

  1. Select Event Subscriptions.
  2. In the resulting pane, toggle Enable Events to On.
  3. For Request URL, enter https://slack.botframework.com/api/Events/{bot-name}
  4. Subscribe to the following events:

member_joined_channel

member_left_channel

message.channels

message.groups

message.im

message.mpim

Enable sending messages to the bot by the users

After you subscribe to bot events, enable users to message your bot.

  1. Select App Home.
  2. In the resulting pane, in the Show Tabs section under the Messages Tab, enable Allow users to send Slash commands and messages from the messages tab.

Add and configure interactive messages

Enable interactive messages so buttons in the bot will work:

  1. Select Interactivity & Shortcuts.
  2. For Request URL, enter https://slack.botframework.com/api/Actions.
  3. Select Save changes.

Copy your app information

You'll need to provide the following information to the FAQ Bot team so they can add the Slack channel to your bot. Always copy and store app credentials in a safe place.

  1. Select Basic Information.
  2. In the resulting pane, under App Credentials, locate Client IDClient Secret, and Signing Secret.
  3. Now, select OAuth & Permissions.
  4. In the resulting pane, locate the Scopes section. Record the Bot Token Scopes for your app.
  5. Share this information with the FAQ Bot team.

Test your application in Slack

Once you hear from the FAQ Bot team that Slack has been added to your bot, complete the following testing steps:

  1. Sign in to the Slack workspace where you installed your app.
  2. Under Apps, select your app.
  3. In the resulting pane, send messages to the application.

Additional information

For more information about Slack support for bots, see the Slack API documentation:

 

What's different on Slack?

Suggested actions

Suggested action buttons are not supported on Slack - they will be converted to regular buttons.

Truncated button text

Button text may be truncated - use a maximum of 30 characters for best results. This affects:

  • Follow up questions
  • Engagement buttons
  • Display questions

Callouts and styling

Callouts and custom styling (colours/CSS) don't display on Slack.

Video

YouTube videos will not display in Slack. You could add video links to your answers, but users would need to click the link to view the video (outside of Slack).

Segmenting analytics

FAQ Bot analytics are segmented by bot source, allowing you to review and analyse conversations on Slack vs other channels.

How to disable your Slack bot in the portal

You can enable/disable your bot on Slack, to temporarily prevent your bot sending messages on this channel.

To do this, navigate to the Channel settings tab on Configuration > Main and toggle off the "bot enabled" switch for Slack. Note this can take up to 15 minutes to take effect.


Helpful?