Slack App for cross posting messages to a different channel.
When someone asks a question in a channel, but that was not the right channel to ask, what do you do? Share the message to the right channel!
But now you have people replying to the original message and others replying to the shared message, no one knows what is going on! It's chaos!! Help! 😱
Don't worry, Cross Post is here to help you!
Now the message is shared to the correct channel and another message is sent to the original thread to indicate where the conversation should continue! Chaos no more! :smile:
- Click on
More Actionson the message you want to share (you don't have to be the author) and select the channel you want to share
- Go to https://api.slack.com/apps/ and click on
Create Appand select your workspace - Add a name (
Cross Post) and a description (Cross Post messages to another channel) - Add an image (You can use the
crossroad.pngfile from theimagesfolder) and background color (#000000) - Copy the value for
Signing Secretand add it to the.envfile with keySLACK_SIGNING_SECRET
- Go to
OAuth & Permissions - On the
Scopessection, underBot Token Scopesadd the scopes:chat:write,users:read,chat:write.public,channels:read - On the
OAuth Tokens for Your Workspacesection, click onInstall to Workspace - Copy the value of
Bot User OAuth Token(it should start withxoxb-) and add it to.envfile with keySLACK_BOT_TOKEN
- Go to the
Interactivity & Shortcutsand turn it on - Add the URL for your App ending with
/slack/events, e.g.https://example.ngrok.io/slack/events - Click on
Create New Shortcutand selectOn messages - Add name (
Cross Post this message) and description (Cross Post this message to another channel) - Add the callback id
cross_post - After some of these steps, you might get a warning that you will need to re-install your App, so go to
Install Appand click onReinstall to Workspace
- Click on the emoji on your input area and
Add Emoji
- Using the images from the
imagesfolder, addparrot-in
and parrot-out
to your Slack, using those exact names.
- Install node and ngrok
- Create a
.envfile and add the values forSLACK_SIGNING_SECRETandSLACK_BOT_TOKEN - Start your app with
npm start - Start your tunnel with
ngrok http 6000(or whatever port you used onindex.js) - Update the URL on
Interactivity & Shortcutsto point to the URL created on the previous step
(Note: the tunnel has a session, e.g. 2h, so make sure it's still up when you're testing)
You can host your App anywhere, on this example I hosted on GCP Cloud Functions.
- Create an Organization and a Project
- Inside your project click on
Create Function - Add function name (
cross-post) - On
Triggerchange toAllow unauthenticated invocations(you can leave everything else as default or change as necessary) - Open
Runtime, build, ...and click onAdd Variable - Add
SLACK_SIGNING_SECRETandSLACK_BOT_TOKENwith the values you saved from previous steps - Click on Next
- Update the
package.jsonandindex.jsfiles to the ones from thesrcfolder - On the
index.jsyou can remove the part that is not necessary on Cloud Functions
(async () => {
await app.start(process.env.PORT || 6000);
console.log('Cross Post app is running!');
})();
- Add the
actions.jsandpayloads.jsfiles also from thesrcfolder - Make sure
RuntimehasNode.jsselected - Change
Entry Pointtoslack - Click on Deploy 🎉
- If anything goes wrong you can check in the logs




