This app bridges Slack threads talking about the same issue. It makes it easier to follow discussions that might span teams, departments, locations etc.
- Invite the app to the channels where you'd like to use it.
- Share a message from one channel to another.
- Now, after there are at least 3 replies under the re-posted message, Message Linking will reply to the original with a link to the new discussion.
These are the basic components used in the Message Linking app:
• Bolt
• Events API to listen for relevant thread replies.
• A simple regex to detect when messages are shared.
We made some UX assumptions in designing Message Linking but you can adjust them to suit your needs:
- No private channels - by default, the app will not link to messages in private channels. It’s both a privacy precaution and a user experience one, since not everyone would be able to follow the link.
- Three replies threshold - triggering the thread bridge after 3 replies is the sweet spot between making the app noisy and risking missing conversations.
- Create a Slack app at https://api.slack.com/apps
- At Bot Users, add a new bot user.
- Click on OAuth & Permissions and add the following scopes:
channels:history
bot
- Click 'Save Changes' and install the app to all channels (You should get an OAuth access token after the installation
- Get the code
- Either clone this repo and run npm install
- Or visit https://glitch.com/edit/#!/context-bolt
- Set the following environment variables in .env (copy from .env.sample):
SLACK_BOT_TOKEN
: Your app's xoxb- token (available on the Install App page)SLACK_USER_TOKEN
: Your app's xoxp- token (available on the Install App page)SLACK_SIGNING_SECRET
: Your app's Verification Token (available on the Basic Information page)
- If you're running the app locally:
- Start the app (
npm start
)
- Enable the Events API
- Click on Events Subscriptions and enable events.
- Set the Request URL to your server (e.g.
https://yourname.ngrok.com
) or Glitch URL +/events
- On the same page, scroll down to Subscribe to Bot Events and subscribe to the
message.channels
- Install the Message Linking App on your workspace.
- Invite the bot user with
/invite @botname
to every channel you'd like it to be able to connect threads with.
- Post a message in Channel A
- Copy a link to the message and post in Channel B
- Reply to the message in Channel B at least 3 times.
- Bot should notify back in the original message in Channel A of the activity!