Интеграция чата Discourse

:information_source: Chat Integration is for using an external chat system together with Discourse — you may be looking for Discourse Chat which adds Chat functionality directly to Discourse.

:discourse2: Summary
:open_book: Install Guide

The Discourse Chat Integration plugin lets you send messages in your preferred chat platform when something happens in Discourse.

Messages can be triggered by:

  • New topics
  • New replies
  • Messages to a group
  • Mentions of a group

Functionality by provider

Provider Notifications Slash Commands Post Transcripts Threaded Replies
Slack :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark:
Telegram :white_check_mark: :white_check_mark:
Discord :white_check_mark:
Mattermost :white_check_mark: :white_check_mark:
Google Chat :white_check_mark:
Matrix (element.io) :white_check_mark:
Zulip :white_check_mark:
Rocket.Chat :white_check_mark:
Gitter :white_check_mark:
Stride Docs
Microsoft Teams :white_check_mark:
Basecamp Docs
IRC Cloud Docs
Flock Docs
Webex :white_check_mark:

:warning: Before you enabling Slash Commands for your provider, make sure to read the Security/Permissions section below!

Configuration

There are three key concepts in this plugin:

  • Providers: The chat platform that you’re connecting to (e.g., Slack, Discord, etc.).
  • Channels: A single chat area in your platform (e.g., channel, group chat, room, etc.). Each provider can have multiple channels.
  • Rules: The instructions for when and how Discourse should send a message to a channel. Each channel can contain multiple rules.

Configuring providers

  1. Go to Admin > Installed Plugins and ensure that the Chat Integrations plugin is enabled.
  2. Click Settings.
  3. Choose the chat platform that you’d like to connect to Discourse.

  1. For some providers (e.g., Discord), you’ll be directed straight to the next step (channel configuration). Others will ask for special information, which you’ll need to get from your chat platform.

Dedicated setup instructions for chat platforms

Configuring channels

Once you have configured a provider, you can now configure channels for that provider. From the Chat Integration plugin page, click Add channel and provide the requested information — typically a webhook URL and/or channel name, depending on the provider.

Configuring rules

After your channel is connected, you can click Create rule to create a new rule for when your community should send a message to your provider channel.

The main components of a rule are:

  • Type: What type of community content should trigger a chat message?
    • Normal: Send chats for topics in the selected category.
    • Group message: Send chats when a PM is sent to the selected group.
    • Group mention: Send chats when the selected group is mentioned.
  • Filter: You can optionally filter the rule so that it only sends chats in certain situations.
    • All posts with threaded replies: Send chats for all posts matching this rule, with replies threaded in the chat platform. This option is not available for all integrations.
    • All posts and replies: Send chats for all posts and replies that match this rule.
    • First post only: Only send chats for the first post in a topic or message that matches this rule.
    • Tag added to topic: When the create post for category and tag changes site setting is enabled, send a chat when someone adds adds a tag to a topic.
    • Mute: Do not send chats that match this rule. This is useful for carving out an exception to another broader rule.
  • Group: If you selected Group message or Group mention as the Type, select the group whose received PMs / mentions should trigger the chat.
  • Category: If you selected Normal as the Type, optionally select the category that a topic must be posted in to trigger the chat.
  • Tags: Optionally select one or more tags that matching topics must have at least one of to trigger the chat message.

What happens when there are multiple rules?

Rules are sorted first by type then by the filter:

  1. Group mentions
    1. Mute
    2. All posts and replies
    3. First post only
  2. Group messages
    1. Mute
    2. All posts and replies
    3. First post only
  3. Normal (i.e. topics)
    1. Mute
    2. All posts and replies
    3. First post only

If a post matches multiple rules, the plugin will trigger the first matching rule in the list.

For example, with the following rules

Filter Category Tags
All posts and replies Mentions of: @team (all tags)
Mute Support (all tags)
First post only Support unsupported-install
All posts and replies (all categories) (all tags)

Notifications would be triggered for:

…but not for:

Security / Permissions

By default the system account is used, which means that there is no restriction on notifications sent.

