integration

How To Build an AI Chat Bot on Slack

Step by step guide on how to launch an AI chat bot on Slack. Takes no more than 10 minutes and no coding is required!

How To Build an AI Chat Bot on Slack

☝️ is what it’s going to look like once we’re finished.

In this guide, we’re going to follow 4 simple steps to create a smart conversational AI that anyone can talk to in your Slack workspace:

  1. Create your Slack app
  2. Configure your Slack app
  3. Create a Quickchat.ai account
  4. Integrate your Slack bot with Quickchat.ai

1. Create your Slack app

The first thing you need to do is to create a Slack app for your AI chat bot. Head over to api.slack.com/apps, create new app and follow the steps:

Create new Slack app

Create new Slack app

Create app from scratch. If you’ve done this sort of thing before, you can go directly to building from app manifest that we provide below.

Create app from scratch. If you’ve done this sort of thing before, you can go directly to building from app manifest that we provide below.

Set your AI’s name and select the Slack workspace you want to add it to.

Set your AI’s name and select the Slack workspace you want to add it to.

2. Configure your Slack app

Slack recently released a neat way of configuring your entire app in one go. You do it through the so called manifest file which contains all of your app’s configuration.

Paste bot app configuration into your YAML manifest file

Paste bot app configuration into your YAML manifest file

We prepared a manifest file that you can simply copy & paste without worrying about the details. If you’re interested, the important lines have been highlighted below: - make sure your bot’s messages tab has been enabled - set permission scope for bot so it can read and write chat messages - set the appropriate bot events to be handled by our Quickchat server

display_information:
  name: Talk to AI
  description: Talk to me about Quickchat!
features:
  app_home:
    home_tab_enabled: false
    messages_tab_enabled: true
    messages_tab_read_only_enabled: false
  bot_user:
    display_name: Talk to AI
    always_online: true
oauth_config:
  scopes:
    bot:
      - im:history
      - im:write
      - chat:write
settings:
  event_subscriptions:
    request_url: https://slack.quickchat.ai/chat/
    bot_events:
      - message.im
      - app_home_opened
  org_deploy_enabled: false
  socket_mode_enabled: false
  token_rotation_enabled: false

Before you can set your manifest, you will be required to verify the URL by simply clicking on the link:

Verify the URL by simply clicking on the link

Verify the URL by simply clicking on the link

That’s it! Your bot Slack app has been configured. If you’d like to edit your bot’s look & feel, head over to Basic information under Settings:

Edit your bot’s name, description, icon and background color

Edit your bot’s name, description, icon and background color

3. Create a Quickchat.ai account

Quickchat.ai allows you to create your own AI Assistant that has great conversational skills and general world knowledge by default, out of the box.

If you want to, you can give your AI specific knowledge about your company, project, product or virtually anything else. If you want to learn how to do it, watch our 10-minute video guide on YouTube.

But even without any specific knowledge the Quickchat engine makes a great conversation partner so we’re going to go with that for now. Head over to quickchat.ai and create your account:

Start building

Start building

Subscribe for the 2-week trial for just $14.

Subscribe and pay with Stripe

Subscribe and pay with Stripe

4. Integrate your Slack bot with Quickchat.ai

In the Quickchat dashboard, go to Integrations and find the Slack integration section:

Activate your Slack integration and provide App ID, Signing Secret and Bot User OAuth Token

Activate your Slack integration and provide App ID, Signing Secret and Bot User OAuth Token

You will find the following in your Slack app’s settings: - App ID: Settings => Basic Information => App Credentials - Signing Secret: Settings => Basic Information => App Credentials - Bot User OAuth Token: Features => OAuth & Permissions => OAuth Tokens for Your Workspace 👉 You will first be required to install the bot to your Workspace:

Install your bot to your Slack workspace

Install your bot to your Slack workspace

As a final step you may set welcome messages to be sent by the bot at the beginning of their conversation on Slack:

Set welcome message(s)

Set welcome message(s)

And that’s it! 🎉 Your AI chat bot is ready to be tested on Slack:

End goal - smart conversational AI that anyone can talk to in your Slack workspace

End goal - smart conversational AI that anyone can talk to in your Slack workspace

Share this article:

comments powered by Disqus