Skip to main content
Integration for Slack

Do more with Stack Overflow for Teams with the integration for Slack.

Jamie Lowery avatar
Written by Jamie Lowery
Updated this week

Tags | Integrations | Slack |

Applies to: All Stack Overflow for Teams

Overview

The Stack Overflow for Teams integration for Slack 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 Team's chat.

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

  • Stay up-to-date on your Team's activity in questions, answers, and Articles with automated notifications.

Once the integration is set up, any links to questions and answers in your Team will now unfurl inside of Slack. Pasting a link into a channel or direct message will automatically unfurl the link and show you a preview of the content. This applies both to links posted by regular users, as well as any links posted by the integration for Slack's additional functions.

Previews of questions, answers, and Articles show buttons across the bottom. Depending on the type of post displayed and its status, these buttons may include Upvote, Answer, Comment, Suggest People to Answer, View, or View Accepted Answer. The actions will open up the relevant Teams page in your web browser.

The integration for Slack also enables the following actions. The list of available actions can also be reviewed by typing "/stack help" inside of Slack.

Search Stack Overflow for Teams from Slack

One of the most powerful functions of the integration for Slack is searching your Stack Overflow for Teams content directly from Slack. All versions of Stack Overflow for Teams (with integration for Slack 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 integration for app for Slack. If you're using Teams Enterprise Hosted with the updated app for Slack, 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. Find your plan.

Integration for Slack 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.

Ask a question on Stack Overflow for Teams from Slack

You can convert any message in Slack into a question on Stack Overflow for Teams via message actions on the Slack message. When you see a question asked that would make a helpful addition to your knowledge repository, hover over the message and click the three dots (more actions) button. Select Ask on Teams.

That will prompt users in the channel to post the question on Stack Overflow for Teams instead. A button to ask the question on your Team will appear, allowing you to draft the question within Slack, and send it directly to Stack Overflow for Teams.

You can ask a question directly from Slack by using the button that appears after using the Ask on Teams action shown above, or by typing "/stack ask".

The ask pop-up provides tag auto-completion for existing tags on Stack Overflow for Teams, as well as user mentions. You can also create new tags when asking questions from within Slack.

Manage notifications to Slack

You can add Stack Overflow for Teams notifications to Slack channels and direct messages to keep up with your Team's activity in questions, answers, and Articles. You can configure notifications directly within Slack by using "/stack notify". You can also configure notifications from inside your Team.

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 with "/invite @Stack Overflow for Teams" (Teams Free, Basic, or Business) or "/invite @Stack Overflow Enterprise" (Teams Enterprise).

To manage your Slack notifications from within Stack Overflow for Teams, click your avatar (profile pictures) at the top of the page. Select your account settings, then click integration for Slacks under the "INTEGRATIONS" or "APPS & INTEGRATIONS" heading.

To create a new notification, click Create Slack notification. In the "Get notifications" box, use the checkboxes to select which types of activity you want to be notified about.

You can set the integration for Slack to notify you when:

  • @mentions You're added to the list of users to notify about a question.

  • Questions There's a new question.

  • Edited questions Someone edits a question.

  • Answers There's a new answer.

  • Updated answers Someone updates an answer.

  • Accepted answers There's a new accepted answer.

  • Comments There's a new comment.

  • Articles There's a new Article.

Once you've selected what you want to be notified about, choose the format of the notification.

  • Long Includes the full title and up to 600 words of the post body.

  • Short Includes the full title and a short snippet of the post body.

  • None Shows the full title of the post, but not the body.

You can then set what content you want to be notified about.

You can set the notification to watch for activity in tags or a Community (if enabled). The default is All tags, but you can also specify specific sets of tags. For example, if your design team has a #design channel in Slack, you can specify that any questions tagged with css, html, design, etc. should trigger a notification in #design. Setting up notifications with specific sets of tags helps keep teams up to date with knowledge relevant to them, and reduces noise.

If your site has Communities, you can set up notifications for Community activity instead of tags. Choose the Community from the What community... pull-down menu.

NOTE: You can't create a single notification to watch both tags and a Community. Create multiple notifications if you want both.

Lastly, indicate where you want to receive notifications.

You can choose to receive notifications to public channels and direct messages. Public channels must have the Stack Overflow for Teams bot as a member to receive notifications.

With all options set, click Create notification. Create as many notifications as you need to stay informed of activity on Stack Overflow for Teams. You can edit or delete your Slack notifications at any time from the same page used to create them.

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 Overflow bot with the command "/invite @Stack Overflow for Teams".

  3. After Slack adds the bot, 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.

Get hints

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


Need help? Submit an issue or question through our support portal.

Did this answer your question?