mcwumbly initiated a discussion on integrating private Slack and Discourse instances to allow link unfurling for login-required content. After Slack support indicated that a standard for custom unfurling of private content is a future goal, they recommended using OAuth and outgoing webhooks as a current workaround. mcwumbly proposed a solution involving a Slack outgoing webhook triggered by a specific domain, which would call a new /slackdoor endpoint in Discourse. This endpoint would authenticate the request, parse the URL, retrieve the post data, and return a rich message attachment compatible with Slack’s API. The user questioned whether this functionality belonged in a core update or a plugin. mcwumbly subsequently announced a basic implementation and shared a GitHub repository for the discourse-slackdoor project. While erlend_sh suggested potentially baking this feature into the existing Slack Notification plugin, mcwumbly noted that their immediate needs differed from the current capabilities of that plugin. Finally, mcwumbly confirmed the creation of a canonical plugin topic for further development and feedback.
I reached out to the Slack folks with this request and got the following reply.
My request:
We have private Slack and Discourse instances and I’m looking for ways to better integrate the two. We also use Google Apps extensively.
It’d be awesome if there were a way to configure Slack with credentials to retrieve content from these other applications and unfurl/expand them accordingly.
I searched and haven’t found any way to do this yet. Is it already possible? If not, is this a request that could be considered in the future?
Thanks!
Their reply:
Thanks for taking the time to write in! A better standard for custom unfurling of private content is something we’re indeed looking to offer further down the road.
For now, we’d recommend you start by creating a Slack app, since we already have features that will get you close to what you’re looking for:
OAuth would allow teams who’ve added your app to send an authenticated request from Slack to your service (triggered by the posting of your private links).
You can use a outgoing webhook or bot to listen for these links, retrieve the relevant content, then send it back in a payload to the team as a workaround to offer this content.
I hope this suggestion helps you get started, and please let us know if there’s anything else we can help with!
Maybe, I’m not sure yet. At the moment, I need this feature and not what that other plugin has to offer. I imagine the reverse may be true too.
@sam if you have a few minutes to take a look at the direction this one is headed, I’d love a sanity check on how some of the authentication stuff is being overridden…