Would you like to know when someone makes changes to a document? Perhaps you use Teams to store template documents, and you need to know when it has been updated to ensure you are using the latest version. With Power Automate, you can send yourself a notification when someone updates a file stored in Microsoft Teams (SharePoint).

Begin by going to Power Automate and creating a new Automated cloud flow.

Give your flow a name and search for SharePoint as the trigger. Select the SharePoint trigger When a file is created or modified. Click Create.

In your trigger action, specify the Site Address. Use the dropdown to select the name of the Team you would like to set the flow on. From there, select Documents as the Library Name. If you want the flow to run on all documents stored in the selected team, select the Folder path shown below (/Shared Documents/General). However, click through to General if you would like to monitor files in a specific folder within the team.

For example, with the settings in the flow shown above, a notification will be sent if any file in this General folder is updated, including subfolders.

Add a new step below the flow trigger. You can use the Microsoft Teams action Post message in a chat or channel. Here, you will enter the details of the file that was updated.
- Post as: Flow bot
- Post in: Chat with Flow bot
- Recipient: Your email address
- Message: Type in the message you want displayed and insert dynamic content from the SharePoint action. E.g.
The file <File name with extension> has been edited by <Modified By DisplayName>

If you want to add a hyperlink to the document in the message, click on the </> code view button of the Teams message field. Enter the highlighted text and dynamic content Link to item as shown in the screenshot below.
<a href="Link to item dynamic content">File name with extension</a>

Save and test your flow. To test it, open a file you have stored in Teams (make sure it is in the folder being monitored by the flow). Make a change on the document and save it. Shortly, you will see the Teams message notification come through.

The notification will be sent each time the file is saved. If you have Autosave turned on, this could be multiple times a minute. It is best to turn off Autosave so that you don’t get bombarded with notifications.
