Set up Microsoft Teams notifications using the discourse-chat-integration plugin

Discourse
Wed, 29 Jul 2020 17:41:28 +0000
Integrations

This guide describes how to set up the Microsoft Teams provider included in discourse-chat-integration .

Setup Microsoft Teams

In Microsoft Teams:

1. From the vertical navigation bar on the left, click the ellipsis button (…) and select Workflows from the menu.

2. Click the + Build from scratch button on the right top corner of the Workflows page.

3. In the custom workflow modal, search for webhook and select the When a Teams webhook request is received trigger.

4. In the Who can trigger the flow field, select Anyone. [1]

5. Click + New step.

6. Next, search for card and select the Post card in a chat or channel action.

7. Fill out the fields as follows:

Post as: Choose who the messages should come from; you can leave this set to the default value or choose User to make the message appear from you.

Post in: Select Channel, which will make more fields appear:

Team: Select the desired team.

Channel: Select the desired channel.

Adaptive Card: Click into the input, which will open a pop-up (described in next step).

8. Click inside the Adaptive Card field to open a pop-up [2] for inserting dynamic content or an expression. Switch to the Expression tab and type triggerBody() in the expression field.

9. Click Save.

10. You should now see a workflow named manual → Post card in a chat or channel in your list. Click the vertical ellipsis button on this workflow and select Details from the drop-down menu.

11. On this page, click Copy webhook link to grab the link for the next steps. While you’re here, you can optionally edit the workflow name to reflect its purpose for others on your team.

Setup Discourse

Now, back to Discourse:

1. In your Discourse admin area, enable the Chat integration enabled setting to turn on the Chat Integration plugin and the Chat integration Teams enabled setting to support Microsoft Teams.

2. In the sidebar, find the Plugins section and click Chat Integrations, then click + Create Channel.

3. In the Edit Channel modal, fill out the fields as follows:

Name: Enter a name that makes it clear which Microsoft Teams channel you’re connecting to; it doesn’t need to be a perfect match.

Webhook URL: Paste the webhook URL you copied in step 11 of the Teams setup section above.

4. Click Save Channel.

Test the integration

Now it’s time to make sure everything is working as expected.

1. In Discourse, click Test on the newly created channel.

2. Search for a topic by ID, title, or URL; select the desired topic; and click Send Test Message.

3. In Microsoft Teams, a new message with information from the topic should be posted in the channel:

Optional: Set up Rules for your channel

Now that you’ve confirmed everything is working, you can go back to Discourse and setup additional rules for your channel to customize the message.

Debugging

If you do not see the message in Microsoft Teams as expected, go to the Workflow Details page (see step 10 in the Teams setup section above) and check the Run history section. This should show logs of each message run.

Click the failed run, which will take you to the Power Automate area where you can see an error message at the top of the page. (In the below screenshot, the run was successful, but the arrow indicates where the error will appear on a failed run.)

This should detail the problem, which you can then fix or share with us here so we can help.

1. Discourse doesn’t currently support authenticated webhooks to Teams, so only the “Anyone” option works.

↩︎

2. if the popup doesn’t appear, type anything in the Adaptive Card field temporarily, save the workflow, open it again for editing and the popup should appear. ↩︎

Last edited by @lindsey Tuesday, March 3, 2026 1:34 PM UTC
Check document (clicca per ulteriori dettagli)

29 messaggi - 10 partecipanti