Integrações de Chat do 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 curtidas
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
Auto Post New Topics to Social Media
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
Discourse-official-slack: no error message after failed post to slack
Moving from Slack to Discourse
Telegram integration
Set up Telegram integration using the discourse-chat-integration plugin
Federation support for Discourse
Add a new provider to discourse-chat-integration
Set up Zulip notifications using the chat integration plugin
German People here
Contributor Interviews – David Taylor
IFTTT Chat Integration Plugin - curious on status
Slack Plugin Still Active?
Steam Authentication & Integration
Yammer integration
Query on Discourse Integration with Google Chat
Set up Slack notifications using the discourse-chat-integration plugin
Configure Discord Login for Discourse
Comment on a question instead of answering it
Best chat integration for a Forum breakout
[PAID] Turning Discourse Forum to Messenger App
Set up Power Automate to send Microsoft Teams notifications using the discourse-chat-integration plugin
Optionally threading posts to parent topic in slack integration
Can you enable a plugin that integrates slack and discourse?
Libera Chat Integration
More Like WhatsApp for addiction support?
Advice for starting a community site for housing cooperative
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
Help configuring Slack Discourse plugin
Discourse Data Explorer Query Response to Slack
Nextcloud support
Checking if post or thread - Ruby
Discourse & Drift Chatbot
How can I beef up Discourse notifications?
Help configuring Slack Discourse plugin
Can Discourse Integrate with Free Slack?
Advice for getting my little game dev community "out there?"
Bundling more popular plugins with Discourse core
Gitter support in chat-integration appears to be missing settings and rules
Internal Onebox links cause full page reload
Writing messages from Slack to Discourse
Writing messages from Slack to Discourse
Discourse to Discord bot possible?
Send summary of new posts to chat instead of every post update
Set up Slack notifications using the discourse-chat-integration plugin
Two-way sync chat with discourse
Plugin for auto posting to social media?
Notifications integration for Facebook and Twitter
HipChat Integration
Twilio - for SMS notifications to users - Anyone Else Interested?
Discourse Chat vs Chat Integration plugins
Discourse for Teams is here!
Discourse vs Salesforce Community vs Slack
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:
Feed Discourse posts into my Discord server?
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)
Optionally threading posts to parent topic in slack integration

Seria interessante adicionar suporte ao próprio Discourse ActivityPub Plugin para que a publicação pudesse ser acionada com base em tags e outros filtros da integração de chat.

1 curtida

Olá, no ano passado o Telegram anunciou fóruns/tópicos (mini chats dentro de chats em grupo). Tentei conectar cada mini chat individual a uma ou outra categoria do meu site. Mas, pelo que entendi, os endereços de tópicos não são suportados pelo plugin? Por exemplo, no meu caso, cada tópico tem um endereço como o seguinte: @telegram_topic /1, @telegram_topic /2, @telegram_topic /3
Se eu inserir um nome de chat padrão na linha, por exemplo @telegram_chat, ele funciona sem problemas.
Seria muito conveniente se o plugin tivesse a capacidade de inserir endereços de chat semelhantes (../1), então os usuários não teriam que ser assinantes de muitos canais independentes vinculados a certas categorias do site.

1 curtida

Você já considerou usar tags para conseguir isso?

:thinking: Acho que usar tags não é totalmente adequado para o meu caso. Porque mesmo com a ajuda de tags, eu não gostaria que todas as notificações fossem para um único canal, criando ruído de informação. Ao mesmo tempo, em vez de ter 20 canais para 20 categorias/tags, eu preferiria ter um grupo de chat onde eu pudesse organizar vários mini-chats temáticos (por categoria/tag) onde cada usuário pudesse ver aquele que ele precisa e a capacidade de olhar para outros mini-chats. Estou tão incomodado porque na minha região (Ásia) a maioria das pessoas usa chats do WhatsApp e Telegram - fóruns não são populares. Mas estou tentando encontrar um compromisso).\n\nPs. Se eu me repetir com frequência, não me julgue, estou apenas tentando transmitir meus pensamentos corretamente, pois uso o Google Tradutor.

1 curtida

Você deve ser capaz de filtrar quais tags se aplicariam a quais chats, pelo menos pelo que estou entendendo.

