python-zulip-api/zulip/integrations/bridge_with_slack
rht 89d0dd56b9 slack-bridge: Fall back to real_name when display_name is empty.
This will intentionally raise exception when a real_name field of a user
is empty.
2020-08-25 15:55:25 -07:00
..
bridge_with_slack_config.py bridge: Initialize bridge_with_slack. 2020-08-25 15:55:25 -07:00
README.md bridge: Initialize bridge_with_slack. 2020-08-25 15:55:25 -07:00
requirements.txt bridge: Initialize bridge_with_slack. 2020-08-25 15:55:25 -07:00
run-slack-bridge slack-bridge: Fall back to real_name when display_name is empty. 2020-08-25 15:55:25 -07:00

Slack <--> Zulip bridge

This is a bridge between Slack and Zulip.

Usage

1. Zulip endpoint

  1. Create a generic Zulip bot, with a full name like Slack Bot.
  2. (Important) Subscribe the bot user to the Zulip stream you'd like to bridge your Slack channel into.
  3. In the zulip section of the configuration file, enter the bot's zuliprc details (email, api_key, and site).
  4. In the same section, also enter the Zulip stream and topic.

2. Slack endpoint

  1. Make sure Websocket isn't blocked in the computer where you run this bridge. Test it at https://www.websocket.org/echo.html.
  2. Go to https://api.slack.com/apps?new_classic_app=1 and create a new classic app (note: must be a classic app). Choose a bot name that will be put into bridge_with_slack_config.py, e.g. "zulip_mirror". Make sure to install the app to the workspace. When successful, you should see a token that starts with "xoxb-..." (there is also a token that starts with "xoxp-...", we need the "xoxb-..." one).
  3. (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.
  4. In the slack section of the configuration file, enter the bot name (e.g. "zulip_mirror") and token, and the channel ID (note: must be ID, not name).

Running the bridge

Run python3 run-slack-bridge