Slack Integration

How to use the Slack integration for Stack Overflow Enterprise.

Joel Bradley avatar
Written by Joel Bradley
Updated over a week ago

Tags | Integrations | Slack |

Applies to: Enterprise

This documentation is for Stack Overflow Enterprise. Free, Basic, and Business users can access their documentation here. Find your plan.


Overview

The Stack Overflow Enterprise (SOE) Slack integration allows your organization to connect its internal communication tool with its internal knowledge repository. The integration lets you:

  • Capture the questions and answers that quickly get lost in your site's chat.

  • Search through your site's content to find answers to your most pressing questions.

  • Stay up-to-date on your site's latest answers and information with automated notifications.

After the Slack integration is working, links to questions and answers in your SOE site will display inside of Slack. Pasting a link into a channel or direct message will automatically show you a preview of the content. This applies both to links posted by regular users, as well as any links posted by the Slack integration's additional functions.

From the preview of a question, you can click on buttons to Answer, Comment, Suggest People to Answer, or View Accepted Answer. The actions will open up the relevant SOE page in your web browser.

The Slack integration also enables the following actions (you can view this of available actions at any time by typing "/stack help" in of Slack).

Searching SOE from Slack

One of the most powerful functions of the Slack integration is searching your Stack Overflow for Teams content directly from Slack. All versions of Stack Overflow for Teams (with Slack integration installed) allow you to search your team's content with "/stack search" followed by your search terms or keywords.

The hosted version of Stack Overflow for Teams Enterprise adds an improved search feature with a new Slack integration app. If you're using Teams Enterprise Hosted with the updated Slack app, you can also search with "@Stack Overflow for Teams" followed by your search terms or keywords. When using the improved "@Stack Overflow for Teams" command, you'll see the most-upvoted search result in a thread visible to others in the channel.

NOTE: The @ Slack search command works only on cloud-hosted Stack Overflow for Teams Enterprise (SOE) sites. If you'd like to discuss moving your on-premises site to a hosted plan, reach out to your Stack Overflow account manager.

Slack integration search commands

Teams version

Search command

All

/stack [search terms]

Enterprise Hosted

@Stack Overflow for Teams [search terms]

You can also search Stack Overflow using any Slack message as the query string via message actions. You'll find these actions when you click the three dots (more actions) button in the Slack message.

Searching through Slack mimics the way search works on Stack Overflow. The techniques and tricks you use to search Stack Overflow will also help you get the right results, faster, in Slack.

Asking a question from Slack

You can convert any message in Slack into a question on your SOE site with the more actions menu (•••) on the Slack message.

When you see a question asked that will make a helpful addition to your knowledge repository, hover over the message. Then click the (•••) Actions menu.

From there, select the action Ask on Stack Overflow for Teams.

The new interactive command "/stack ask" and ask modal helps users quickly get answers to questions and overcome issues at hand while staying within their current workflow, by drafting the question within Slack, and sending it directly to the Stack Overflow Enterprise instance.

You can ask a question directly from Slack by using the button that appears after using the "Ask on SOE" action, and input all of the information needed to ask a question on your Stack Overflow Enterprise site:

You can also use the Ask command + question to pre-populate the body of the question from within Slack: "/stack ask How do I X?"

"/stack help" has been updated to include the new command.

The suggest-to-ask prompt draft link "Another user thinks this would be a good question" has been updated to show the Ask modal within Slack instead of sending the user over to SOE.

The ask modal provides tag auto-completion for existing tags on SOE, as well as user mentions (with the autocomplete list being populated Slack-side; unmapped users will get a Slack notification instead of being mentioned). New tags can also be created when asking questions from within Slack.

Managing notifications to Slack

Regular users can manage their own notifications by clicking on their avatar at top of the page, selecting ‘Settings’, then clicking Slack integrations under the "APPS & INTEGRATIONS" heading.

NOTE: The Stack Overflow bot must be in your channel for notifications to work. If your administrator has not enabled automatic joining of the bot, you'll need to add the bot to the channel using the "/invite @Stack Overflow for Teams" command.

Private Channel Notifications

The best way to create a private channel notification is directly in Slack, following this process:

  1. Navigate to the private channel in Slack.

  2. Add the Stack bot with the command "/invite @Stack Overflow for Teams".

  3. Once the bot is added, you can create a notification using the command "/stack notify".

To modify or create private channel notifications from within Stack Overflow for Teams, the private channel on Slack must first invite the Stack Overflow application. Until that happens, Stack Overflow will not be able to see the private channel to send notifications.

Help

Users can get hints on how to use the Slack app by sending the command "/stack help" in any conversation.


If you need further support or have questions, contact your site administrator.

Did this answer your question?