The pandemic has forced many businesses and individuals around the world to adapt to new work styles. Microsoft has made the well-being of their users a priority by enabling new capabilities with Microsoft Teams and Power Platform. With these tools, businesses and workers can be more productive in a remote work environment by automating repetitious work processes.
One key tool within Power Platform that enables workflow automation is Microsoft Power Automate. This tool allows end-users to build no-code and low-code processes like running weekly reports and notifying of status changes in a SharePoint list.
In this blog, we will demonstrate the simplicity of Microsoft Teams’ integration with Power Automate by showing you how set up a flow to instantly send a notification to Microsoft Teams when a SharePoint file is modified.
This tutorial will be useful if you have a team collaborating on files in a SharePoint folder and you want anyone in the related Microsoft Teams channel to be instantly notified when a change has been made to a file in the folder.
Begin by navigating to Power Automate in your Office Portal and selecting the “Create” button on the sidebar.
From here, you can choose from a list of pre-made flow templates, or you can start from scratch by choosing “Automated Flow”, “Instant Flow”, and “Scheduled Flow.”
- Automated Flows will run when an event or action triggers the flow to run. For example, when a file is modified, or a status is changed on a SharePoint list.
- Instant Flows will run when manually triggered. For example, when a “Flow” button is pressed within a mobile app.
- Schedule Flows only trigger when a scheduled time arrives. For example, if you want an expense report to be generated every Monday morning.
To create an automatic notification when a file is modified in SharePoint, we will be using an Automated Flow.
From here, select “Skip” to move to the next step.
There are many connectors and triggers that you can choose from to get your flow started. Connectors represent the app and service that you want to connect to. For example, Microsoft Planner, Twitter, SharePoint, etc. Each connector has different triggers available. A “trigger” is the action that occurs to initiate the flow. This can be a status change in Planner, a Tweet being retweeted on Twitter, etc. In this example, we will be choosing the SharePoint trigger “When an item or a file is modified.”
Map the action to the desired “Site Address”, “List or Library Name”, and “Folder.” Then select “New Step.”
Next, you must determine what action will occur when the designated trigger occurs. In this example, we will choose the Microsoft Teams action “Post a message.”
Next, fill out the details of the chosen action. In this example, you will select the Team and Channel that you wish to send the notification to and will create the notification message. Make sure to use ‘dynamic content’ to make your notification as specific as possible. Then click “Save.”
Try these additional dynamic content tags:
- Use the dynamic content “Modified” to display when the change occurred.
- Create the custom expression “workflow()[‘tags’][‘flowDisplayName’]” to display the name of the corresponding flow.
- Use the dynamic content “Full Path” to show the exact path to the modified file.
Now that you have set up your flow, it is time to test that it works. Begin by going to the designated SharePoint library and selecting a test file. Make a change to that file. It can be as simple as adding a single character to a text document. Make sure the file indicates that the changes have been ‘saved.’
Return to your flow’s dashboard and check the run history. If your flow ran successfully, you will see a timestamp with a “success” indicator.
If the flow has not run yet, give it a few moments, and then refresh. If the flow still has not run, double check all the information that you input and try again.
Finally, verify that the notification successfully sent to the designated Microsoft Teams channel.
You have successfully set up an automated Microsoft Teams notification using Power Automate flows.
There are many ways to automate your workflows throughout Microsoft Teams and the full Office 365 suite using Power Automate flows. Try customizing your flows further by adding “conditions” and other unique triggers and actions.
At Apex Digital Solutions, we are certified Microsoft Teams experts. Our Ready for Microsoft 365 and Ignite for Microsoft Teams service offerings will empower your organization be more secure, productive, and engaged with Microsoft Teamwork and remote work solutions. Contact us at email@example.com to get started with driving successful change in your organization.