To secure your notifications, you should create a non-staff user with appropriate access privileges, and enter its username in the chat integration discourse username setting.

Slash Commands

If your provider supports slash commands, you can manage rules from within your chat interface. Each provider varies slightly in syntax, but in general they follow a similar structure. (Note that at this time, only the Slack integration implements threads.)

The commands available are

Posting a transcript

If your provider supports transcript posting, you can post your instant messaging history to discourse. This is currently only supported for the Slack provider. Note: You will need to be using the “Access Token” method of connecting to Slack.

Send /discourse post to see the interface. The plugin will try and “guess” where your current conversation starts, by looking for a gap in the message history of more than 3 minutes.

Alternatively, you can specify a number of posts after the command, or a URL to the first message.

To load a transcript for a Slack thread, you can use /discourse post thread {url}, where {url} is the permalink of the first message in the thread. For example:

/discourse post thread https://<slackname>.slack.com/archives/C6029G78F/p1522952993000017

Alternatively, you can use /discourse post with a thread-specific permalink like this:

/discourse post https://foo.slack.com/archives/G49KKS6AX/p1523062012000911?thread_ts=1523091738.000088&cid=G49KKS6AC

In both cases the “first/last message” UI is skipped - the entire thread is included in the transcript.

Adding new providers

Option 1: Submit a PR implementing your provider:

Option 2: Use your own plugin:
It is possible for third party plugins to register new “providers”. As an example, I’ve created a provider which sends webhooks to IFTTT. This could be used to automatically publish all posts in a category to facebook… or turn on your light when someone posts in Contribute > Feature… or feed your fish whenever there’s a new Customization > Plugin.

CHANGELOG

TODO

Last edited by @lindsey 2026-04-21T21:14:15Z

Check documentPerform check on document:
115 лайков
Set up Slack notifications using the discourse-chat-integration plugin
Set up Mattermost notifications using the discourse-chat-integration plugin
Set up Rocket Chat notifications using the discourse-chat-integration plugin
Set up Microsoft Teams notifications using the discourse-chat-integration plugin
Set up Google Chat notifications using the discourse-chat-integration plugin
Set up Matrix (element.io) notifications using the discourse-chat-integration plugin
Set up Gitter notifications using the discourse-chat-integration plugin
Set up Webex notifications using the discourse-chat-integration plugin
Tool for Tossing out Notifications via Discord
iOS Mobile App Notifications
Will Rocket Chat and others get transcript posting?
Dynamic of community with a chat and discourse page
Slack to Discourse
Discord chat integration for open source projects
Auto Post New Topics to Social Media
Moving from Slack to Discourse
Telegram integration
Discourse-official-slack: no error message after failed post to slack
Set up Telegram integration using the discourse-chat-integration plugin
IFTTT Chat Integration Plugin - curious on status
Federation support for Discourse
Slack Plugin Still Active?
Set up Zulip notifications using the chat integration plugin
Comment on a question instead of answering it
Query on Discourse Integration with Google Chat
German People here
[PAID] Turning Discourse Forum to Messenger App
Contributor Interviews – David Taylor
Add a new provider to discourse-chat-integration
Yammer integration
Best chat integration for a Forum breakout
Configure Discord Login for Discourse
Steam Authentication & Integration
Set up Slack notifications using the discourse-chat-integration plugin
Libera Chat Integration
Help configuring Slack Discourse plugin
How can I beef up Discourse notifications?
HipChat Integration
Notifications integration for Facebook and Twitter
Plugin for auto posting to social media?
Two-way sync chat with discourse
Set up Slack notifications using the discourse-chat-integration plugin
Send summary of new posts to chat instead of every post update
Discourse to Discord bot possible?
Writing messages from Slack to Discourse
Writing messages from Slack to Discourse
Internal Onebox links cause full page reload
Gitter support in chat-integration appears to be missing settings and rules
Advice for getting my little game dev community "out there?"
Can Discourse Integrate with Free Slack?
Discourse & Drift Chatbot
Checking if post or thread - Ruby
Nextcloud support
Discourse Data Explorer Query Response to Slack
Help configuring Slack Discourse plugin
Advice for starting a community site for housing cooperative
More Like WhatsApp for addiction support?
Optionally threading posts to parent topic in slack integration
Set up Power Automate to send Microsoft Teams notifications using the discourse-chat-integration plugin
Optionally threading posts to parent topic in slack integration
Feed Discourse posts into my Discord server?
Twilio - for SMS notifications to users - Anyone Else Interested?
Discourse Chat vs Chat Integration plugins
Discourse vs Salesforce Community vs Slack
Discourse for Teams is here!
Adding a confirmation to particular tag groups and @mentions
Introducing Discourse Chat (BETA)
Different layout for posts with/without tags in webex chat integration
Chat Integration and Discourse Chat
Set up Mattermost notifications using the discourse-chat-integration plugin
Slack Bot Construction Kit :robot:
Configure Groupme provider with the discourse-chat-integration plugin
Set up Discord notifications with the discourse-chat-integration plugin
Test message works, but normal messages are never triggered
Integration of https://signal.org/ chat
Set up Slack notifications using the discourse-chat-integration plugin
Discourse as a Conference App (in person, virtual, or hybrid)
Can you enable a plugin that integrates slack and discourse?
We would like to add the plugin "discourse chat integration", but INCOMPATIBLE PLUGIN is returned
Babble Chat
Dedicated chat client?
Discourse Chat
Set up Telegram integration using the discourse-chat-integration plugin
Bundling more popular plugins with Discourse core
Current Projects - April 2026

