From the portal

  1. Select the Showing drop down list and choose the Button category. This filters the list of templates to only those that can be used in button flows.
    Overview image
  2. Select the Trigger a new build in VSO template from the list of templates.
    Overview image
  3. Select the Use this template button on the Trigger a new build in VSO page.
    Overview image
  4. If you aren't signed in, you'll be prompted to do so at this point:
    Overview image
  5. After you've signed into Flow, you'll be prompted to sign into the connectors used in the template you've selected. In this example, in step 2 above we selected the Trigger a new build in VSO template, so we have to sign into VSO (and any other connectors you are working with), if you're not already signed in:
    Overview image
  6. Select the Accept button if you agree to authorize Flow to access your VSO account.
    Overview image
    Note You'll need to authorize each connector similarly. The designer should appear like this when you are ready to move on to the next step. Select the Continue button to move on:
    Overview image
  7. You are now ready to configure the properties for the build you wish to start:
    Overview image
  8. Select or enter the Account nameProject nameBuild definition IdSource branch and optionally, Parameters, in the Queue a new build card:
    Overview image
  9. Next, configure the properties of the push notification on the Send a push notification card. By default, this push notification is configured to send an HTML link to a Web page that displays the status of the build:
    Overview image
  10. Select the Create flow button to save your button flow: Overview image
  11. You should see this success message within a few moments:
    Overview image

Congratulations, you've created a button flow! You can now run this button flow anytime, anyplace, from the Buttons tab in the Flow app. Simply press the "button" and it will run!


Source: Microsoft