Set up Power Automate to send Microsoft Teams notifications using the discourse-chat-integration plugin

This howto describes setting up the Power Automate provider included in discourse-chat-integration.

Install

If you haven’t already, install the discourse-chat-integration plugin

Setup Microsoft Teams

Webhooks used by Power Automate can be built directly from Power Automate or via Microsoft Teams. You must perform either step for every channel you want to send updates to in Microsoft Teams.

Setup via Microsoft Teams (easy and quick)

  1. Navigate to the channel or chat where you want to add the webhook and select (•••) More Options from the top navigation bar.
  2. Choose Workflows from the drop-down menu and search for Post to a channel when a webhook request is received.
  3. Provide a name and the account that will be used to post as and click Next. Validate the provided Team and Channel (or Chat), then click Add workflow.
  4. The dialogue window will present a unique URL that maps to the channel. Make sure you copy and save the URL—you must provide it to the outside service.
  5. Select the Done button. The webhook will be available in the team channel.

Setup via Power Automate (advanced and customizable)

Start with one of the prebuilt templates:

  1. Sign in to Power Automate if you aren’t already.
  2. Select which Microsoft Teams user account to connect to. This account will appear as the sender of notifications sent from this automation.
  3. Select the Microsoft Teams Team and Channel (or Chat).
  4. Click the “Edit in advanced mode” link.
  5. In the new view, click on the title and update it to something more meaningful, click “Save”, and then click on the “When a Teams webhook request is received” card.
  6. The dialogue pane will present a unique URL that maps to the channel (or chat). Make sure you copy and save the URL—you must provide it to the outside service.

Setup Discourse

  1. In your site settings, enable the chat integration teams enabled setting
  2. Go to the Plugins tab, then Chat Integrations
  3. Go to the Power Automate tab and click Add Channel
  4. Enter the name of your teams channel (e.g. discourse)
  5. Paste the Webhook URL that you copied earlier, then click Save Channel
  6. Use the Test button on the channel you just created to check that everything’s working. You should see your test topic appear in your Microsoft Teams channel
  7. Set up some Rules for your channel according to the discourse-chat-integration instructions.
  8. Celebrate :tada:
1 Like