Было бы интересно добавить поддержку собственного плагина ActivityPub для Discourse (ActivityPub Plugin), чтобы публикация могла запускаться на основе тегов и других фильтров из интеграции с чатом.

1 лайк

Здравствуйте! В прошлом году Telegram анонсировал форумы/темы (мини-чаты внутри групповых чатов). Я пытался подключить каждый отдельный мини-чат к той или иной категории моего сайта. Но, насколько я понимаю, адреса тем не поддерживаются плагином? Например, в моём случае каждая тема имеет адрес следующего вида: @telegram_topic /1, @telegram_topic /2, @telegram_topic /3 и так далее.
Если я вставляю в строку стандартное название чата, например @telegram_chat, всё работает без проблем.
Было бы очень удобно, если бы плагин поддерживал возможность вставки подобных адресов чатов (../1). Тогда пользователям не пришлось бы быть подписчиками множества независимых каналов, привязанных к определённым категориям сайта.

1 лайк

Вы рассматривали возможность использования тегов для решения этой задачи?

:thinking: Я думаю, что использование тегов не совсем подходит для моего случая. Потому что даже с помощью тегов я не хочу, чтобы все уведомления шли в один канал, создавая информационный шум. В то же время, вместо 20 каналов для 20 категорий/тегов, я предпочитаю иметь одну групповую чат-комнату, где можно организовать несколько мини-тематических чатов (по категории/тегу), где каждый пользователь может просматривать нужный ему мини-чат и иметь возможность заглянуть в другие мини-чаты. Меня это сильно беспокоит, потому что в моем регионе (Азия) большинство людей используют чаты WhatsApp и Telegram — форумы не популярны. Но я пытаюсь найти компромисс).

Ps. Если я часто повторяюсь, не судите строго, я просто пытаюсь правильно передать свои мысли, так как использую Google Переводчик.

1 лайк

Насколько я вас понимаю, вы должны иметь возможность фильтровать, какие теги применяются к каким чатам.

Кажется, мы говорим о разных вещах :thinking: У меня нет вопроса о фильтрации чатов по тегам или категориям.

Для контекста: ранее в Telegram были каналы и чаты (за исключением ботов). У этих каналов и чат-комнат были имена пользователей, например, @chat_username или @channel_username.

С прошлого года в Telegram появилась возможность превращать чаты в форумы, содержащие мини-тематические чаты, подобные этому. У этих мини-чатов есть свои имена пользователей, например @chat_username /1, @chat_username /2. Удобство таких чатов с мини-чатами заключается в том, что пользователю больше не нужно подписываться на несколько отдельных чатов, достаточно подписаться на один чат (например, с названием моего сайта) и получить доступ ко многим мини-чатам (в моём случае каждый мини-чат будет ориентирован на конкретную категорию на сайте), которые интересны пользователю.

Теперь я хочу подключить эти мини-чаты к этому плагину, но, как мне кажется, плагин не поддерживает имя пользователя мини-чата в формате chat_username /1.

1 лайк

Существует ли способ создать правило, позволяющее помечать новое сообщение и/или ответ тегом, чтобы они не отправлялись в целевую систему чата (в данном случае Slack)?

Привет, Альберт! Если речь идёт о обычных тегах Discourse, вы можете настроить фильтр ‘mute’, чтобы темы с этим тегом не вызывали уведомления в Slack.

Однако, если речь идёт об отдельных сообщениях, отфильтровать их невозможно.

1 лайк

Я думаю, у меня такое же желание, как у тебя, Аида:

Мне бы очень хотелось иметь чат в Telegram с включённой функцией тем (которые в некоторой степени соответствуют категориям на Discourse), а затем в настройках интеграции Discourse/Chat указать, в какую тему он должен публиковать сообщения.

Я попытался создать чат с темами прямо сейчас (только с ботом и мной), но когда я ввожу /help внутри темы, бот отвечает в общем чате.

Ты изучал это, @david? Я нашёл эту тему на Stack Overflow, где показано, как получить message_thread_id (что является идентификатором темы), и указано, что API бота получил поддержку этого в версии 6.3.

Спасибо за твою работу в любом случае! :heart_hands:t2:

1 лайк

Привет @ErlendMS :wave:. На данный момент у нас нет в плане улучшений для этого плагина, но если кто-то захочет добавить поддержку «потоков» (также называемых темами) для интеграции с Telegram, это, скорее всего, будет приветствоваться как pr-welcome.

У нас уже есть некоторая поддержка потоков в интеграции со Slack, поэтому, вероятно, можно будет переиспользовать часть этой логики.

3 лайка

Возможно ли использовать этот плагин для получения уведомлений в Slack, когда пост помечается на проверку? Спасибо.

Расширяет ли этот плагин набор функций API?

Где я могу запросить ревью PR? Я отправил этот PR на прошлой неделе, чтобы добавить нового провайдера, но он всё ещё ожидает ревьюера. Я просмотрел различные руководства для разработчиков на сайте Meta, но не нашёл информации о правильном порядке запроса ревью PR.

Вот мой PR: FEATURE: Added Power Automate as a new provider by benoitdesnoyers · Pull Request #204 · discourse/discourse-chat-integration · GitHub

Спасибо,

1 лайк

Всем привет! Мы только что объединили этот PR для плагина интеграции чата.

Это изменение направлено на удаление опции tags_changed из фильтрации правил в интеграции чата — мы делаем это, потому что удаляем настройку «Создание небольшого поста действия при изменении категории или тегов темы».

Однако функциональность останется той же, если у вас установлен Discourse Automation. В следующий раз, когда вы запустите миграции для этого плагина, будет добавлен скрипт в плагин Discourse Automation, который будет работать аналогично текущему.

Вот пример автоматизации, которая будет создана:

Сообщение будет отправлено в мой канал на основе категорий и отслеживаемых тегов, которые я выбрал.

${ADDED_AND_REMOVED} — это текст по умолчанию; он будет работать так же, как и правило.

Мы также добавили для этого скрипта несколько опций, которые можно использовать в сообщении:

  • ${TOPIC} — название темы
  • ${REMOVED_TAGS} — удалённые теги
  • ${ADDED_TAGS} — добавленные теги

События удаления и добавления сработают только в том случае, если в них есть хотя бы один тег.
Например: сообщение added: ${ADDED_TAGS} сработает только если есть добавленные теги.

4 лайка

