For Ignite this year, we asked a panel of our MVP Community real world experts to join us at Ignite and share what they felt were the most impactful, currently available, Teams features for IT pros and their users.
The on-demand session, Microsoft Teams Best Practices, Tips and Tricks from our experts, these MVPs presented 9 topics and demos in a 40-minute session. Many of you reached out saying you loved the session but wanted a deeper dive into the topic.
In this series we, we will hear from each of our presenters, as they will walk you through their demos and share tips, tricks, and resources so you can reproduce these experiences in your environment today.
Nanddeep Nachan is a results-oriented Technology Architect with experience in Microsoft Technologies especially with SharePoint, Office 365, and MS Azure. Experienced in design, implementation, configuration, and maintenance of several large-scale projects.
Messaging extensions are a great way to define action on the selected message in Microsoft Teams. In the past, it was only possible to create messaging extensions with custom coding and deployment efforts. But now even citizen developers can build messaging extensions with few clicks. You can use messages to trigger processes in Teams.
In this article, we will explore how to create messaging extensions for MS Teams with Power Automate and add some AI factors to it to create a profanity reporting use case.
For creating messaging extensions in Teams using Power Automate, the first thing you should do is to add the Power Automate app.
The default view shows the basic information on the created flows. The column “Team and Channel” is tricky to read. It lists out the Teams and Channels your flow reads/writes to/from.
The page provides you to get started by using popular Teams templates or even you can start from blank. One thing to note, only instant flows qualify for messaging extensions.
Let us start with a pre-built template, Save a message to OneNote.
1. The first thing that we need to do here is to name our flow.
2. Second thing, we need to verify all the connections. Once it is done, click Next.
3. Then we need to select Notebook as well as the section within that Notebook where we need to store the message and then just click on create flow and That’s it.
That’s it. Your first messaging extension is ready.
Test the messaging extension.
Let us head to any existing message in Teams. Under More actions, you will see all the messaging extensions listed.
Each messaging extension created with Power Automate will have a special logo next to it.
As you select the Save a message to OneNote messaging extension, add any optional note along with the message and it will be saved to OneNote. Clicking View note will take you to the saved conversation in OneNote.
One limitation to note here is that it only saves the top message and not the replies.
Now let us have look at the implementation of one of the custom messaging extensions built with some AI capabilities.
MS Teams is for collaboration and while conversing with colleagues, we should always consider the well-being factor, and no one gets hurt by any profanity.
As a pre-requisite, you first need to create a Content Moderator service in Azure. Let us start by building a Power automate flow.
For a selected message
This starting action gives us an adaptive card that can be shown to the user, as they select the message.
The below adaptive card allows users to select a category and add optional notes while reporting profanity.
Detect profanity and match against custom and shared block lists.
The next action from the Content Moderator connector helps to detect profanity, by passing in the selected message content.
Variable to store profanity terms
Next, we are initializing a variable (named varProfanityTerms) to store the list of reported profanity terms.
If review is recommended by the Content Moderator service, we populate the variable with reported profanity terms.
The last part of the flow is to send an adaptive card to the reviewer. We are initializing a 1:1 chat with the reviewer before sending the adaptive card. The card is now populated with the required information.
Below is the sample adaptive card sent to the reviewer.
Test the messaging extension.
On a message, select the Report inappropriate content messaging extension if you want to report any profanity.
Select the appropriate category under which you want to report this and add optional notes to the reviewer.
The suspected message information will be sent to a person or group configured in the power automate for review and action.
The reviewer’s view.
This reviewer view from Amanda shows how the information is sent as an adaptive card to the reviewer. To make it easier for the reviewer to take the best decision on the reported content, we are using the Content Moderator connector which reports the score in 3 categories and Detected profanity terms.
Points to note:
Building messaging extensions for MS Teams with Power Automate opens new opportunities for citizen developers to build their use cases. With the power of Power Automate, you can connect to various services to build powerful scenarios.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.