Detect When A Particular File-Type Is Uploaded To SharePoint Document Library

You have a SharePoint Document Library where your users are uploading documents. You then use that information to perform other automated tasks such as closing tasks, getting approvals, sending notifications etc. 

However you don't want your users to upload a particular file-type, for example, you don't want people to upload Excel Macros into the SharePoint Document Library. Every time someone uploads an Excel Macro file, you want to email them about your policy.

To construct this in Power Automate, we will use endsWith() expression.

We will create a Condition block and check if 

    endsWith(triggerOutputs()?['headers/x-ms-file-id'],'.xlsm') is true


Under the "Yes" branch of this Flow, we can email the person who has uploaded the Excel Macro file about the policy, or take any other step as per our business use-case.



Comments

Popular posts from this blog

Generate QR code within Power Automate

Restrict Attachment control in PowerApps to accept Excel files only

Get start and last date of month using Power Apps