Add integration to private channels on Slack

I’m trying to figure out how to get the chat integration to be able to post to a private slack channel. I’ve been able to do this with Asana, our task manager, but Discourse doesn’t seem to allow me to do that.

When I create a private channel and go to Add Apps, Asana gives me the option to add, but Discourse I only get the option to view.

I’m not sure if this is just a permission in Slack we need to give to the Discourse app. Unfortunately I don’t admin our Slack instance any longer, so I’m going to need to work with my IT group to test. Any pointers would be appreciated.

Here are screen shots when trying to add both apps:

Screen Shot 2020-06-16 at 2.02.21 PM

Screen Shot 2020-06-16 at 2.02.33 PM

1 Like

I’ve tested this on my Slack account. On that account I am able to add the Discourse app to a private channel by clicking the channel’s “Add an app” link. This works for private channels that the Slack admin is a member of and for private channels that the Slack admin is not a member of.

If you are only being given the option to allow the Discourse app to view private channels, the problem might be related to the permissions that have been given to the Discourse app. On my account, I’m using the following permissions, from step 5 of

  • chat:write
  • chat:write.customize
  • users:read
  • channels:history
  • groups:history
  • im:history

Yep, we were missing two of the permissions (top chat), but oddly even after making the app available in all channels, it only seems to start working on private channels when I invite the Slack admin to the channel. I’m guessing something is wrong with our permissions for that, but I’ll need to do some more testing with him next week. Thanks for the update.

OK as a follow up here is where I’m at in testing.

I believe all the permissions are set correctly, but my Slack admin went home for the day. I noticed I get an error when trying to post to a private Slack channel that the channel does not exist. I originally thought this might have been because I’d just created a channel to test with, so I tried an older test channel and got the same error notice in my rule set.

When I click on the error the details are:

Screen Shot 2020-06-19 at 6.36.33 PM

  "error_key": "chat_integration.provider.slack.errors.channel_not_found",
  "request": "",
  "response_code": "200",
  "response_body": "{\"ok\":false,\"error\":\"channel_not_found\"}"

I then added my Slack admin to the channel and posted again. This time it went right through. I can’t test removing the admin to see if the integration keeps working until he’s back online. If that works I guess that’s the workaround model, unless there is a way to kick off the integration on a private channel without adding a Slack admin.

@awlogan I resolved this exact error by inviting the chat bot to each specific channel within Slack, as described here:

/invite @discourse_integration_name_you_chose


Thanks @sunjam, I’ll have to find out how that bot is set up in Slack, the obvious names (what it posts as, discourse_integration don’t seem to be found the slash invite command. Thanks for the pointer though!

You create the bot user as part of the documented setup process within Slack, then you have to actually invite it to each particular room. << If there is an easier way to do this I’d love to know.