cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mec
Regular Visitor

Using Experimental Features - Trigger Conditions to Check for Specific Words in Multiple Attachments (Name or Contents)

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:

mec_0-1634232469484.png

Any ideas would be greatly appreciated!!

Thank you!

1 ACCEPTED SOLUTION

Accepted Solutions
fchopo
Super User
Super User

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

 

Did I answer your question? Please consider to mark my post as a solution to help others.
Proud to be a Flownaut!

View solution in original post

1 REPLY 1
fchopo
Super User
Super User

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

 

Did I answer your question? Please consider to mark my post as a solution to help others.
Proud to be a Flownaut!

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Users online (2,194)