Parece que estamos falando de coisas diferentes :thinking: Eu não tenho uma pergunta sobre filtrar chats por tags/categorias.
Para contexto. Anteriormente, o Telegram tinha canais e chats (exceto por bots). Esses canais/salas de chat têm um nome de usuário, aproximadamente @nome_de_usuario_chat ou @nome_de_usuario_canal.
Desde o ano passado, o Telegram tem a oportunidade de transformar chats em fóruns contendo mini chats temáticos como este. Esses mini chats têm seus próprios nomes de usuário, por exemplo @nome_de_usuario_chat /1, @nome_de_usuario_chat /2. A conveniência de tais chats com mini chats é que o usuário não precisa mais se inscrever em vários chats separados uns dos outros, mas apenas se inscrever em um chat (por exemplo, com o nome do meu site) e ter acesso a muitos mini chats (no meu caso, cada mini chat visaria uma categoria específica no site) que são de interesse do usuário.
Agora quero conectar esses mini chats a este plugin, mas parece que o plugin não suporta o nome de usuário do mini chat como nome_de_usuario_chat /1.

1 curtida

Existe uma maneira de criar uma regra onde eu possa marcar uma nova mensagem e/ou resposta para que ela não seja postada no sistema de chat de destino (neste caso, Slack)?

Olá Albert, se estivermos falando sobre tags normais do Discourse, você pode configurar um filtro de ‘mutar’ para impedir que tópicos com essa tag acionem notificações no Slack.

Mas em termos de posts individuais, não há como filtrá-los.

1 curtida

Eu acho que tenho a mesma vontade que você, Aizada:

Eu adoraria poder ter um grupo de chat no Telegram, com tópicos ativados (que correspondem de alguma forma às categorias no Discourse), e então, nas configurações de integração do Discourse/Chat, especificar para qual tópico ele deve postar.

Tentei criar um grupo de chat com tópicos agora (apenas com o bot e eu), mas quando digito /help dentro de um tópico, o bot responde no chat geral.

Você já deu uma olhada nisso, @david? Encontrei este tópico no Stack Overflow, que mostra como obter o message_thread_id (que é o ID do tópico) e diz que a API do bot teve suporte para isso na versão 6.3.

Obrigado pelo seu trabalho de qualquer forma! :heart_hands:t2:

1 curtida

Olá @ErlendMS :wave:. No momento, não temos nenhuma melhoria planejada para este plugin em nosso roteiro, mas se alguém quisesse adicionar suporte a ‘threading’ (também conhecido como tópico) para a integração do Telegram, provavelmente seria pr-welcome.

Temos algum suporte a threading na integração do Slack, então deve ser possível reutilizar parte dessa lógica.

3 curtidas

É possível usar este plugin para receber notificações no Slack sempre que uma postagem for sinalizada para revisão? Obrigado.

Este plugin expõe funções adicionais de API?

Onde solicito uma revisão de PR? Submeti este PR no final da semana passada para adicionar um novo provedor e ele ainda está aguardando um revisor. Procurei em diferentes guias de desenvolvedor no meta e não encontrei um para solicitações de PR adequadas.

Aqui está o meu PR: FEATURE: Added Power Automate as a new provider by benoitdesnoyers · Pull Request #204 · discourse/discourse-chat-integration · GitHub

Obrigado,

1 curtida

Olá pessoal! acabamos de mesclar este pr para o plugin de integração de chat

Esta alteração visa remover a opção tags_changed da filtragem de regras da integração de chat – estamos fazendo essa alteração porque estamos removendo a configuração Criação de um pequeno post de ação quando a categoria ou as tags de um tópico mudam.

Mas a funcionalidade permanecerá a mesma, se você tiver o discourse automation instalado. Na próxima vez que você executar as migrações para este plugin, ele adicionará um script ao plugin discourse automation que funcionará de forma semelhante ao que temos atualmente.

Este é um exemplo de automação que será criada:

Será enviado para o meu canal com base nas categorias e tags que estou observando.

${ADDED_AND_REMOVED} é o texto padrão; ele se comportará da mesma forma que a regra faria.

