Showing results for 
Search instead for 
Did you mean: 
New Member

Mail subject filter OR

Hi. I want to be able to trigger the saving of attachments from an email if the subject contains 'Invoice' OR 'Bill'. I have searched but cannot find the syntax for this anywhere? Is it possible? 


I have the flow working with just the word "Invoice" but I need to specify other keywords as well 


It must be simple!





Not applicable

  1. You'll have to insert a 'Conditional' step. Setup your conditional to "find" one of the search words you're looking for, "invoice," for example. I know you stated you are looking for "bill" as well. You're simply going to leverage the auto-generated syntax of this conditional.
  2. You'll have to modify the syntax. Click the link that says, "Edit in Advanced Mode.'
    1. It should read as '@contains(...'
  3. Select that entire text generated and copy it to clipboard.
  4. Navigate to the beginning of the statement and start typing in the function @or(...)
  5. Paste the copied text (the auto-generated 'contains' function) into the wrapper of the '@or(),'
    1. Make sure to remove the '@' symbol from the '@contains' portion inside the '@or.'
    2. Adjust your search word in that function as necessary
  6. Repeat step 5 for as many words as you need the flow to search for

At the end your text should appear somewhat like the below:

@or(contains(items('Loop_through_Email_Attachments')?['ContentType'], 'officedocument'), contains(items('Loop_through_Email_Attachments')?['ContentType'], 'excel'))


The red text is part of the auto-generated text referenced in step 2. the blue text is the search key you're looking for.

Community Support
Community Support

Hi @mbpeirce,


Do you need any further help on this topic?




Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Very helpfull, Thank you!


Hello, @mbpeirce!


Thank you for posting to the Flow Community Forum! It seems as though someone has offered a valuable solution to your issue! If you feel as though your issue has been solved and you are satisfied with one of the previous replies, please click "Accept as Solution" so that this thread will be marked for other users to easily identify as a helpful thread!


Thank you for being an active member of the Flow Community!



(Flow Community Admin)

- Gabriel
Community Manager
Power Automate | Power Virtual Agents
Super User Program Manager

Helpful resources

Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Users online (52,543)