Skip to content

Commit 89a7699

Browse files
authored
Merge pull request RasaHQ#5612 from RasaHQ/slack-setup-changes
updates after trying slack
2 parents 995360a + a86b64e commit 89a7699

File tree

1 file changed

+16
-11
lines changed

1 file changed

+16
-11
lines changed

docs/user-guide/connectors/slack.rst

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,24 @@ Getting Credentials
1717

1818
1. To create the app go to https://api.slack.com/apps and click
1919
on **Create New App**.
20+
2021
2. Activate the following features:
2122

22-
- `Interactive Components <https://api.slack.com/reference/block-kit/interactive-components>`_ (if your bot uses any, e.g. buttons)
23-
- Event subscriptions
24-
- Bot users
25-
- Permissions (for basic functionality you should subscribe to the
26-
following events: ``message.channel``, ``message.groups``,
27-
``message.im`` and ``message.mpim``)
23+
- Interactivity & Shortcuts > Interactivity (if your bot uses any `interactive components <https://api.slack.com/reference/block-kit/interactive-components>`_ , e.g. buttons)
24+
- Add your Rasa request URL ``http://<host>:<port>/webhooks/slack/webhook``, replacing
25+
the host and port with the appropriate values that point to your Rasa X or Rasa Open Source deployment.
26+
- Event subscriptions > Subscribe to bot events: ``message.channels``, ``message.groups``, ``message.im``, ``message.mpim``
27+
- App Home > Always Show My Bot as Online
2828

29-
3. Get the ``Bot User OAuth Access Token`` from the OAuth & Permissions page. You will need
29+
3. Get the ``Bot User OAuth Access Token`` from the OAuth & Permissions page. Click ``Install App to Workspace``
30+
and allow access to your workspace. You will need
3031
to provide this value in your credentials later in these instructions. It should start
3132
with ``xoxb``.
3233

34+
4. In the "OAuth & Permissions > Redirect URLs" enter the endpoint for receiving Slack messages. This is
35+
the same URL you entered above for Interactivity & Shortcuts - ``http://<host>:<port>/webhooks/slack/webhook``.
36+
37+
5. Go to the "Event Subscriptions" section, turn on the "Enable Events" and add the endpoint here also.
3338

3439
For more detailed steps, visit the
3540
`Slack API docs <https://api.slack.com/incoming-webhooks>`_.
@@ -54,8 +59,8 @@ e.g. using:
5459
You need to supply a ``credentials.yml`` with the following content:
5560

5661
- The ``slack_channel`` can be a channel or an individual person that the bot should listen to for communications, in
57-
addition to the default behavior of listening for direct messages and app mentions, i.e. "@app_name".
58-
62+
addition to the default behavior of listening for direct messages and app mentions, i.e. "@app_name". To get the channel
63+
id, right click on the channel choose Copy Link and the id will be the last component in the URL.
5964

6065
- Use the entry for ``Bot User OAuth Access Token`` in the
6166
"OAuth & Permissions" tab as your ``slack_token``. It should start
@@ -65,7 +70,7 @@ You need to supply a ``credentials.yml`` with the following content:
6570
6671
slack:
6772
slack_token: "xoxb-286425452756-safjasdf7sl38KLls"
68-
slack_channel: "#my_channel"
73+
slack_channel: "C011GR5D33F"
6974
slack_retry_reason_header: "x-slack-retry-reason" # Slack HTTP header name indicating reason that slack send retry request. This configuration is optional.
7075
slack_retry_number_header: "x-slack-retry-num" # Slack HTTP header name indicating the attempt number. This configuration is optional.
7176
errors_ignore_retry: None # Any error codes given by Slack included in this list will be ignored. Error codes are listed `here <https://api.slack.com/events-api#errors>`_.
@@ -75,4 +80,4 @@ The endpoint for receiving slack messages is
7580
``http://localhost:5005/webhooks/slack/webhook``, replacing
7681
the host and port with the appropriate values. This is the URL
7782
you should add in the "OAuth & Permissions" section as well as
78-
the "Event Subscriptions".
83+
the "Event Subscriptions".

0 commit comments

Comments
 (0)