cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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!

 

Thanks

 

Martin

4 REPLIES 4
Highlighted
Anonymous
Not applicable

Re: Mail subject filter OR

  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.

Highlighted
Community Support
Community Support

Re: Mail subject filter OR

Hi @mbpeirce,

 

Do you need any further help on this topic?

 

Regards,

Michael

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.
Highlighted
New Member

Re: Mail subject filter OR

Very helpfull, Thank you!

Highlighted
Administrator
Administrator

Re: Mail subject filter OR

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!

 

-Gabriel

(Flow Community Admin)

-Gabriel
Microsoft Power Automate Community Manager
Are YOU a member of your local Power Automate User Group?
Fill out This Form to claim your Community User Group Member Badge!

Helpful resources

Announcements
firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

Join the new Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Top Solution Authors
Top Kudoed Authors
Users online (8,598)