Creating Azure DevOps Bug from Microsoft Teams Chat Message
We have all been there, we are busy doing something when we get a ping on Microsoft Teams and someone wants to report an issue. They start a dialog explaining the symptoms they are experiencing. After reading their report, you figure this concern is valid and a bug should get reported. But who wants to go through the effort of copying and pasting the information into yet another system. There is an easier way.
Recently, Microsoft introduced the ability to start a flow from a specific message in a Microsoft Teams chat message. The focus of this blog post is to walk through this scenario. But before we do so there are a couple pre-requisites needed:
- Install the Power Automate (Flow) application inside Microsoft Teams.
- When creating the corresponding flow in Power Automate, ensure the flow is located in the Default Environment.
With our pre-requisites out of the way we can begin to build our flow.
- Add the Microsoft Teams – For a selected message trigger
- We will now create an Adaptive Card by clicking on Create Adaptive Card button.
- Author your Adaptive Card to address your business requirements.
- We will now use the Azure DevOps connector and select the Create a work item action.
- Next, we need to populate the appropriate fields from our trigger and place them into our Azure DevOps action.
Note: The Priority values coming from the Adaptive Card are stored as strings so we need to use an expression to convert them into integers by using the following expression:
We can now go ahead and test on flow by starting a conversation in teams.
We will start by adding a message to our team conversation. From there we can click on the … and then select More actions > Create New Azure D…(which is the name of our Power Automate flow)
Fill out the appropriate details in the Adaptive Card and click Submit.
If we navigate to Azure DevOps, we will discover that our bug has been created.
The integration of Adaptive Cards, Power Automate and Microsoft Teams provide a rich and immersive experience that allows for data to be captured in real-time without having end users needing to know other tools like Azure DevOps. This allows them to stay within Microsoft Teams but still get data into the right system.