Set up Rocket Chat notifications using the discourse-chat-integration plugin

This #howto describes how to setup the Rocket.Chat provider included in discourse-chat-integration.

Install

If you haven’t already, install the discourse-chat-integration plugin

Notifications

Set up Rocket Chat

Your Rocket Chat server needs to be accessible from your Discourse server in order to connect them. It is recommended that you use HTTPS, but HTTP should also work.

  1. Log in to your Rocket Chat server, click your name in the top left, then click Administration

  2. Under Integrations, click New Integration

  3. Choose Incoming Webhook

  4. Fill out the form to define how you want your bot to look inside Rocket Chat. Under “Post to Channel”, you can enter any channel name (e.g. #general). This will be overridden by Discourse, so it doesn’t matter which.

  5. Set “Enabled” to “True”

  6. Save Changes

  7. Copy the “Webhook URL”, you’ll need it later

Setup Discourse

  1. Paste the URL you copied into the chat_integration_rocketchat_webhook_url site setting

  2. Enable chat_integration_rocketchat_enabled

  3. Setup some “Rules” for your channels, according to the discourse-chat-integration instructions. Channel identifiers look like #general or @davidtaylor.

  4. Click Test on one of the channels to check everything’s working. You should receive a message like this:

  5. :rocket:

11 Likes

Hi, may I know if anyone is seeing the error below when sending a test message?

image

I don’t think the provider (rocketchat) is the problem because when i tested the below command, it’s working fine.

curl -X POST -H 'Content-Type: application/json' --data '{"text":"Example message","attachments":[{"title":"Rocket.Chat","title_link":"https://rocket.chat","text":"Rocket.Chat, the best open source chat","color":"#764FA5"}]}' https://chat.rocketchat.com/hooks/Token

{“success”:true}