M365 (O365) -Teams and Power Automate Integration

With Microsoft Teams becoming a defacto enterprise communication and collaboration tool, more and more firms are using Teams with other M365 (O365) productivity tool sets. One of the most widely used productivity tool is Power Automate (formerly Ms Flow). In this blog post, I will illustrate how to use Power Automate to dynamically create a Teams Channel in response to user request and send a link of the channel to the user. This use case has practical application in areas of customer support, ticket management and incident escalation.

The first step is to create a data submission form in your favorite form designer like Ms Forms, Power Apps, Nintex Form etc.. this exercise uses Ms Forms. Create the process automation using Power Automate. Since the flow is triggered based on submission of the form choose instant flow template.

  1. Choose a name for the flow, and set the trigger as below.

2. Declare a variable to hold the Teams Channel url.

3. Get response details submitted to the form.

4. Create a Channel in the Team.

5. Wait 15-20 seconds until the channel creation is completed. Error handling logic can be added here if channel creation fails.

6. Get all the channels from the Team.

7. Filter the Channels so that the recently created channel is returned. [Filter array] Action can be used here. The Channels are filtered based on [Channel Name] equal to the name given when the channel is created in (step 4). To get the name of the channel use the expression: body(‘Create_a_channel’)?[‘displayName’].

8. Loop through the filtered array and get the url of the channel. Use the expression item(‘Apply_to_each’)[‘webUrl’] to get the channel link.

Send the Channel link to the submitter using various means like email, post message @mention etc..

The overall Power Automate is below.

In conclusion, integrating MS Teams with Power Automate opens up lots of Automation in the Collaboration and Communication space of M365 (O365).

Leave a Reply

Your email address will not be published. Required fields are marked *