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)
- Navigate to the channel or chat where you want to add the webhook and select (•••) More Options from the top navigation bar.
- Choose Workflows from the drop-down menu and search for Post to a channel when a webhook request is received.
- 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.
- 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.
- 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:
- Post to a channel when a webhook request is received
- Post to a chat when a webhook request is received
- Sign in to Power Automate if you aren’t already.
- Select which Microsoft Teams user account to connect to. This account will appear as the sender of notifications sent from this automation.
- Select the Microsoft Teams Team and Channel (or Chat).
- Click the “Edit in advanced mode” link.
- 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.
- 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
- In your site settings, enable the chat integration teams enabled setting
- Go to the Plugins tab, then Chat Integrations
- Go to the Power Automate tab and click Add Channel
- Enter the name of your teams channel (e.g. discourse)
- Paste the Webhook URL that you copied earlier, then click Save Channel
- 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
- Set up some Rules for your channel according to the discourse-chat-integration instructions.
- Celebrate