SlackBridge
    • Dark
      Light
    • PDF

    SlackBridge

    • Dark
      Light
    • PDF

    Article summary

    Synchronize conversations across your Slack and Rocket.Chat workspace using SlackBridge to mirror messages between channels or private groups in real time. When you send a message in Rocket.Chat, it appears in the corresponding Slack channel, and vice versa. To set this up, create a Slack app that bridges both applications to sync the messages.

    Create a custom app on Slack

    1. Go to Slack Apps and click the Create New App button.

    2. Select the from an app manifest option and choose the workspace to develop your app in.

    3. Enter the following YAML as the app manifest:

      display_information:
        name: RocketChatBridge
      features:
        app_home:
          home_tab_enabled: true
          messages_tab_enabled: false
          messages_tab_read_only_enabled: true
        bot_user:
          display_name: RocketChatBridge
          always_online: false
      oauth_config:
        scopes:
          bot:
            - channels:history
            - channels:read
            - chat:write
            - chat:write.customize
            - groups:history
            - groups:read
            - mpim:history
            - mpim:read
            - pins:read
            - reactions:read
            - reactions:write
            - users:read
            - im:read
            - im:history
      settings:
        event_subscriptions:
          bot_events:
            - app_home_opened
            - channel_left
            - member_joined_channel
            - message.channels
            - message.groups
            - reaction_added
            - reaction_removed
        interactivity:
          is_enabled: true
        org_deploy_enabled: false
        socket_mode_enabled: true
        token_rotation_enabled: false
    4. Review the app summary and click Create.

    5. Navigate to Settings > Basic Information and click Install to Workspace.

    6. Go to App-Level Tokens and click Generate Token and Scopes. Add a token name and select the following scopes:

      1. connections:write

      2. authorizations:read

      3. app_configurations:write

    7. Click Generate and copy the app token generated.

    8. Navigate to Features > OAuth & Permissions and copy the Bot User OAuth Token.

    9. Navigate to Settings > Basic Information > App Credentials and copy the Signing Secret.

    Configure SlackBridge in Rocket.Chat

    1. Go to Administration > Workspace > Settings > SlackBridge.

    2. Enable SlackBridge and disable Use Legacy API Tokens.

    3. Add the Bot Token, Signing Secret, and App Token you obtained from configuring your Slack app.

    4. Enable SlackBridge Out Enabled to allow sending messages from Rocket.Chat to Slack.

    5. Adjust any other settings as needed.

    6. Click Save Changes

    Using SlackBridge

    1. In your Slack workspace, create a  channel.

    2. In the message box, type the /add command and select Add apps to this channel. Add the RocketChatBridge app to the channel.

    3. Return to your Rocket.Chat workspace and navigate to the directory to search for the channel you created on Slack.

    4. Join the channel and send a message. You should see the message appear in Slack. Respond to the message in Slack, and you will see the response in Rocket.Chat.

    If the messages don’t sync between Slack and Rocket.Chat, restart your workspace.

    SlackBridge recognizes the same user across Slack and Rocket.Chat if the usernames match. This allows for consistent identification of users between the two platforms. It also supports message reaction.


    Was this article helpful?

    ESC

    Eddy AI, facilitating knowledge discovery through conversational intelligence