web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Using Experimental Fea...
Power Automate
Unanswered

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

(0) ShareShare
ReportReport
Posted on by 2

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:

 

@Anonymous(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!

Categories:
I have the same question (0)
  • Verified answer
    fchopo Profile Picture
    8,003 Moderator on at

    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

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard