---
schema: rendered-html/v1
title: "Building Integrations with Slack | Developer Portal for YouTrack and Hub Documentation"
source_url: https://www.jetbrains.com/help/youtrack/devportal/Slack-Integration-HTML.html
generated_at: 2026-06-11T14:44:09.577188+00:00
---

Feedback

Thanks for your feedback!

Was this page helpful?

YesNo

Developer Portal for YouTrack and Hub

- Developer Portal
- Apps
- MCP Tools
- YouTrack Workflows
- JavaScript Workflow Quick Start Guide
- Create a Workflow
- Edit a Workflow
- Workflow Rule Types
- Transactions
- Use Cases for Workflows
- Web-based Workflow Editor
- Using an External Code Editor
- Default Workflows
- Custom Workflow Repository
- JavaScript Workflow Reference
- Rule-specific Properties
- Context
- Requirements
- Using the Workflow API
- [Building Integrations with Slack](Slack-Integration-HTML.html)
- Using REST API Methods in JavaScript Workflows
- Working with Dates and Times
- Working with Periods
- Localized Workflow Messages
- Troubleshooting Workflows
- Remote Debugger
- [YouTrack Workflow API](jetbrains__com__help__youtrack__devportal__youtrack-api-documentation.md)
- YouTrack Import Scripts
- YouTrack Form API
- YouTrack REST API
- Hub REST API

1. YouTrack Workflows
2. JavaScript Workflow Reference
3. [Building Integrations with Slack](#0)

# Building Integrations with Slack﻿

Last modified: 07 May 2026

With the http module from the workflow API, you can use workflows to script push-style integrations with Slack. This type of integration lets you post notifications to Slack for specific issue events.

> ### note
>
> YouTrack App for Slack
>
> JetBrains has its own app for YouTrack in the [Slack App Directory](https://youtrackapptest.slack.com/apps/AEJG9S4LC-youtrack). This integration supports notifications, link previews, and issue drafts without any additional configuration.
>
> Scripting your own integration with workflows lets you choose when and where you push notifications, but it doesn't support all of the features that are built into the YouTrack app. To learn how to install and use the YouTrack app, see Slack Integration.
>
> You're not limited to one type of Slack integration or the other. You can install the YouTrack app for general use and still build custom integrations with workflows.

The workflow-based integration uses Incoming WebHooks to enable an integration between Slack and YouTrack. The YouTrack workflow sends a normal HTTP request with a JSON payload that contains the issue ID and summary.

This integration only lets you post notifications to Slack. This type of integration does not let users update issues with commands by sending direct messages to a bot account.

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

1. [Add a custom integration to Slack](/help/youtrack/devportal/Slack-Integration-HTML.html#add-custom-integration)
2. [Customize the Slack Notifications workflow](/help/youtrack/devportal/Slack-Integration-HTML.html#customize-workflow)
3. [Enable the Slack Notifications workflow in YouTrack](/help/youtrack/devportal/Slack-Integration-HTML.html#enable-workflow)

The basic setup described here lets you post notifications to a specific channel in Slack for issue events in a single YouTrack project. For more complex integrations, see [Multi-channel and Multi-project Configurations](/help/youtrack/devportal/Slack-Integration-HTML.html#multi-project).

## Add a Custom Integration to Slack﻿

This type of Slack integration is enabled on a per-project basis in YouTrack and enabled for a specific channel in Slack.

### To add a custom integration:﻿

1. In Slack, access the channel that you want to integrate with YouTrack.
2. Open the Details panel, then select Add apps from the More menu.

   [![Option to add an app to a Slack workspace.](https://crawler.prototype.prolicht.digital/l/0bUxPa)](https://resources.jetbrains.com/help/img/youtrack/slack-integration-add-app.png)
   - The Add apps dialog opens in your Slack workspace.
3. Click the Manage apps link in the header.

   [![Link to manage apps for a Slack workspace.](https://crawler.prototype.prolicht.digital/l/l9N672)](https://resources.jetbrains.com/help/img/youtrack/slack-integration-manage-apps.png)
   - The Slack App Directory page opens in your web browser.
4. Click Build in the page header.

   [![Option to build a new integration for Slack.](https://crawler.prototype.prolicht.digital/l/no56yL)](https://resources.jetbrains.com/help/img/youtrack/slack-integration-build.png)
   - The Slack API page opens.
5. Click the Create New App button.

   [![Slack integration custom](https://crawler.prototype.prolicht.digital/l/2BIVum)](https://resources.jetbrains.com/help/img/youtrack/slack-integration-create-new-app.png)
   - The Create a Slack App dialog opens.

     [![Create slack app dialog.](https://crawler.prototype.prolicht.digital/l/nwWa03)](https://resources.jetbrains.com/help/img/youtrack/create-slack-app-dialog.png)
6. Complete the fields in the form:

   - In the App Name field, assign a name to the integration.
   - From the Development Slack Workplace list, select the channel that you want to integrate with YouTrack.
7. Click the Create App button.

   - The new app opens to the Basic Information page.
8. In the Add features and functionality section of the page, click Incoming Webhooks.

   [![Slack integration basic info.](https://resources.jetbrains.com/help/img/youtrack/slack-integration-basic-info.png "Slack integration basic info.")](https://resources.jetbrains.com/help/img/youtrack/slack-integration-basic-info.png)
   - The Incoming Webhooks page opens.
9. Toggle the Activate Incoming Webhooks option to On.

   [![Slack integration incoming webhooks](https://resources.jetbrains.com/help/img/youtrack/slack-integration-incoming-webhooks.png "Slack integration incoming webhooks")](https://resources.jetbrains.com/help/img/youtrack/slack-integration-incoming-webhooks.png)
10. Scroll to the bottom of the page and click the Add New Webhook to Workspace button.

    [![Add new webhook to workspace.](https://resources.jetbrains.com/help/img/youtrack/add-new-webhook.png "Add new webhook to workspace.")](https://resources.jetbrains.com/help/img/youtrack/add-new-webhook.png)
    - The webhook is generated.
    - The page opens to a form that lets you choose where the integration posts messages in your workspace.
11. From the list, select the channel that you want to integrate with YouTrack.

    [![Channel selection for posting integration messages.](https://resources.jetbrains.com/help/img/youtrack/slack-integration-post-to-channel.png "Channel selection for posting integration messages.")](https://resources.jetbrains.com/help/img/youtrack/slack-integration-post-to-channel.png)
12. Click the Allow button.

    - A WebHook URL is added to your workspace.
13. Click the Copy button to copy the Webhook URL to your clipboard.

    [![Slack integration webhook URL.](https://resources.jetbrains.com/help/img/youtrack/slack-integration-webhook-url.png "Slack integration webhook URL.")](https://resources.jetbrains.com/help/img/youtrack/slack-integration-webhook-url.png)

    In the following procedure, you add this URL to your workflow rules in YouTrack.
14. Optionally, customize the settings for your custom integration:
15. Click the Save Settings button.

There are additional settings you can customize on the Basic Information page for your app. These settings affect the appearance of the account that posts notifications to your channel.

[![Slack integration settings.](https://resources.jetbrains.com/help/img/youtrack/slack-integration-settings.png "Slack integration settings.")](https://resources.jetbrains.com/help/img/youtrack/slack-integration-settings.png)

The following settings are available in the Display Information section of the page:

| Setting | Description |
| --- | --- |
| App name | Lets you customize the name that is displayed for notifications that are posted by the integration. |
| Short description | Lets you explain why this account is posting notifications to the channel. |
| App icon & Preview | Displays a custom image in notifications from this integration. |
| Background color | Customizes the background color. |

## Customize the Slack Notifications Workflow﻿

The next step is to edit the default Slack Notifications workflow so it sends notifications to your channel in Slack.

> ### tip
>
> Requires permissions: Update Project

### To customize the Slack Notifications workflow:﻿

1. From the Administration menu, select Workflows.
2. Locate the Slack Notifications workflow that you want to modify and click its name in the list.

   - The workflow opens in the Workflows page.
3. Click the send-to-slack link in the left menu.

   - The send-to-slack rule opens in the workflow editor.
4. Locate the variable declaration for the `SLACK_WEBHOOK_URL` and replace the value with the Webhook URL that you copied from your custom integration in the previous procedure.
5. Click the Save button in the workflow editor.

   - Your changes are applied to the script.

## Enable the Slack Notifications Workflow in YouTrack﻿

The last step is to attach the Slack Notifications workflow to your project in YouTrack.

> ### tip
>
> Requires permissions: Update Project

### To enable the Slack Integration workflow:﻿

1. Open the project that you want to integrate with Slack.
2. Click the Edit project link.
3. Select the Workflow tab.
4. From the Attach workflows list, select Slack Notifications.

   - The Slack Integration workflow is attached to your project.
5. If the requires setup label is shown next to the workflow, click the Configure project button in the sidebar to resolve any errors.

   - The workflow is enabled and ready for use with your project.

When the setup is complete and the workflow is attached to your project, notification is sent to the channel when an issue is created, resolved, or reopened in the project. If you want to include other events that are important to your team, you can easily customize this notification scheme.

![New issue notification in Slack.](https://resources.jetbrains.com/help/img/youtrack/slack-integration-new-issue.png "New issue notification in Slack.")

In each notification, the YouTrack issue ID is set as a direct link to the issue in YouTrack.

## Multi-channel and Multi-project Configurations﻿

The basic setup lets you post updates from a single YouTrack project to a specific channel in Slack. However, you can easily configure this setup for more complex integration scenarios.

### One Project, Many Channels﻿

The Slack Integration workflow is scripted to support an integration between one YouTrack project and one channel in Slack. You can add custom integrations to different channels in Slack and add the Webhook URL for each channel to your workflow rule.

To customize the workflow rule to support this case, modify the block of code that establishes a connection and sends the notification. Use the following sample as a guide:

```
const sendTo = function (hook) {
  const connection = new http.Connection(hook, null, 2000);
  const response = connection.postSync('', null, JSON.stringify(payload));
  if (!response.isSuccess) {
    console.warn('Failed to post notification to Slack. Details: ' + response.toString());
  }
}
sendTo('https://hooks.slack.com/services/T00000001/B000000001/XXXXXXXXXXXXXXXXXXXXXXXX');
sendTo('https://hooks.slack.com/services/T00000002/B000000002/XXXXXXXXXXXXXXXXXXXXXXXX');
sendTo('https://hooks.slack.com/services/T00000003/B000000003/XXXXXXXXXXXXXXXXXXXXXXXX');
```

### Many Projects, One Channel﻿

If you want to send notifications from multiple YouTrack projects to a single channel in Slack, the setup is relatively simple.

1. Follow the steps described here to add the URL for your Slack channel to the workflow rules.
2. Attach this workflow to all of the projects you want to report to Slack.

### Separate Projects, Separate Channels﻿

In a slightly more complicated setup, you have multiple teams who discuss different projects in separate channels. You want to direct notifications from specific projects to the channels where each team discusses their issues.

The easiest way to handle this situation is to create separate workflows for each project and customize the rules accordingly.

### To support this use case:﻿

1. Create a new workflow in the workflow editor. Give the workflow a name that shows its relationship to the project where it will be applied.
2. Copy the rule from the Slack Notifications workflow and add them as an on-change rule to the new workflow.
3. Update the Webhook URL in the workflow rule to reference the Slack channel that you want to notify in this project.
4. Save your changes in the workflow editor.
5. Repeat steps 1 through 4 for every channel that you want to notify in each project.
6. Attach each workflow to the project for which it has been customized.

An alternative approach is to add conditional statements to your workflow rules. With conditional statements, you can identify the project that each issue belongs to and send notifications to dedicated channels in Slack. You can then attach the same workflow to all of the projects that are referenced in the workflow and update the same set of workflow rules when you want to enable Slack integration in a new project.

To support this use case, add a conditional statement that associates each project with a specific channel. Use the following sample as a guide:

```
const hooks = {
  ctx.Project1.key: 'https://hooks.slack.com/services/T00000001/B000000001/XXXXXXXXXXXXXXXXXXXXXXXX',
    ctx.Project2.key:'https://hooks.slack.com/services/T00000002/B000000002/XXXXXXXXXXXXXXXXXXXXXXXX'
};
if (hooks[issue.project.key]) {
  const connection = new http.Connection(hooks[issue.project.key], null, 2000);
  const response = connection.postSync('', null, JSON.stringify(payload));
  if (!response.isSuccess) {
    console.warn('Failed to post notification to Slack. Details: ' + response.toString());
  }
} else {
  console.warn('Project ' + ctx.project.key + ' does not have an associated Slack hook!');
}
```

- [Building Integrations with Slack](/help/youtrack/devportal/Slack-Integration-HTML.html)
- [Add a Custom Integration to Slack](/help/youtrack/devportal/Slack-Integration-HTML.html#add-custom-integration)
- [Customize the Slack Notifications Workflow](/help/youtrack/devportal/Slack-Integration-HTML.html#customize-workflow)
- [Enable the Slack Notifications Workflow in YouTrack](/help/youtrack/devportal/Slack-Integration-HTML.html#enable-workflow)
- [Multi-channel and Multi-project Configurations](/help/youtrack/devportal/Slack-Integration-HTML.html#multi-project)

Using the Workflow APIUsing REST API Methods in JavaScript Workflows

- Privacy & Security
- Terms Of Use
- Trademarks
- Legal

Copyright © 2000–2026 JetBrains s.r.o.
