A partial archive of meta.discourse.org as of Tuesday July 18, 2017.

# Configuring Slack for Discourse Slack Plugin

tgxworld

Continuing the discussion from The Official Discourse Slack Plugin:

## Incoming Webhook

1. Go to the Incoming Webhooks configuration page for your Slack instance. Pick a channel, and click the big green “Add incoming webhook Integration” button. (You only need to do this once, even if you have multiple Discourse instances.)

NOTE: The “Post to Channel” setting above is not honored, and you will need to go to <your-discourse-url>/admin/plugins/slack once the plugin is enabled and configure the Channel you would like Discourse to post to.

2. Scroll down to Integration Settings and copy the “Webhook URL”.

3. Go to your Discourse settings page, found at <your-discourse-url>/admin/site_settings/category/plugins. In the slack outbound webhook url field, paste the webhook URL you copied from Slack.

4. Select the Enable checkbox, and save all the changed settings. That’s it! You’re done!

## Slash Commands (Optional)

By default, every new post on your Discourse will now create a Slack message in the channel you specified in step one. To change your notification defaults, go to /admin/plugins/slack on your Discourse.

1. Go to https://<your-team>.slack.com/apps/new/A0F82E8CA-slash-commands to create a new outgoing command.

2. Enter the name of the command (eg /discourse) and click “Add Slash Command Integration”:

3. In the “URL” field, enter the URL that the slash command will post to: <your-discourse-url>/slack/command

4. Copy your API token from the “Token” field:

5. Go to your Discourse settings page, found at <your-discourse-url>/admin/site_settings/category/plugins. In the left-hand menu, scroll down and click “Plugins”.

6. In the “slack incoming webhook token” field, paste your API token:

7. In Slack, go to the channel you want to post notifications to, and enter the slash command you set up in step 2.

The bot will show you the options for subscribing to notifications:

oblakeerickson

I just made an edit to step 1

NOTE: The “Post to Channel” setting above is not honored, and you will need to go to /admin/plugins/slack once the plugin is enabled and configure the Channel you would like Discourse to post to.

Because this is not the first time that I’ve been tripped up by Discourse posting to the wrong slack channel.

David_Taylor

I guess this bit should probably go as well, the default is for discourse to post to #general, regardless of what you set in step 1.