YouTrack Standalone 2017.3 Help

Slack Integration (XMPP)

You can configure your Jabber settings in YouTrack to enable an integration with Slack. This integration lets you use the XMPP protocol to exchange information between the two applications:

  • Receive notifications in Slack for updates to issues in YouTrack.

  • Enter commands in Slack to update issues in YouTrack.

To set up an integration with Slack, follow these steps:

  1. Enable the XMPP Gateway in Slack
  2. Create a Slack Account for the Jabber Bot
  3. Enable and Configure Jabber Bot
  4. Send a Test Message to Slack
  5. Add your Slack Account to YouTrack
  6. Interact with Issues in Slack

Enable the XMPP Gateway in Slack

The first step is to open the gateway so users can connect to Slack over XMPP.

To open the XMPP gateway:

  1. Log in to Slack. You must use the account that is set as the Primary Owner of the team.

  2. From the menu, select Team Settings.

  3. Select the Permissions tab.

  4. Expand the Gateways section of the page, then select Enable XMPP gateway (SSL only).

    slackGateways thumbnail

  5. Click the Save Settings button.

    — The XMPP gateway is enabled.

Create a Slack Account for the Jabber Bot

To interact with YouTrack in Slack, you need to set up an account that you can use as a channel for two-way communication. Unlike the built-in slackbot, you need to create a user account in Slack that you can use for this purpose.

To create an account:

  1. From the menu, select Invite People.

  2. Select the type of account you want to create.

  3. Enter the email address for the Jabber Bot account. The address must belong to an account that you can access, as you will need to accept the invitation and log in to Slack with this account.

  4. Click the Invite 1 Person button.

    — The invitation is sent to the email address.

  5. Open and accept the invitation in your email inbox.

  6. Log in to Slack with the account you created for the Jabber Bot.

  7. Open the View Profile & Account > Account page.

  8. In the Gateways section, click the Gateway Configuration button.

    — The instructions and values you need to configure the XMPP connection are displayed.

    slackXMPP thumbnail

    Now you have all the information you need to configure the notification channel to use Slack. Leave this page open and head over to YouTrack.

Enable and Configure Jabber Bot

The next step is to configure the Jabber notification channel to connect with Slack and enable the Jabber Bot in YouTrack.

To enable Jabber Bot:

  1. In YouTrack, open the Administration > General Settings page.

  2. In the Notifications section, select the Enable option for Jabber.

    — Additional input fields for the Jabber configuration are shown.

    slackJabberBot thumbnail
  3. Enter the following values in the input fields:

    Field

    Description

    Jabber server

    Enter the value that is displayed as the Host for the Jabber Bot account in Slack. This value uses the format [Slack-teamname].xmpp.slack.com.

    Jabber server port

    Enter the port used for XMPP communication. The default port is 5222.

    Jabber service name

    Leave this field empty.

    Jabber username

    Enter the username of the Jabber Bot account. Use the value that is displayed as the User for the Jabber Bot account in Slack. This is also displayed in Slack as the handle. Don't enter the username in user@host format.

    Jabber password

    Enter the value that is displayed as the Pass for the Jabber Bot account in Slack.

  4. Select the Enable Jabber Bot check box.

  5. Click the Save button.

    — YouTrack confirms that the settings were updated.

Send a Test Message to Slack

To confirm that the connection is configured correctly, send a test message to Slack.

To send a test message:

  1. Click the Send test jabber message button.

    The Test Jabber dialog opens.

  2. Enter the Jabber account of a recipient in Slack — not the account for the Jabber Bot. You can use your own Slack account, or the account of another known user. Enter the username in the format [username]@[Slack-teamname].xmpp.slack.com.

  3. Click the Send button.

    — YouTrack sends a test message to the Slack account. If the setup is configured correctly, YouTrack confirms that the message was sent successfully.

Almost done! Take a moment to prepare your team for the next step:

  • Post a message in your team channel in Slack and introduce them to Jabber Bot.

  • Pat yourself on the back for configuring the integration.

Before you or your team members can start chatting with Jabber Bot, there's one last step to follow. Send your team a link to this page and tell them to read the following instructions.

Add your Slack Account to YouTrack

To enable personal notifications in Slack and use the Jabber Bot to interact with YouTrack, you need to add your Slack account to YouTrack.

To add your account to YouTrack:

  1. Access your Profile page in YouTrack (click your avatar and select Profile).

  2. Click the Hub Profile link to open your user profile in the Hub service.

  3. In the input field for Jabber, enter the username of your Slack account. Enter the username in the format [username]@[Slack-teamname].xmpp.slack.com.

  4. To confirm the setup, return to your Profile page in YouTrack and the Send test jabber message link.
    slackProfileJabber thumbnail

    — A test message is sent from the Jabber Bot account to your user account in Slack.

    slackWelcome thumbnail
  5. Click the Save button.

    — The Slack account is saved in your user profile.

You can now receive notifications in Slack for updates to issues in YouTrack and enter commands in Slack to update issues. While you're on your profile page, you might as well open the Filters and Notifications tab and configure the notifications you want to receive.

To learn more about how to interact with issues in Slack, read on!

Interact with Issues in Slack

Now that you've enabled Jabber notifications to use Slack, here's how it works:

  • You receive notifications in Slack according to the notification settings in your YouTrack user profile. These notifications are sent as a direct message by the Jabber Bot account.
    The Jabber Bot remembers the issue context for the current conversation. When you receive a notification from YouTrack, you can skip the issue ID in your reply.

  • You can apply commands to issues by chatting with the Jabber Bot account. To apply commands, use the format [issue number] [command] [value].

    slackUpdateIssue thumbnail

    The Jabber Bot remembers the issue context for the current conversation. When you apply a command to a specific issue, you can omit the issue ID in subsequent replies.

  • You can apply comments to multiple issues by entering the issue numbers, separated by commas or spaces.

While this integration is not as feature-rich as other XMPP integrations, it does give you the flexibility to work with Slack — a team communication platform that development teams love to use. If you're working with a team that relies on Slack for communication, you don't have to switch to your email client to stay up-to-date with your issues in YouTrack.

Last modified: 7 March 2019