Alert! Combine SharePoint, PowerApps and Flow to notify your org!

Paul Summers
4 min readOct 17, 2019

--

Many of my customers present requirements for a notification feature on their intranet portal. This is a great place to inform users of urgent or important alerts like an upcoming IT outage, facility issues or similar. For critical safety related alerts, this can even augment a more real-time push-style notification system.

Using SharePoint Framework Extensions, Microsoft PowerApps and Microsoft Flow, we can build an elegant and flexible solution that is accessible to all users of an organization — both to create and consume these notifications!

SharePoint Framework Extension

The first piece of this solution was a component that would display a notification in the header of a SharePoint page. I decided to build a SharePoint Framework Extension that reads data from a SharePoint list in the local SharePoint site and displays a notification in the top placeholder of all site pages. There is no out-of-box web part that addresses this specific requirement but there is an open source component that is part of the SharePoint Framework Starter Kit. I based my approach and much of my code on this existing solution — thank you to all of the contributors to that solution.

The source code for my solution can be found on my GitHub repo here.

Screenshot of the site notification feature

As I said, this is very similar to the existing open source extension that is available as part of the SharePoint Framework Starter Kit. However, my approach improves on it by providing the ability to scroll through all “active” notifications in the list (customer request). It also changes the styling based on the type of notification (“Notification”, “Warning”, “Emergency”).

The one thing that is much better in the starter kit solution (beyond the elegance of the code, of course) is the fact that it looks for the list in the hub site associated with the current site. This means that any site that is a member of that hub site, including the hub site itself, can pull from that list. This provides more flexibility than my implementation.

Enhancing with PowerApps

Now that I can display these notifications, I need an easy-to-use tool for creating and managing them, keeping in mind that the users that are populating this notification data are probably not SharePoint gurus. Rather, the notification creators are more likely employees from human resources, facilities or other line of business teams that need to provide notifications to the organization specific to their business area. With that in mind, it seemed very logical to build a PowerApp for this purpose.

This PowerApp Canvas app provides the ability to create a custom experience on top of the list that can be access through a SharePoint portal, a mobile device or any of the other ways Canvas apps can be delivered to employees.

Notification list screen
List view of active notifications in PowerApp
Alert notification create/edit screen
Easily create a new alert

With this app, this notification system becomes accessible to a much wider range of employees within the organization — via SharePoint sites, mobile devices, Microsoft Teams and beyond.

Extending further with Microsoft Flow

Now that we have a means creating these notifications and primary experience for delivering them, we can start to think of additional ways to deliver them to employees who may not have access to SharePoint on a consistent basis or in cases where we need a more proactive push notification.

Using Microsoft Flow, we can monitor the source of the data — the SharePoint list in this case — and as it gets updated, push those notifications via email, text, Microsoft Teams or a myriad of other tools that may be useful in your organization.

For this solution, we use Microsoft Flow to determine the severity of the notification and based on that severity, we push it only to Microsoft Teams or, in the case of an emergency, we push it via SMS and Teams!

Screenshot of Microsoft Flow for pushing notifications
Use Microsoft Flow to push notifications through different channels

The emergency message lands as a text on registered phone numbers…

Screenshot from a mobile device of the push notification
Push notification to a mobile device

… and as a message in Microsoft Teams in the org wide Team!

Screenshot of notification in Microsoft Teams
Get notifications directly in Teams

This solution showcases how SharePoint, Microsoft PowerApps and Microsoft Flow can be combined to provide to provide a flexible notification solution for an organization. This is just one example of how these tools can be combined to address a myriad of enterprise needs!

--

--

Responses (1)