Slack integration Not Working - Not in Channel Error

Hi there - I was following the chat integration docs to set up with our slack. I ran through the instructions a few times, but I seem to have an issue.

When a post (in discourse) attempts to push into our channel, the rules area in Discourse shows the error Some channels for this provider failed last time messages were sent. Click the error icon(s) to learn more.

Now, if I click the icon, I get a window coming up showing some JSON output.

I have included the raw error below as well.

{
  "error_key": null,
  "request": "",
  "response_code": "200",
  "response_body": "{\"ok\":false,\"error\":\"not_in_channel\"}"
}

If I edit the rule and attempt to send a test message, I simply get a discourse chat - provider error shown.

I know the integration is at least “partially” working as if in slack I issue a /discourse watch a command (a does not exist on purpose), it will return a list of categories. The second confirmation is that I set up my rules from within slack and they were propagated back into the admin discourse interface.

Since I am a new user, I cannot post more than a single screenshot - so I put the screenshots up on Imgur. Discourse Issues - Album on Imgur

Any suggestion? Thank you for your time.

2 Likes

To solve this, you need to add your integration bot to the particular Slack channel.
Go to the channel in Slack and type in the following command:

/invite @discourse_integration

NOTE: if you’ve named your integration something else, you’ll need to use that handle.

5 Likes