Introducing button flows with user input
Create a button flow to run routine tasks by simply tapping a button. Customize your flow by allowing the user to provide specific details that will be used when the flow runs. This topic walks you through creating a button flow that takes input from the user and then running the button flow, highlighting how to provide the user input.
You can create a button flow in the Microsoft Flow website or the mobile app for Microsoft Flow. For this topic, you'll use the website.
- An account on the Microsoft Flow website.
Open the template
Sign in to the Microsoft Flow website, enter Visual Studio in the search box, and then click or tap the search icon to find all templates that relate to Visual Studio:
Select the Open a Priority 2 Bug in Visual Studio template:
Select Use this template button:
This template uses the Visual Studio Team Services (VSTS) and the Push notification services. You'll need to sign into these services if you don't have a connection to either of them. The Sign in button will appear only if you need to sign into a service.
After you sign into all required services, select the Continue button:
(optional) Change the name of the flow by typing a name of your choice into the box at the top of the portal:
Customize the user input
In the trigger card, select Edit:
Select the + icon to expand the page so that you can add custom input fields:
Enter the Input title and Input description for each custom field that you want to make available when someone runs your flow.
In this example, you'll create two custom input fields (Bug repro steps and Bug severity) so that anyone who uses this flow can enter the steps to reproduce the bug and rate the bug's severity:
Customize the bug
Tap the Create a new work item card's title bar:
Make the selections that are appropriate for your VSTS environment, and then select Edit:
For example, connect to myinstance.visualstudio.com by typing myinstance.
Select Show advanced options to reveal the other fields for this card:
Place the cursor before the Bug title token, and then enter "Severity: " into the Title text field.
With the cursor still in the title text field, select the Bug severity token, and then enter " -- ".
In the Description text field, place your cursor just after the Bug description token, and then press Enter to start a new line.
Place your cursor on the new line, and then select the Bug Repro steps token:
Customize the push notification
Tap the title bar on the Send a push notification card to expand it.
In the list of dynamic content tokens, select See more, and then add the URL token in the Link text field.
In the Link label text field, add the Id token:
Tap Create flow on the menu to create your flow:
Run your flow
In this walk-through, you'll use the mobile app for Microsoft Flow to run the button flow you just created. You'll provide all the user input that's needed to create a bug with a title, a description, repro steps, and a severity level.
In the mobile app for Microsoft Flow, tap the Buttons tab, and then tap the Create bug report with steps button.
Enter the title for the bug you are reporting, and then tap Next. For example:
Enter the description of the bug you are reporting, and then tap Next. For example:
Enter the steps to reproduce the bug you are reporting, and then tap Next. For example:
Enter the severity of the bug you are reporting, and then tap Done:
The flow runs.
(optional) Tap the Activity tab to show the results.
(optional) Show the detailed results of the flow's run by tapping the Create a new work item step.
Use different input types
Your button flows can also accept rich data types. Here's the list of data input types that button flows accept:
- Drop-downs (like radio buttons)
- Email address
- File (for example, a photo on your phone)
- Yes or No check box
- Date (with a calendar picker)
To use these input types, add the Manually trigger a flow trigger, and then add any of these types to your flow:
Additionally, you might want to designate some inputs as required and others as optional. Use the action menu (... at the right side) on each input field. There's a limit of five inputs per button.
Send feedback about: