To ensure the success of a new project, there are several activities that can promote collaboration and coordination within the team. Some examples are:
- Creating a chat room for team members.
- Creating network folders where documents can be shared.
- Making available to team members the software needed to carry out the project.
These are just examples; in highly structured companies, the activities before starting a new project can be numerous and varied. In this article, I would like to illustrate how to use Power Automate, through a low-code approach, to automate and standardize these activities.
The scenario I am about to describe turns out to be a common practice for many companies that work in teams on projects, such as software development companies. So let’s imagine that we need to create a process to follow at the beginning of the project, which involves:
- The creation of a dedicated project team on Microsoft Teams, where team members can communicate and collaborate effectively.
- The creation of SharePoint folders, which will allow project documentation to be managed and organized.
- The creation of a dedicated Azure DevOps project, which will be used to manage and monitor project development.
- The sending of an email to team members with project details and useful links to access resources.
Let’s see below how Power Automate can help. In this article, we assume that you have already acquired the basic knowledge of Power Automate to create simple workflows.
Power Automate flow
The flow I created in Power Automate to handle the scenario described in the previous section is shown below.
Below I will try to describe the main components of the automated flow.
The first block of the flow consists of the input parameters that the user must enter, such as the project name, description, team members, and organization in Azure DevOps.
The entered e-mails will be placed inside an array by using the following function: split(triggerBody()?[‘text_2′],’,’). This function allows the string to be separated by comma.
Create a team in Microsoft Teams
The second block is designed to create a team on Microsoft Teams. The following standard Power Platform action can be used to do this.
Create a project in Azure DevOps
The next block is for the purpose of creating an Azure DevOps project where the project team can work. Unfortunately, there is no standard Power Automate action to do this directly, so I used the Send an HTTP request to Azure DevOps action that allows HTTP calls to the Azure DevOps API. Following this guide, I built this block.
Since the operation is asynchronous, I inserted the Delay action to make sure that the project is actually created before going ahead with the flow.
To avoid authentication issues, remember to set the Third-party application access via OAuth property on Azure DevOps option in Organization Setting in Azure DevOps.
At this point, our goal is to read the unique code (id) of the project created on Azure DevOps. This value, in fact, we will need later to enable the team users. To do this, I used the following Power Automate actions.
- I read the list of Azure DevOps projects.
- I instantiated an object containing the list of projects returned in JSON format from the previous block.
- I created an array with the list of projects, using the following variables(‘JsonObject’).value function.
At this point:
- I performed a filter using the standard Filter Array action to select the project.
- Using the Compose action, I selected the first element from the input array by using the expression first(body(‘Filter_array’)).
- I performed a parse of the resulting JSON and read the value of the project id.
This part could seem complex, but if you follow the flow of Power Automate via the test function you can see the JSON messages exchanged from one block to another. This can help you understand how to process the input in each block.
Create folders in SharePoints
The next step is to create the folders needed for project management. My proposal is to use an internal SharePoint template site containing the necessary folders and documentation templates. Next, the folders are copied from the template site to the new site automatically generated when the team is created on Microsoft Teams (this is a standard functionality). Below is the standard Power Automate block that allowed me to do this, it is called Copy folder and you can find it under SharePoint actions.
Permissions and sending emails to the team
Finally, for each member of the project, user access is provided to project team on Microsoft Teams and Azure DevOps, as well as an e-mail is being sent containing project details.
For providing user access to project team on Microsoft Teams, I used the following standard action:
Unfortunately, there is currently no standard action for enabling a user access to an Azure DevOps project, so I used this DevOps API and Power Automate’s HTTP action to enable it. I tried using the previously used Send an HTTP request to Azure DevOps action but in this case I was always getting authentication errors.
To make HTTP calls to the API, an authentication token must be enabled on Azure DevOps in the following settings section:
And as a final step, I planned to send an e-mail to each team member:
Below you will find a video that illustrates the flow described above.
For those interested in trying out this flow, I have made the source code available on my GitHub repository, where you will be able to access it and use it as a starting point for your own automation.
Power Automate is a very powerful tool for automating team management and standardizing business procedures. In this article, we have created a simple workflow using Power Automate, but it is important to note that this tool offers many standard actions that allow you to interact with a wide range of applications. Imagine the tasks you have to perform every time to manage your team and ask yourself if Power Automate could be helpful. Many times, in fact, it’s possible to automate these processes.