Automating the creation of VSTS Tasks with Microsoft Flow and Google Sheets

When it comes to the repetitive creation of VSTS Tasks things can get a little bit complicated and time consuming especially if there are a lot of tasks to create. With this first blog post we aim to make our lives a little more easier and win some time to focus on more important activities.

First step will be to create a New Google Sheets file. Make sure you add the table headers on the first line like it the example below.

Start by creating a flow from blank by logging into Microsoft Flow and then going to My Flows tab. Select the trigger that suits you best, for this example we are going to use a button.

Start constructing your flow by adding the required actions. We are going to save our task list in a Google Sheets file. In order to get the data we have to use a Google Sheets – Get Rows action. Once you add the action you will be required to create a new Google connection if one was not already created.

Select your Google Sheets file created at the beginning of this guide.

The next step is an applied to each loop. Hit Next Step > More and then “Add an apply to each”

The input value for this loop should be the Records output value from the Get Rows action.

Add a new Visual Studio Team Services action inside the loop and create a new connection with your VSTS Account.

Start customizing the action using the dynamic content provided by the Google Sheets file by maching the fields with the Sheets column titles.

At the end your action should look like this:

Update your flow and do a test run.

If the flow was executed successfully you should see all the steps as completed.Now go to your VSTS account project and check the creation of the Workitems.