У нас возникла проблема с другим PR (пользователи, использующие других провайдеров, не могли использовать автоматизацию при изменении тегов темы), поэтому для её решения мы создали новый PR, в котором учитываем каждого провайдера.

Настройка Создание небольшого поста-действия при изменении категории или тегов темы не будет отображаться в интеграции чата.

Если у вас установлен плагин discourse automation, то при следующем запуске миграций для этого плагина к плагину автоматизации Discourse будет добавлен скрипт, который будет работать аналогично текущей реализации.


Ваши автоматизации будут выглядеть примерно так:

В качестве провайдеров используются провайдеры со статусом enabled (включены).

Например, у меня включены Discord, Slack, Telegram и Google Chat.

Ваш channel name — это имя, которое вы указали в настройках интеграции чата.

Например, здесь имя — Spidey.

3 лайка

У нас есть новая порция изменений для Автоматизации/интеграции с чатом

В этой новой порции notable изменения:

  • Мы добавили «Запуск при личных сообщениях», что позволяет вам контролировать, должна ли эта автоматизация запускаться даже при личных сообщениях.
  • Исправлена проблема, при которой автоматизация с триггером «Изменены теги темы» запускалась во время создания темы.
3 лайка

Как уже упоминалось ранее – здесь

Текущая настройка сайта «Создавать посты при изменении категорий и тегов» может приводить к утечке приватных тегов и категорий; одним из способов сохранения этой функции стало перенесение её в whispers:

Она работает аналогично небольшим постам, но теперь необходимо указать в настройке whisper allowed groups хотя бы одну группу, чтобы функция работала.

Я объединил PR для ядра с этим изменением, а также PR для плагина chat-integration, удалив использование указанной настройки; добавленная обратно функция автоматизации должна быть полностью эквивалентна действию «small action». Если у кого-то возникнут проблемы, пожалуйста, дайте нам знать!

3 лайка

У меня есть ещё несколько обновлений для этого плагина :steam_locomotive:

Мы добавили поле trigger on для автоматизации «Отправить сообщение интеграции чата».

Что это делает?

Оно проверяет, когда теги:

  • Добавлены и удалены (по умолчанию)
  • Добавлены
  • Удалены

В настоящее время эта проверка является инклюзивной.

Хороший пример: если я установлю значение Добавлены, то для запуска этой автоматизации необходимо, чтобы к теме был добавлен любой тег.

Когда установлено Теги добавлены, таблица автоматизации выглядит так:

Добавлен тег к теме Удалён тег из темы Запускалась ли автоматизация?
:white_check_mark: :cross_mark: :white_check_mark:
:white_check_mark: :white_check_mark: :white_check_mark:
:cross_mark: :white_check_mark: :cross_mark:

Когда установлено Теги удалены, таблица автоматизации выглядит так:

Удалён тег из темы Добавлен тег к теме Запускалась ли автоматизация?
:white_check_mark: :cross_mark: :white_check_mark:
:white_check_mark: :white_check_mark: :white_check_mark:
:cross_mark: :white_check_mark: :cross_mark:
2 лайка


Тема: Невозможно получить доступ к разделу «Плагины» для настройки интеграции чата

Здравствуйте,

Я являюсь администратором форума LXDAO и пытаюсь настроить плагин интеграции чата Discourse для подключения к Telegram. Согласно официальной документации, я должен иметь возможность настроить это в разделе «Плагины» панели администратора.

Однако в моей панели администратора у меня есть доступ только к четырем разделам: Общие, Модерация, Безопасность и Отчеты. Раздел «Плагины», упомянутый в документации, apparently недоступен.

Не могли бы вы помочь мне понять:

  1. Установлен ли плагин интеграции чата на нашем форуме?
  2. Нужны ли мне дополнительные права для доступа к разделу «Плагины»?
  3. Если мы используем размещенное решение Discourse, существуют ли какие-либо ограничения на установку/настройку плагинов?

Как администратору, какие шаги мне следует предпринять для правильной настройки интеграции Telegram для нашего сообщества?

Спасибо за вашу помощь!