Creating Azure DevOps Bug from Microsoft Teams Chat Message
  • 07 Sep 2020
  • 1 Minute To Read
  • Contributors
  • Print
  • Comments
  • Share
  • Dark
    Light

Creating Azure DevOps Bug from Microsoft Teams Chat Message

  • Print
  • Comments
  • Share
  • Dark
    Light

#ServerlessTips - Power Automate
Author: Kent Weare Integration MVP

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:

  1. Install the Power Automate (Flow) application inside Microsoft Teams.

1-app

  1. 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.

  1. Add the Microsoft Teams ā€“ For a selected message trigger

2-trigger

  1. We will now create an Adaptive Card by clicking on Create Adaptive Card button.

3-AddaptiveCard

  1. Author your Adaptive Card to address your business requirements.

4-CreateCard

  1. We will now use the Azure DevOps connector and select the Create a work item action.

5-azureDevopsConnector

  1. Next, we need to populate the appropriate fields from our trigger and place them into our Azure DevOps action.

6-devOpsConfig

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:
int(triggerBody()?['entity']?['cardOutputs']?['bugPriority'])

Testing

We can now go ahead and test on flow by starting a conversation in teams.

  1. 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)
    7-teams

  2. Fill out the appropriate details in the Adaptive Card and click Submit.
    8-testAdpativeCard

  3. If we navigate to Azure DevOps, we will discover that our bug has been created.
    9-DevOps

Conclusion

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.

Was This Article Helpful?