Setup an alert when a file is edited on OneDrive

Photo by Scott Graham on Unsplash

When you share the file from your One Drive with external users, often is to collaborate during the lifecycle of the document. There are some scenarios where you may want to know when that file is edited. So we have PowerAutomate where you can create a Flow to detect these changes. However, there are some tricks that you need to use in order to detect these changes.

The PowerAutomate flow works with changes on the folders, which forces you to create a folder for the project but if you have 2 or more files inside that folder, it’ll always trigger the flow and send you an email saying the file was changed.

On our example, we’ve placed a file on the root of One Drive and give it of Testing PowerAutomate.docx and that’s the file that we need to receive notifications when there is a change.

  1. Create an Automated flow and find the One Drive.
  2. Select the trigger When a file is Modified and select the folder where the file is located.
  3. Now add a Condition action
    1. Select File Name and put it is equal to
    2. Here is the trick, the file comes encoded so we need to decode it in order to have the correct name.
    3. Click on Add dynamic content and select the expression base64 as shown.
      • base64(‘Testing PowerAutomate.docx’)
  4. From here you get this alert from multiple options, Microsoft Teams, Notification 365, Email. On our scenario, we will use email so search for Send Email.
  5. Select the Office 365 connected and send the email as you want.

Conclusion

With this little change on your PowerAutomate, you can have alerts set up on your PowerAumate for the files that are really important to be aware of the change or to know if someone edits then.

One Comment

Leave a Reply

Your email address will not be published. Required fields are marked *