{"id":148,"date":"2023-02-28T21:03:20","date_gmt":"2023-02-28T21:03:20","guid":{"rendered":"https:\/\/mariolongo.com\/?p=148"},"modified":"2023-02-28T21:03:21","modified_gmt":"2023-02-28T21:03:21","slug":"empower-your-development-team-with-power-automate","status":"publish","type":"post","link":"https:\/\/mariolongo.com\/index.php\/2023\/02\/28\/empower-your-development-team-with-power-automate\/","title":{"rendered":"Empower Your Development Team with Power Automate"},"content":{"rendered":"\n<p>To ensure the success of a new project, there are several activities that can promote collaboration and coordination within the team. Some examples are:<\/p>\n\n\n\n<ul><li>Creating a chat room for team members.<\/li><li>Creating network folders where documents can be shared.<\/li><li>Making available to team members the software needed to carry out the project.<\/li><\/ul>\n\n\n\n<p>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 <a href=\"https:\/\/mariolongo.com\/index.php\/2022\/12\/03\/the-future-of-coding-is-no-coding-at-all\/\" target=\"_blank\" rel=\"noopener\">low-code<\/a> approach, to automate and standardize these activities.<\/p>\n\n\n\n<h2>Scenario<\/h2>\n\n\n\n<p>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&#8217;s imagine that we need to create a process to follow at the beginning of the project, which involves:<\/p>\n\n\n\n<ul><li>The creation of a dedicated project team on Microsoft Teams, where team members can communicate and collaborate effectively.<\/li><li>The creation of SharePoint folders, which will allow project documentation to be managed and organized.<\/li><li>The creation of a dedicated Azure DevOps project, which will be used to manage and monitor project development.<\/li><li>The sending of an email to team members with project details and useful links to access resources.<\/li><\/ul>\n\n\n\n<p>Let&#8217;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.<\/p>\n\n\n\n<h2>Power Automate flow<\/h2>\n\n\n\n<p>The flow I created in Power Automate to handle the scenario described in the previous section is shown below.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh6.googleusercontent.com\/jh7dBmOs2iUDBtUgHWN4LymE0liuSBsqaRSnsF-QCu0xncDgC-7d5qopa8196LXvqCxi9W3h5OtxbimXAr04eckcZ0mm0RHjXs6HOSRtRoKc7Mz2RNPKv2S73xNQioRfVRr477490gkGH96bpkfKIik\" alt=\"\"\/><\/figure>\n\n\n\n<p>Below I will try to describe the main components of the automated flow.<\/p>\n\n\n\n<h2>Input parameters<\/h2>\n\n\n\n<p>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.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh3.googleusercontent.com\/_TO11izjiJ-OAg8Nr8BbMAMOKIInA_0cjAPPUyTeESvVot7tgik8ohIe-YwDjKAU2P2_tHYX4ol4MH5wHXdcJbkJ-0YyqNDhsm9TXMnyz6bEbxKnCcvjgoQSGqdKo-KZOCImjQVXN9_9XwWnw6As8qM\" alt=\"\"\/><\/figure>\n\n\n\n<p>The entered e-mails will be placed inside an array by using the following function: <strong>split(triggerBody()?[&#8216;text_2&#8242;],&#8217;,&#8217;)<\/strong>. This function allows the string to be separated by comma.<\/p>\n\n\n\n<h2>Create a team in Microsoft Teams<\/h2>\n\n\n\n<p>The second block is designed to create a team on Microsoft Teams. The following standard Power Platform action can be used to do this.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh6.googleusercontent.com\/D6qL03h6R_kTG966YcKseA5q7uxfjgc8qYt74uQO96EN2RH5fJF8eqK-HyeuuEJ3kmi_5NJBHbGa1F25R-kq3weFfrJYJpZxCzn1KceZ1H0aJX99bxBXAh8SavwHpCdqwMVat0wGJYMbh9QybUuL934\" alt=\"\"\/><\/figure>\n\n\n\n<h2>Create a project in Azure DevOps<\/h2>\n\n\n\n<p>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 <strong>Send an HTTP request to Azure DevOps<\/strong> action that allows HTTP calls to the Azure DevOps API. Following <a href=\"https:\/\/learn.microsoft.com\/en-us\/rest\/api\/azure\/devops\/core\/projects\/create?view=azure-devops-rest-7.0&amp;tabs=HTTP\" target=\"_blank\" rel=\"noopener\">this guide<\/a>, I built this block.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh3.googleusercontent.com\/KEGhVEiuHLu7-Wx96eb9mWu65GM8YayWYMnSxSRYp6i4NDl75i5wLXyKu41O_50Sd0sdSMAsFzEwAOiBvIP6lTKhHZIxZ8nH6cgz8Zkenel745Rl_CoMZf7DfFsMc8Bqk_Mbvty0uvJJyCZpdABKvAM\" alt=\"\"\/><\/figure>\n\n\n\n<p>Since the operation is asynchronous, I inserted the <strong>Delay <\/strong>action to make sure that the project is actually created before going ahead with the flow.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" width=\"522\" height=\"91\" src=\"https:\/\/mariolongo.com\/wp-content\/uploads\/2023\/02\/image.png\" alt=\"\" class=\"wp-image-149\" srcset=\"https:\/\/mariolongo.com\/wp-content\/uploads\/2023\/02\/image.png 522w, https:\/\/mariolongo.com\/wp-content\/uploads\/2023\/02\/image-300x52.png 300w\" sizes=\"(max-width: 522px) 100vw, 522px\" \/><\/figure>\n\n\n\n<p>To avoid authentication issues, remember to set the <strong>Third-party application access via OAuth property on Azure DevOps<\/strong> option in Organization Setting in Azure DevOps.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh4.googleusercontent.com\/farLc1zbh4t-brxVq4QpPUli2SIiYpdB5xru8Wh2Znx-Dq0v7H7hn5czxBGtP8D34g1CnpsQFd0e2ef4isj95HxI-XsVRbZO69VBQd86sic8vA69kHHKBDb27WIPFXWRI63sIKlaGxeipjc76hIDrdo\" alt=\"\"\/><\/figure>\n\n\n\n<p>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.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh4.googleusercontent.com\/8YlnkbUTbLDSQoUlSHDp8t5xc1WfI8eH0Hxm7onW_cawkVygxKZAFcvcAA82OGQFKQgvBr-4zjurOWDGfu-NQqROW2bINbmzNcPIloMi7uNtePQsMmeV7LvsvG_DlM-pnkmin7pOGv6zB713jZqyJoE\" alt=\"\"\/><\/figure>\n\n\n\n<p>Specifically:<\/p>\n\n\n\n<ul><li>I read the list of Azure DevOps projects.<\/li><li>I instantiated an object containing the list of projects returned in JSON format from the previous block.<\/li><li>I created an array with the list of projects, using the following <strong>variables(&#8216;JsonObject&#8217;).value<\/strong> function.<\/li><\/ul>\n\n\n\n<p>At this point:&nbsp;<\/p>\n\n\n\n<ul><li>I performed a filter using the standard<strong> Filter Array<\/strong> action to select the project.<\/li><li>Using the <strong>Compose <\/strong>action, I selected the first element from the input array by using the expression <strong>first(body(&#8216;Filter_array&#8217;))<\/strong>.<\/li><li>I performed a parse of the resulting JSON and read the value of the project id.<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh5.googleusercontent.com\/vIoS_4Eo3BBbx9yOrvaf03RYi6isGpzaGhQUGotVhAmjNmQXIMfABke6I_YCGeCLLlMFEBjJBOHtXknSAwLp750eGJZbK17R1260jtnfgZt_aqXw7AnAAvQVIP27yUh9rRfALcpOz7-XrkHye9JlJ9Y\" alt=\"\"\/><\/figure>\n\n\n\n<p>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.<\/p>\n\n\n\n<h2>Create folders in SharePoints<\/h2>\n\n\n\n<p>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<strong> Copy folder<\/strong> and you can find it under SharePoint actions.<\/p>\n\n\n\n<h2><img loading=\"lazy\" src=\"https:\/\/lh4.googleusercontent.com\/aGoJecGrfPK2WQRrysqYRyMF8uNWZsWshflJZxskEjcMSwZW1Yt0_r8X9NSDDB8MWUpdagwvBsJ75OsduFnAvIew-AbHxIJkL20Cros_Aal5XuI7P7fL7w0bjm84F1OloR7H4waFghyQjWEEp3dGILY\" width=\"578\" height=\"249\"><\/h2>\n\n\n\n<h2>Permissions and sending emails to the team\u00a0\u00a0<\/h2>\n\n\n\n<p>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.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh6.googleusercontent.com\/bYgJuIawlQ-daM-LTLYqjV7uyVkyHFrm-lMv2GBkJFvhZJdGJH0ZLDKuYBSnErRcU12TaZdBfMsmOfw8xQ2k1NlCNTEwaZ7_mm1SzPBW8ZJzjHN8sVe3rDInXMt9GXrEFlGWu3_kr7xDBioeiy5SiMc\" alt=\"\"\/><\/figure>\n\n\n\n<p>For providing user access to project team on Microsoft Teams, I used the following standard action:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh4.googleusercontent.com\/n_OUNDxkLc2NCyf2jus8oZJZ2vGg3eMx5Qb6agwSrYatOX3UZhVfhXZ3JMC5-d9woVbqjouNi7KkURMCRlP8xG-Lt3y4foCJEXUN9iOSlUr8PWNuzwvG_TkCCHOySTnHdBZzpvpiJaHnyjviORA_NIA\" alt=\"\"\/><\/figure>\n\n\n\n<p>Unfortunately, there is currently no standard action for enabling a user access to an Azure DevOps project, so I used <a href=\"https:\/\/learn.microsoft.com\/en-us\/rest\/api\/azure\/devops\/memberentitlementmanagement\/user-entitlements\/add?view=azure-devops-rest-7.0&amp;tabs=HTTP\" target=\"_blank\" rel=\"noopener\">this DevOps API<\/a> and Power Automate&#8217;s <strong>HTTP <\/strong>action to enable it. I tried using the previously used <strong>Send an HTTP request to Azure DevOps<\/strong> action but in this case I was always getting authentication errors.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh5.googleusercontent.com\/oo-a7A8ZbQDoRe46_5_w255cMK5a2EijYMCjUL9BWyiON9_AxkNbWAwTr8H6NDeG22fKHlm4nHcVBUTkf8LGyqFzUNkMIif6w4tHx7wyvuRvQszj7efuKvG5mrHK-NU3FAmiFu7TNfTio8tIDhPOOtM\" alt=\"\"\/><\/figure>\n\n\n\n<p>To make HTTP calls to the API, an authentication token must be enabled on Azure DevOps in the following settings section:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh5.googleusercontent.com\/KMUbRbLUxSTLY2U8vqf51VMBRWLvgQKfMK0f8F64cl8Qt9BPqrKOUgDNZJ6R57-82heXcBilIIW6Ub5z0SEL3GjXD4ZDPlr_wbQwJcbHDUtERD8zQATJug3RumjYkaglKL85G-vyM5ec6GUboYNO_3A\" alt=\"\"\/><\/figure>\n\n\n\n<p>And as a final step, I planned to send an e-mail to each team member:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh6.googleusercontent.com\/ncFLw_powhO1NjDP2Ly52n_yUU5XaXHbdfcuhDeLUiVINDzIB8xGSD5gFhKFZd6b2_7LV_FvncwartfE_AxdAhpDZqkyrsO9BCKgwpwwGUyqnPu7xDaWYRFSVmyguYgKG6xhBySjH_ZJ6EXdn9Zqn6M\" alt=\"\"\/><\/figure>\n\n\n\n<p>Below you will find a video that illustrates the flow described above.<\/p>\n\n\n\n<figure class=\"wp-block-video\"><video controls src=\"https:\/\/mariolongo.com\/wp-content\/uploads\/2023\/02\/Test-powerplatform-Flow.webm\"><\/video><\/figure>\n\n\n\n<p>For those interested in trying out this flow, I have made the source code available on <a href=\"https:\/\/github.com\/mlongodev\/InitNewProject-PowerAutomate\" target=\"_blank\" rel=\"noopener\">my GitHub repository<\/a>, where you will be able to access it and use it as a starting point for your own automation.<\/p>\n\n\n\n<h2>Conclusion<\/h2>\n\n\n\n<p>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&#8217;s possible to automate these processes.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0},"categories":[1],"tags":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/mariolongo.com\/index.php\/wp-json\/wp\/v2\/posts\/148"}],"collection":[{"href":"https:\/\/mariolongo.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mariolongo.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mariolongo.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mariolongo.com\/index.php\/wp-json\/wp\/v2\/comments?post=148"}],"version-history":[{"count":2,"href":"https:\/\/mariolongo.com\/index.php\/wp-json\/wp\/v2\/posts\/148\/revisions"}],"predecessor-version":[{"id":152,"href":"https:\/\/mariolongo.com\/index.php\/wp-json\/wp\/v2\/posts\/148\/revisions\/152"}],"wp:attachment":[{"href":"https:\/\/mariolongo.com\/index.php\/wp-json\/wp\/v2\/media?parent=148"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mariolongo.com\/index.php\/wp-json\/wp\/v2\/categories?post=148"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mariolongo.com\/index.php\/wp-json\/wp\/v2\/tags?post=148"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}