Hi, I am using a flow which copies attachments from incoming emails into a OneDrive Folder. But, I need to exclude some file types or file sizes from the flow. For example, some incoming emails have embedded images in the signature (.png graphics files for phone or address) which I do not want to copy.
I am new to Power Automate, so would appreciate some advice.
Derek
Solved! Go to Solution.
Hi @Banana-Man,
This would be possible via a trigger condition expression. Below is an example.
I am using the endswith function together with the file name property of the trigger action. I am using a not function to exclude it in this expression.
@not(endsWith(triggerOutputs()?['body/attachments']?[0]?['name'], '.png'))
You can add that expression via the settings of the trigger action in your flow.
For file size you can use the size column of the triggerOutputs btw. Below is an expression for a size which is less than 1024 bytes.
@less(triggerOutputs()?['body/attachments']?[0]?['size'], 1024)
Hi @Banana-Man,
This would be possible via a trigger condition expression. Below is an example.
I am using the endswith function together with the file name property of the trigger action. I am using a not function to exclude it in this expression.
@not(endsWith(triggerOutputs()?['body/attachments']?[0]?['name'], '.png'))
You can add that expression via the settings of the trigger action in your flow.
For file size you can use the size column of the triggerOutputs btw. Below is an expression for a size which is less than 1024 bytes.
@less(triggerOutputs()?['body/attachments']?[0]?['size'], 1024)
Check out new user group experience and if you are a leader please create your group
See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.
User | Count |
---|---|
10 | |
10 | |
7 | |
6 | |
4 |
User | Count |
---|---|
14 | |
9 | |
7 | |
3 | |
3 |