Também adicionamos para esta opção de script algumas opções que podem ser usadas na mensagem:

  • ${TOPIC} para o nome do tópico
  • ${REMOVED_TAGS} para as tags removidas
  • ${ADDED_TAGS} para as tags adicionadas
    ambos removidos e adicionados só serão acionados se tiverem uma tag neles.
    Por exemplo: a mensagem added: ${ADDED_TAGS} só será acionada se houver tags adicionadas
4 curtidas

Tivemos um problema com o outro PR (usuários que usaram outros provedores não puderam usar a automação quando as tags de tópico mudavam), então, para resolvê-lo, fizemos este novo PR, onde consideramos todos os provedores.

A configuração Criação de uma postagem de ação pequena quando a categoria ou as tags de um tópico mudam não aparecerá na integração de chat.

Se você tiver o discourse automation instalado, da próxima vez que executar as migrações para este plugin, ele adicionará um script ao plugin discourse automation que funcionará de forma semelhante ao que temos atualmente.


Suas automações se parecerão com algo assim:

E seus provedores são os provedores habilitados.

Por exemplo, tenho Discord, Slack, Telegram e Google Chat habilitados.

Seu nome do canal é o nome que você deu nas configurações de integração de chat.

Por exemplo, o nome aqui é Spidey.

3 curtidas

Temos um novo lote de alterações para Automation/chat-integration

Neste novo lote, as alterações notáveis são:

  • Adicionamos Trigger with PMs, que permite controlar se essa automação deve ser acionada mesmo em mensagens privadas.
  • Solucionamos um problema em que a automação do gatilho Topic tags changed estava sendo acionada durante a criação de tópicos.
3 curtidas

Como mencionado anteriormente – aqui

A configuração do site create post for category and tag changes (criar postagem para alterações de categoria e tag) atualmente pode vazar tags/categorias privadas; uma maneira que encontramos para manter esse recurso foi movê-lo para whispers:

Funciona de forma semelhante a pequenas postagens, mas agora, você precisa ter whisper allowed groups (grupos permitidos para sussurros) com algum grupo para fazê-lo funcionar.

Mesclei um PR para o core com essa alteração e um para chat-integration, removendo o uso dessa configuração; o recurso de automação adicionado de volta deve ser 1:1 com a pequena ação se alguém tiver algum problema, por favor, nos informe!

3 curtidas

Tenho mais algumas atualizações para este plugin :steam_locomotive:

Adicionamos o campo trigger on para a automação Send Chat-Integration message.

O que faz?

Ele verifica quando as tags são:

  • Adicionadas e Removidas (padrão)
  • Adicionadas
  • Removidas

Atualmente, essa verificação é inclusiva.

Um bom exemplo é se eu definir como Adicionadas; para que essa automação seja executada, será necessário que qualquer tag seja adicionada a um tópico.

Quando Tags adicionadas é definido, a tabela de automação fica assim:

Tag adicionada ao tópico Tag removida do tópico A automação foi executada?
:white_check_mark: :cross_mark: :white_check_mark:
:white_check_mark: :white_check_mark: :white_check_mark:
:cross_mark: :white_check_mark: :cross_mark:

Quando Tags removidas é definido, a tabela de automação fica assim:

Tag removida do tópico Tag adicionada ao tópico A automação foi executada?
: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 curtidas


Assunto: Impossível acessar a seção Plugins para configuração de Integração de Chat

Olá,

Sou administrador do fórum LXDAO e estou tentando configurar o plugin Discourse Chat Integration para conectar com o Telegram. De acordo com a documentação oficial, eu deveria conseguir configurar isso na seção Plugins do painel de administração.

No entanto, no meu painel de administração, tenho acesso apenas a quatro seções: Geral, Moderação, Segurança e Relatórios. A seção Plugins mencionada na documentação não parece estar disponível.

Você poderia me ajudar a entender:

  1. O plugin Chat Integration já está instalado em nosso fórum?
  2. Preciso de permissões adicionais para acessar a seção Plugins?
  3. Se estivermos usando uma solução Discourse hospedada, existem limitações em relação à instalação/configuração de plugins?

Como administrador, quais passos devo seguir para configurar corretamente a integração do Telegram para nossa comunidade?

Obrigado pela sua ajuda!