Microsoft Power Apps, SharePoint, & Microsoft 365 Consulting Company

Microsoft Teams Automation with Power Automate

Microsoft Teams Automation

Microsoft Teams has become the go-to app for work collaboration.  It has 115 million active users and is growing rapidly.  As companies adopt the platform, the next big question is how to add even more automation and efficiency to Microsoft Teams.  This is where the Power Platform comes into play.  More specifically, Power Automate which is also known as Microsoft Flow.  Power Automate can be used for Microsoft Teams Automation and should be.  Throughout 2020, Microsoft has been adding additional actions to Power Automate for Microsoft Teams.  Let’s look at these actions and how they can be used.
Learn about Power Automate (Flow) actions for Microsoft Teams automation.

Automatically Setup Microsoft Teams

Thanks to Power Automate, you can automatically setup Microsoft Teams based on business events and triggers.  Here are the main actions you can take to automatically setup a Team using Microsoft Teams Automation.

Create a Team

Creating a Team is the starting point for Microsoft Teams automation.  You can name the team, set its description and most importantly choose the visibility of the team.  Remember to visibility of a Team is as follows:

  • Org Wide: Everyone with a license is automatically added to the Team. This includes all existing users as well as new users going forward.
  • Public: Anyone who is not already in the Team will see and can automatically join the Team if they want to by clicking the “Join or Create a Team” in the bottom-left corner of Teams.
  • Private: Anyone who is not in the Team will not see the Team and cannot join it without an exclusive request.

Right now you cannot modify the Team settings, but we expect this will become an option in the future.

Full documentation: Click Here

Create a Channel

By default, Microsoft Teams always comes with a General channel.  You cannot rename or delete this channel.  The General channel is also always setup as a Public channel which also cannot be changed.  However, you can add more channels if you prefer to.  Unfortunately at the time of this article, you cannot specific if the channel is public or private; you can only create public channels.  Creating a channel has very basic capabilities for now.  You can set the display name and description and that’s it.  We expect in the future you will be able to choose whether you want to create a private channel as well as modify the channel settings.

Full documentation: Click Here

Add a Member to a Team / Automatically Add Admins to a Team

If you create a Public or Private team, you may want to add people automatically to those Teams.  This is a common request from many companies to automatically add admins and business executives to Microsoft Teams for full transparency.  This is a huge “win” when you combine this with the ‘List Teams’ to ensure all Teams always have the required people.

Full documentation: Click Here


Getting Microsoft Teams Information

Get a Team

You may want to get a specific team to use any of the posting actions as well as adding people to a Microsoft Team automatically.

Full documentation: Click Here


List Teams

Get a full list of existing Teams.  This allows you to find a Team or take an action on all existing teams.  You must be a member of the Team in order for the Team to be gathered.

Full documentation: Click Here


List Channels

Like getting a Team, getting the specific channel is necessary in order to take actions on an existing Teams.  Once you have a list of channels for a Team, you and specify the exact one using a Power Automate (Flow) condition to move onto the next action.

Full documentation: Click Here


Get Messages

You may want to get the messages for a Team for archiving or routing purposes.  For instance, if you need to get any message that has certain words for an audit or compliance purpose you could achieve that with this action.

Full documentation: Click Here


Get @mention Token for a User

If you need to scan for a mention of a user within a message, you can use this action to do so.  For example, you may want to use this action if you are creating an additional user-specific feed outside of the regular Activity feed in Microsoft Teams.  This may be useful for tracking historical mentions.

Full documentation: Click Here


Automatically Posting to Teams

Post a Message (V3)

You can use data from other applications to automatically create messages in Teams if you know the Team and Channel IDs.  A good use of this would be centralize and normalize the Team and Channel naming conventions for certain processes.  Next, you could query the list of Teams and Channels to post messages as certain business events transpire.  Additionally, the V3 version differs from the V2 version in that you do not need to specify the type of message being posted.  The V2 options are HTML or text.

Full documentation: Click Here


Post a Reply to a Message (V2)

Similar to posting a message, you can use data from other applications to automatically reply to messages already in Teams if you know the Message ID.  You can create some elaborate communication methods such as using emails or messages in Power Apps to reply to messages in Microsoft Teams.  Additionally, the V2 version differs from the V1 version in that you do not need to specify the type of message being posted.  The V1 options are HTML or text.

Full documentation: Click Here


Post a Message as the Flow bot to a Channel

Microsoft Teams automation can be taken to a new level using an AI bot, also known as a Flow bot in Team.  You can create a Bot in Microsoft Teams to get real time answers to people’s questions.  Those answers or messages can be posted right to a channel.  This can be useful to keep track of all Q&A sessions so people can search on what was already asked for future reference.

Full documentation: Click Here


Post a Message as the Flow bot to a User

Similar to posting messages to a channel, you can respond to questions a user has directly to the user with a MS Teams bot.  You can create a conversational bot to help answer questions across your entire company.  See here.

Full documentation: Click Here

Post a Choice of Options as the Flow bot to a User

Your Microsoft Teams Flow bot can also post questions back to the user in the form of choice options.  You can use those choice options to better answer questions the user originally posted.

Full documentation: Click Here


Post and Adaptive Card to a Teams user or channel and Wait for a Response

Adaptive cards are versatile, agnostic ways for send and collecting information to users.  With this Power Automate (Flow) action, you can gather information from a user or channel in an adaptive card.  Then, you can take action on that information collected in the Power Automate Flow.  For example, you could create a survey that is custom tailored and reusable across multiple Office 365 mediums.

Full documentation for Channels: Click Here

Full documentation for Users: Click Here

Overview of adaptive cards: Click Here
Learn about Adaptive Cards in Office 365 and Microsoft Teams.

Post Your Own Adaptive Care as the Flow bot to a Channel or User using Microsoft Teams Automation

Like posting an adaptive card and waiting for a response, you can post an adaptive card just to present information.  This means the Power Automate Flow will not wait for any response and will move onto the next action or onto completion.

Full documentation for Channels: Click Here

Full documentation for Users: Click Here


Microsoft Teams Automation to Create a Teams Meeting

Creating a Teams Meeting automatically is its own special type of action.  There is a lot of options available, similar to a Microsoft Outlook meeting invite.  For example, you can automatically create meeting invites based on business events that transpire.  This would be amazing to automictically create a Microsoft Teams meeting by using Microsoft FindTime.  However, this app is not currently a connector to Power Automate.  Upvote this idea here: Upvote!

Full documentation: Click Here

Other Microsoft Power Teams Actions in Power Automate

There are other MS Teams action for Power Automate that are not listed above.  These have all been deprecated.  This means those actions will eventually be fully retired and should not be used.  Those actions are:

  • Post a Message (V2)
  • Post a Reply to a Message – this is not officially deprecated but we anticipate it will be for the same reasons Power a Message has been deprecated.
  • Shifts: All Shifts related automation actions. Microsoft announced on June 30, 2020 that StaffHub, which includes Microsoft Shifts in Teams, is being retired.  See here for details.