I have a flow where I am using the Experimental Trigger Conditions to filter for specific words in the Subject of an Email and that expression is working fine:
@OR(contains(triggerOutputs()?['body/subject'], 'Repayment'), contains(triggerOutputs()?['body/subject'], 'Advance'),contains(triggerOutputs()?['body/subject'], 'Draw'),contains(triggerOutputs()?['body/subject'], 'Paydown'),contains(triggerOutputs()?['body/subject'], 'Payment'))
Now I need another Or expression that also checks to see if those words are in any of the attachment file names or file contents (there can be several attachments in one email). The goal is to trigger the flow if the Subject or the Attachments Name or Contents contains any of those words. I'm not sure how to build the Apply to each Or expression that can be added as another trigger or added to the trigger I provided above. Is this even possible to do as a single line expression on the trigger?
The image below (Trigger Settings for When a new email arrives in a shared mailbox) is showing where I want to use the expression to filter the emails that cause the flow to run:
Any ideas would be greatly appreciated!!
Thank you!
Solved! Go to Solution.
Hi @mec
Unfortunately you can't access file attachments in trigger conditions, although you can check whether there's an attachment or not:
@equals(triggerOutputs()?['body/hasAttachments'],true)
Hope it helps!
Ferran
Hi @mec
Unfortunately you can't access file attachments in trigger conditions, although you can check whether there's an attachment or not:
@equals(triggerOutputs()?['body/hasAttachments'],true)
Hope it helps!
Ferran
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
Read the latest about new experiences and capabilities in the Power Automate product blog.
User | Count |
---|---|
26 | |
26 | |
25 | |
21 | |
17 |
User | Count |
---|---|
54 | |
46 | |
33 | |
33 | |
30 |