Have you set up a filter rule? You can do it at /admin/plugins/slack
Yes, I tried two filter rules. One that would notify post first to a channel, and a second that would notify my Slack user on any activity. But not both at the same time.
Even if there were no filters, wouldn’t the Test Notification still work?
I deleted the initial filter rule, as the slack had renamed the
general channel to
I think I have it working now. I did two things:
- Installed the Slackdoor plugin
- Created an All Categories filter rule
I tested by disabling Slackdoor and notifications did not appear to work.
Why would Slackdoor help this? I thought the Official Slack Plugin was just an outgoing POST connection. It shouldn’t need an Incoming Webhook.
That sounds odd to me. Hard to believe, frankly.
But I just tried disabling the Slackdoor plugin on our site and indeed, “Test Notification” from the official Slack plugin does not work until I re-enable to Slackdoor plugin…
Well, “slackdoor”, whatever that may be, is not installed on our Discourse dev instance and we definitely get slack messages when new posts are made there.
This is the slackdoor plugin.
But… I just tried things again this morning, and I cannot reproduce this issue. While the slackdoor plugin is installed but disabled, notifications from the slack plugin still work when triggered by creating a post and by clicking the “Test Notification” button on the Slack plugin page.
Not sure what was happening last night when I looked first.
The “test notification” button has some quirks - when you click it, it chooses a random post from your forum to send (could include PMs). Then when it actually tries to send, it checks whether the slack user account is allowed to see the post. If not then it aborts the sending.
Tl;dr: “Test Notifications” won’t always work
(I’ve fixed this in my new implementation)
So it could be that I got really unlucky in the several times I clicked test?
But I am admin on the Slack, and admin on the Discourse forum. Shouldn’t I have access to everything that way?
Yes, it could be
It doesn’t matter what you have access to, it matters what the
slack_discourse_user has access to. By default it’s the “system” account. Regardless of permissions, the slack plugin will completely refuse to send private messages, so that could be why the test button isn’t working reliably for you.
we’re having the same issue. i’ve had one post go through using the ‘test notifications’ button, so it is able to work - but every other post and test has failed to go to our Slack thread
it might be related to the tokens. i couldn’t understand where i was supposed to find the token which the how to says i should enter
Same issue here. I even posted test post but it is not being passed to slack.
I’m not using a slackdoor plugin but the official plugin. @UkiahSmith How did you make yours work? Thanks
My personal recommendation is that you use the new plugin I wrote: Chatroom Integration Plugin (discourse-chat-integration)
It has all the same functionality, and solves a lot of bugs that the existing Slack plugin has.
Hi @david This is awesome. Should I remove the official discourse slack plugin first before integrating yours to remove conflict? Thanks.
They should work fine side by side, so it’s up to you. If you have both installed, make sure you don’t get confused with the site settings - the new plugin prefixes all of them with “chat integration”
@david is the chat integration slack access token required? Or just the chat integration slack outbound webhook url?
I’m confused why Slack incoming webhook provides url, outbound webhook provides token but in discourse - outbound is webhook url while inbound is the token.
Have you tried following the slack-specific setup instructions?
You need either the access token, OR the Webhook URL. I would recommend the access token, because it enables more functionality like posting slack transcripts to Discourse. These instructions walk you through setting up the token, and assigning the correct permissions:
For Slack integration.