Only an Admin/Super User can do the following:
- Enable/disable the slack plugin
- Configure the Slack Plugin with an API Key Token
- Set a list of pairs: "Topic - Channel" to send slack messages
- Set a list of pairs: "Space - Channel" "to send slack messages
Navigate to Plugins > Manage Plugins
- In the Disabled Plugins tab, enable the slack integration plugin by opening the drop-down and pressing the enable button.
To register a new bot, use the following URL:
- Replace "hostname" with the name of your slack workspace.
- Make sure to give the bot a name that is similar to the name of your AnswerHub site.
- An API token will be generated when you create your new bot. Copy it for the next step.
- To learn how to set up all of the different available features for your slack bot, read slack's documentation provided on their site.
Only certain users are allowed to add and edit integrations. Get in touch with a Workspace Owner for help with whatever it is you need to do! If you aren’t allowed to install it on your workspace, you will need to ask a Workspace Admin to approve this app
/admin/integrations/slack.html in AnswerHub; enter your API token and enter the default channel for messages along with any topic mappings.
Navigation Tree Access in the Admin Dashboard: Admin Dashboard > Plugins > Slack Integration
- paste your copied API key into the text field.
- There are no limits to the number of topics that can be paired with channels.
- Separate each new topic pairing with a comma.
- Example Pairings: documentation=documentation, help=support, answerhub=general, default=main
- This means that if a (question/article/idea) is posted by having topic1 (documentation) as part of the set of tags, then it will be published to the documentation channel. If that post also has topic2 (help) as part of the tags, then it will be published to the support channel too. This implies that one post would be posted in multiple channels at the same time. In case, the post doesn’t have topic1 and topic2, then it will be defaulted to be published to the main channel
- There are no limits to the number of spaces that can be paired with channels.
- Spaces can only be paired with a channel name by pairing the space name with the channel name.
- You can go to Content > Site Structure > Spaces and then hover over the spaces to see the id from the URL in the bottom left-hand corner of the dashboard.
- Separate each new space pairing with a comma.
- Example Pairings: Default=general, Help=support
- This means the pair values under “Space To Channel List” will only send a slack message if there isn’t already a match on the “Topic To Channel List” setting. If there is no matching on the space id either, a message will be sent to the “default” channel, by specifying it in these settings.
Use the "Template Variables" at the bottom of your Slack Integration page to create message templates to be posted in the paired slack channels.
$1 is the Question Author's name
$2 is the Question Title
$3 is the Question URL
$4 is a comma-separated list of the Question Topics
$5 is the site name
$6 is the space name
- To receive the message in slack, make sure to check the box next to "Post message for questions?"
- Example Template: $1 has posted a new question with the title: $2 with the topic(s):
$4, in _$6_space. To view the new post, click on the following link: $3.
- To receive the message in slack, make sure to check the box next to "Post message for articles?"
- Example Template: $1 has posted the article with the title: $2 with the topic(s)
$4. To view the new post, click on the following link: $3.
- To receive the message in slack, make sure to check the box next to "Post message for ideas?"
- Example Template:
$1 has suggested a new idea with the following:
Idea title: $2 in $6 space
Idea Topic(s): $ 4
The site name: $5
Idea URL: $3
- Make sure to save your changes by pressing the save button.
Before you can send any messages to a channel besides #general, a user needs to invite the bot into that channel.
Changes between Slack v1 and Slack v2:
You can now include the space name in the messages templates to send to your slack channel by using the variable $6.
You can now pair your space to the channel name by using the space name instead of the space id.