Skip to main content

Notifications

Community site session details

Community site session details

Session Id : URmvYVDeifAz7Qu1p5Toej
Power Automate - Building Flows
Unanswered

Move an email when triggered to an Outlook folder based on subject line or body

Like (0) ShareShare
ReportReport
Posted on 14 Mar 2025 17:28:23 by 2
I have many projects (20-30+) going at the same time.  All my emails come to my inbox to be addressed, then I move them to subfolders by project.  I can't have emails go to the subfolders directly because I have too many to monitor.
 
I'm trying to set up a flow that will move an email to a specified folder based on subject line (and body if possible) key words.  The only somewhat convenient trigger I've found has been to flag the email once I'm done with it.  I'd also be ok with manually moving an email to a "to file" folder, but I've only seen triggers for when a new email comes in, not for when an already received email is placed into a folder.
 
I have been able to set up a flow that will move an email but with only a single subject term.  This has caused me to have to set up multiple flows for a single project with a different key word for each.  I'd much prefer to be able to set a flow with multiple "or" keywords so I don't have to create 2-3 flows per project.  
 
Any suggestions are appreciated.  I'd also like recommendations for other triggers besides flagging an email because my to-do/flagged email list gets clogged up this way.  An alternative would be a way to clear the flag as a last step in the flow if that's possible.
  • David_MA Profile Picture
    9,770 Super User 2025 Season 1 on 14 Mar 2025 at 19:45:40
    Move an email when triggered to an Outlook folder based on subject line or body
    Based on your new post, it sounds like you need a trigger condition when the subject line contains certain key phrases or words, but you don't know how to write the expression? If so, your expression would be in this format:
     
    @or(contains(triggerOutputs()?['body/subject'],'Urgent'), contains(triggerOutputs()?['body/subject'], 'Priority'))
     
    Just keep adding on to it as needed. Then set it as a trigger condition in your flow:
    The flow will only run when it contains one of the words or phrases identified in the trigger. When using contains, it is not case sensitive, so keep that in mind if the case matters.
  • LK-14031627-0 Profile Picture
    2 on 14 Mar 2025 at 19:29:12
    Move an email when triggered to an Outlook folder based on subject line or body
    The Outlook (specifically New Outlook) rules don't work for what I'm trying to do.  I need all my email to come to my inbox first and not be sorted until after I've dealt with them.  There also isn't an option for an "or" statement for different words in the subject line or body.  It's a one-and-done.  For rules to work, I'd need to run them manually and that's just as impractical as manually filing my emails into folders.
     
    For the Power Automate options, the main thing I'm trying to find is a way to have an "or" statement in my subject line terms.  
     
    I tried using the Copilot suggestions, but they just haven't worked.  
  • David_MA Profile Picture
    9,770 Super User 2025 Season 1 on 14 Mar 2025 at 18:05:02
    Move an email when triggered to an Outlook folder based on subject line or body
    What you explain and have read is accurate. You can either use the trigger when new mail arrives, or when a message is flagged. Therefore, if it is possible, I would create rules in Outlook to move the e-mails to the folder needed based on the key words. You can then use when new mail arrives trigger and point it to the folder. If you have multiple folders, you will need to set up a flow for each folder you need to monitor.
     
    The only other option I can think would be to use the AI Builder to do what you are doing manually. If you go that route, you may want to post your question in the AI Builder forum at Microsoft Power Platform Community Forum Thread.
     
    Note: this does not mean there are no other options. The above is what I am aware of. People are always coming up with creative ways to use Power Automate and solve their problems.

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

Thomas Rice – Community Spotlight

We are honored to recognize Thomas Rice as our March 2025 Community…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,508 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,431 Most Valuable Professional

Leaderboard
Loading started
Loading complete