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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Filter email subject b...
Power Automate
Answered

Filter email subject by regex

(0) ShareShare
ReportReport
Posted on by 20

I have a retrieve email messages from Outlook action. I want to get only emails with a certain subject format. I have the regex that should work but how do I add it to the 'subject contains' field? 

 

Example string: R123456_123456789_1234567891

 

Example regex: ?\d{6}_\d{9}_\d{10}

  • Verified answer
    Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    The Retrieve email messages from Outlook action does not support regex in its filters. You will need to retrieve all emails and then iterate through them to check them one by one. You can use regex in a Parse text action to check if you get any matches in the subject. If you don't you can use Process email messages in Outlook to mark the irrelevant message as unread again, so the flow does not mess up any messages it shouldn't mess up.

    -------------------------------------------------------------------------
    If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.

    I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 299

#2
11manish Profile Picture

11manish 274 Super User 2026 Season 2

#3
Henil Profile Picture

Henil 119

Last 30 days Overall leaderboard