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!

Helpful resources

Announcements
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

New Process Advisor Capabilities carousel.png

Read the blog for the latest news

Read the latest about new experiences and capabilities in the Power Automate product blog.

PA Survey Carousel Image.png

We want to hear from you!

If you are a small business ISV/Reseller, share your thoughts with our research team.

Users online (3,462)