Skip to content

rsk-lab/RSKSharedChannels

Repository files navigation

RSKSharedChannels

Slack's shared channels is a brand new feature that lets two separate workspaces communicate securely in Slack. You can share any channel on your workspace to another team’s workspace - like clients, customers, or contractors you work with regularly.

Unfortunatelly, it is still in Beta. Workspaces on Slack Enterprise Grid can connect shared channels to other workspaces in their organization, but it’s not possible to create a shared channel with an external workspace at this time.

Proof of concept

RSKSharedChannels allows you with minimal efforts to share any channel on your workspace to another team's workspace.

✅ Create a common area between two unique workspaces, so you can find everything you need in one place.

✅ Simplify communication, streamline conversations, and gain efficiency.

✅ Make information and context easier to find across workspaces.

Requirements

  • Slack 3.1.1
  • xCode 9.3

Setting up the environment

Setting up Slack bots

  1. Create a bot that will represent another team in your Workspace. - Go here: https://my.slack.com/services/new/bot - Enter a username for the bot. - Click "Add bot integration".

    New Bot

  2. Copy the API token that Slack generates and replace a placeholder of xWorkspaceBotAPITokenString in Environment.swift with the real deal.

    Bot API Token

  3. Ask a primary owner or an admin of another team to create a bot that will represent your team in his Workspace and ask him to send you the created API token.
  4. Replace a placeholder of yWorkspaceBotAPITokenString in Environment.swift with the real deal.

Testing locally

  1. Checkout dependencies.

    swift package update
  2. Open Xcode.

  3. Select the RSKSharedChannels application executable target and run it (⌘+R).

    Application Executable Target

  4. Head over to Slack. Your bots presence indicators should be filled in.

    Bot Presence Indicator

  5. Invite bots to channels you would like to share. Channel names must match in the workspaces of both teams.

Deploying to the ☁️ (optional)

  1. If you don’t have an account on Heroku go and sign up for a free one.

  2. Setup Heroku: - Install the Heroku toolbelt. - Log in to Heroku in your terminal:

    heroku login
- Create a new application on Heroku and set a buildpack (use a unique name since Heroku app names are unique):

    ```sh
    heroku create --buildpack https://github.com/kylef/heroku-buildpack-swift rsk-shared-channels
    ```

- Set up configuration variables:
  - Add a new configuration variable named `xWorkspaceBotAPITokenString` with the API token of the bot that represents another team in your Workspace.
  
      ```sh
      heroku config:set xWorkspaceBotAPITokenString=xoxb-...RS
      ```
  
  - Add a new configuration variable named `yWorkspaceBotAPITokenString` with the API token of the bot that represents your team in the Workspace of another team.
  
      ```sh
      heroku config:set yWorkspaceBotAPITokenString=xoxb-...GB
      ```
  
- Set up a Heroku remote (use your unique name here, too):

    ```sh
    heroku git:remote -a rsk-shared-channels
    ```
  
- Push to master:

    ```sh
    git push heroku master
    ```
  
  At this point, you’ll see Heroku go through the build process.
  <p align="center">
    <img width="650" alt="Build Process on Heroku" src="https://user-images.githubusercontent.com/1182823/38620713-dc80e9f8-3da7-11e8-9ae2-c25eab9e221f.png">
  </p>
  
3. Run the app.

    ```sh
    heroku run:detached web
    ```

4. Head over to Slack. Your bots presence indicators should be filled in.
    <p align="center">
        <img width="240" alt="Bot Presence Indicator" src="https://user-images.githubusercontent.com/1182823/38619962-0d4822c4-3da6-11e8-8d63-d97445dff6ad.png">
    </p>

🎊 You're done! 🎊

Type a message and press the Enter key!

Contacts

Hire R.SK Lab Team

License

This project is available under the MIT license. See the LICENSE file for more info.

About

Share any Slack channel on your workspace to another team's workspace.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages