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 .
Create classic Slack App.
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.
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.
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.
Add bot user.
In the left sidebar, click
Settings > Basic Information
to check the basic information of your Slack App.
In the content panel, expand Add features and functionality
section and click Bots card.
Click Add Legacy Bot User button. and you will be prompted with
a dialog Add App Display Name.
In the dialog Add App Display Name, specify values for the
following fields:
Display Name (Bot Name): bnz
Default username: bnz
Click Add button and you can see a Bot user
added notice on the top.
Install the Slack App.
Request to install the App.
In the left sidebar, click Features > OAuth &
Permissions.
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.