Configuring SharePoint Notification in Teams Using Flows


SharePoint users can be notified of custom events occurring in SharePoint by using Flows or workflows configured or by using SharePoint alerts. Since Microsoft Teams provides such enormous capabilities and integration options with SharePoint, we might want to notify a team when some custom event occurs within a SharePoint. It is very important to make sure that a team is notified so that they’re not missing any important information relevant to their work. For example, when a new document is uploaded to a Document Library in SharePoint or when a new item is created, one of the preferred methods would be to notify a particular team in Microsoft Teams.

Selecting the right Notification setting in Teams

There are three primary options when it comes to setting the notifications in Microsoft Teams:
Banner and email
Notification setting will show a banner message pop-up in the lower right of the screen and send an email (you can set the frequency) with the notification information.
Option, the banner notification will still show, but no email will be sent.
Only show in feed 
The notification will only be visible via the feed in the upper left of the application.
In this blog, we are going to see how to send a banner notification in Teams on a new item creation in SharePoint using Flows. There are different connectors available inflows. But here, we are going to discuss the below connector in specific.
Document Library or List, Microsoft Teams, Flows Subscription, Team created in Microsoft Teams.

Using Flow and incoming webhook connector of teams

Step 1
In Microsoft teams, create a new channel for your team. By default, there is a channel called General which is available. The channel that I have created here is called Cool Apps. 
Step 2
From the context menu of your channel, click on connectors and add the incoming webhook connector to the channel. You will have to provide a name to create an incoming webhook and then copy the URL from the textbox and click on create. Once it is successful, you will be able to see a notification message on the channel. 
Configuring SharePoint Notification In Teams Using Flows
Step 3 - Create a flow
Navigate to the list and select create a flow option.

Select create a flow from a blank template.
Provide the flow name and create a two-step flow as shown below:
Configuring SharePoint Notification In Teams Using Flows 
In the first step i.e when an item is created, give the site URL and list name. I want to send the notification only when the category column value is equal to a specific value. Therefore, add a condition. If the condition is satisfied then add an HTTP action card. An HTTP action card is a very powerful tool to quickly get a custom action into Flow. In HTTP Action, perform a post with a message saying that a new item has been created by the user. Paste the copied URL in the URI of the HTTP post.
Configure the workflow as below:
Configuring SharePoint Notification In Teams Using Flows
Test the flow using a flow checker. Create a new item and check if the flow completed successfully. If successful, you can see the below notification in the channel tab of Teams.
Configuring SharePoint Notification In Teams Using Flows
I set my channel notification setting to as shown below, the notification appears in the feed as well as in the banner.
Configuring SharePoint Notification In Teams Using Flows 
There are other connectors in flow, such as posting an adaptive card to a teams channel and waiting for a response, which gives a rich display to the user.