Creating and installing Slack App

The Hubot bot adapter slack needs one classic Slack App to communicate with the Slack chat platform. You must create one and install it before you can integrate Slack with Hubot and talk with your chatbot in Slack client.

Procedure

Slack Real Time Messaging (RTM) API is a WebSocket-based API that allows you to receive events from Slack in real time and send messages as users. It is the basis for all Slack clients. It's also commonly used with the bot user integration to create helper bots for your workspace. Hubot-slack adapter leverages the RTM API to communicate with Slack, but new Slack Apps may not use any RTM API method. So you must create a classic App and use the V1 OAuth flow to use RTM. For more information, see Real Time Message API .

  1. Create classic Slack App.
    1. Open Slack API web page at https://api.slack.com/apps?new_classic_app=1. When you open the web page, you will be automatically prompted with a dialog Create a Slack App (Classic). Do not close the dialog because this is the only entrance to create your classic Slack App. If you accidentally closed it, you must refresh the web page and let the dialog prompt again.
      Figure 1. Create classic App
      Create classic App
    2. In the prompted dialog, specify values for the following fields:
      • App Name: input your App name, for example, Z ChatOps.
      • Development Slack Workspace: input any one of your Slack Workspace, for example, IBM Z ChatOps.
        Tip: You can change the App name at any time.
    3. Click Create App button. Your new classic Slack App is created when you see the following page with a notice in a blue banner on the top.
      Figure 2. Classic App created
      Classic App created
  2. Add bot user.
    1. In the left sidebar, click Settings > Basic Information to check the basic information of your Slack App.
    2. In the content panel, expand Add features and functionality section and click Bots card.
    3. Click Add Legacy Bot User button. and you will be prompted with a dialog Add App Display Name.
    4. In the dialog Add App Display Name, specify values for the following fields:
      • Display Name (Bot Name): bnz
      • Default username: bnz
    5. Click Add button and you can see a Bot user added notice on the top.
  3. Install the Slack App.
    1. Request to install the App.
      1. In the left sidebar, click Features > OAuth & Permissions.
      2. Click Request to Install and wait for the administrator of your workspace to approve. You can add an optional note to the administrator. You will receive an email notice as well as a notice from the Slackbot of your Workspace when the approval is done.
        Figure 3. Install approved
        Install approved
    2. Install the App to Workspace.
      1. Open Slack API web page at https://api.slack.com/apps when you get the approval.
      2. Click the App name that you created.
      3. In the left sidebar, click Settings > Install APP.
      4. Click Install APP to Workspace.
      5. Click Allow.
    Your Slack App is installed.
  4. Get the bot user OAuth access token.
    1. In the left sidebar, click Features > OAuth & Permissions.
    2. Find the Bot User OAuth Access Token and click Copy.
    Save this token. You will need it to integrate Hubot with Slack in later steps. See Integrating Hubot with Slack for details.

Results

Your classic Slack App is created.