Hello all Power enthusiasts, welcome to my another blog. In today’s fast-paced development environment, automating repetitive tasks can significantly boost productivity. One such task is creating work items in Azure DevOps. By integrating Canvas App/ Microsoft Forms with Power Automate, you can streamline this process. Here’s a step-by-step guide to help you set up this automation by using Canvas App, Power Automate and Azure DevOps.
Step 1: Create a Canvas App
- Log in to Microsoft Power platform.
Select Apps from the left and select Start with a Page Design from the + New App dropdonwn.
Select Blank Canvas from Select a page design to start your app.
Insert three text labels, two text boxes, one drop down list and a submit button.
Step 2: Create a Table
- Select Data>Add data>Create new table
- Select Start with a blank table from Create a new table screen.
- Add three columns named, Title with Single Plain Text as data type, Description with Multiple Plain Text as data type and NewWorkItem with Single Plain Text as data type. Provide any name to the table.
- Add a Patch() to add data to multiple records. In Power Apps, the Patch() function is used to create or update records in a data source. It’s a versatile function that allows you to modify specific fields without affecting other properties.
Patch('New tables', Defaults('New tables'), {Title:TextInput1.Text, Description:TextInput1_1.Text, NewWorkItem:Dropdown1.SelectedText.Value})
Step 2: Create a Power Automate Flow
- Log in to Power Automate and click on “Create” > “Automated cloud flow”.
- Name your flow and select the trigger “When a new response is submitted” from Microsoft Forms.
- Add a new step to “Get response details” from Microsoft Forms.
- Add another step to “Create a work item” in Azure DevOps. Step 3: Configure the Flow
- Select your organization and project in the Azure DevOps action.
- Map the form fields to the corresponding fields in the Azure DevOps work item (e.g., Title, Description).
- Save and test your flow by submitting a response to your form. Example Flow Configuration
- Trigger: When a new response is submitted (Microsoft Forms).
- Action: Get response details (Microsoft Forms).
- Action: Create a work item (Azure DevOps). o Organization Name: Your Azure DevOps organization. o Project Name: Your Azure DevOps project. o Work Item Type: Bug, Task, etc. o Title: Response from the form. o Description: Response from the form.