Skip to content

Commit 085ac5f

Browse files
committed
slack bridge: Update doc for the new webhook based Slack Bridge.
This commit updates the Slack Bridge doc, primarily guiding the user to use our Slack Webhook integration.
1 parent eb65f9f commit 085ac5f

File tree

1 file changed

+32
-20
lines changed
  • zulip/integrations/bridge_with_slack

1 file changed

+32
-20
lines changed

zulip/integrations/bridge_with_slack/README.md

Lines changed: 32 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,30 +5,42 @@ This is a bridge between Slack and Zulip.
55
## Usage
66

77
### 1. Zulip endpoint
8+
89
1. Create a generic Zulip bot, with a full name like `Slack Bot`.
9-
2. (Important) Subscribe the bot user to the Zulip stream you'd like to bridge your Slack
10-
channel into.
11-
3. In the `zulip` section of the configuration file, enter the bot's `zuliprc`
10+
11+
2. (Important) Subscribe the bot user to the Zulip channel you'd like to bridge
12+
your Slack channel into.
13+
14+
3. Create a [Slack Webhook integration bot](https://zulip.com/integrations/doc/slack)
15+
to get messages form Slack to Zulip.
16+
17+
4. In the `zulip` section of the configuration file, fill `integration_bot_email`
18+
with **Integration bot**'s email. Note that this is the bot you created in
19+
step 3 and not in step 1.
20+
21+
5. Also in the `zulip` section, enter the **Generic bot's** `zuliprc`
1222
details (`email`, `api_key`, and `site`).
13-
4. In the same section, also enter the Zulip `stream` and `topic`.
23+
24+
6. Moving to over the `channel_mapping` section, enter the Zulip `channel` and `topic`.
25+
Make sure that they match the same `channel` and `topic` you configured in steps 2
26+
and 3.
1427

1528
### 2. Slack endpoint
16-
1. Make sure Websocket isn't blocked in the computer where you run this bridge.
17-
Test it at https://www.websocket.org/echo.html.
18-
2. Go to https://api.slack.com/apps?new_classic_app=1 and create a new classic
19-
app (note: must be a classic app). Choose a bot name that will be put into
20-
bridge_with_slack_config.py, e.g. "zulip_mirror". In the process of doing
21-
this, you need to add oauth token scope. Simply choose `bot`. Slack will say
22-
that this is a legacy scope, but we still need to use it anyway. The reason
23-
why we need the legacy scope is because otherwise the RTM API wouldn't work.
24-
We might remove the RTM API usage in newer version of this bot. Make sure to
25-
install the app to the workspace. When successful, you should see a token
26-
that starts with "xoxb-...". There is also a token that starts with
27-
"xoxp-...", we need the "xoxb-..." one.
28-
3. Go to "App Home", click the button "Add Legacy Bot User".
29-
4. (Important) Make sure the bot is subscribed to the channel. You can do this by typing e.g. `/invite @zulip_mirror` in the relevant channel.
30-
5. In the `slack` section of the Zulip-Slack bridge configuration file, enter the bot name (e.g. "zulip_mirror") and token, and the channel ID (note: must be ID, not name).
29+
30+
1. Go to the [Slack Apps menu](https://api.slack.com/apps) and open the same Slack app that
31+
you have use to set up the Slack Webhook integration previously.
32+
33+
2. Navigate to the "OAuth & Permissions" menu and scroll down to the "Scopes"
34+
section in the same page and make sure:
35+
- "Bot Token Scopes" includes: `chat:write`
36+
- "User Tokens Scopes" includes: `chat:write`
37+
38+
3. Next, also in the same menu find and note down the "Bot User OAuth Token".
39+
It starts with "xoxb-..." and not "xoxp" (legacy).
40+
41+
4. In the `slack` section of the Zulip-Slack bridge configuration file, enter the bot name
42+
(e.g "zulip_mirror"), token (e.g xoxb-...), and the channel ID (note: must be ID, not name).
3143

3244
### Running the bridge
3345

34-
Run `python3 run-slack-bridge`
46+
Run Slack Bridge: `python3 run-slack-bridge`

0 commit comments

Comments
 (0)