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 / Retrieving emails from...
Power Automate
Unanswered

Retrieving emails from Outlook either gives error or runs successful but no values

(0) ShareShare
ReportReport
Posted on by

Hi,

 

I wanted to retrieve emails based on the Subject and move those emails to another folder. I am facing two issues in this process.

 

1. I am getting an error (Failed to Retrieve Email Messages) if I leave the "From Contains" as blank or if the subject is not the exact match. For example if I want to retrieve all emails with Subject starting with "[Your Assigned]" from a given folder for any person, I am getting an error if I do not specify the email address in "From Contains" or if I do not give the entire Subject as "[Your Assigned] *Project Name_ABC_2023"

 

2. If I specify a Email Address in "From Contains" and exact Subject it runs successfully but no output. If I try to get the count of retrieved emails, it displays as 0, even if there are 10 email with the subject. 

Uthraa92_0-1702408296480.png

 

I have tried different methods but nothing works! Has anyone have any suggestions to make it work ? 

 

Thanks in advance!

 

I have the same question (0)
  • UshaJyothiKasibhotla Profile Picture
    225 Moderator on at

    I think your subject is dynamic as it changes

     

    if you need to give subject as starting with "[Your Assigned]" then set a variable before retrieve email activity

    and give variable as model as [Your Assigned] *Project Name_ABC_2023

    then use parse text activity by giving input variable as above variable

    Use regex expression and give the pattern as below

    (?=[Your Assigned]).*

    give this parse text variable in the subject of the retrieve outlook emails activity

    please let me know if that works

    Usha.

     

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    The subject filter does not expect an exact match. It looks for emails where the subject text contains the string you provided. But it must contain the entire string without any wildcards being supported. It would be easier to explain this with an actual sample. So, for example, if the subject text is "[Your Assigned] Some Random text here Project Name_ABC_2023", then it will be found if you look for "[Your Assigned]" or "Project Name_ABC_2023", but it won't be matched if you search for "[Your Assigned] Project Name_ABC_2023", or "[Your Assigned] *Project Name_ABC_2023", as wildcards like * are interpreted literally here.

     

    As to the "from" field, you can leave it blank. It's not mandatory. But if you do populate the field, you need to populate it with a proper email address. Providing the domain name only, or a user name will not be enough.

    -------------------------------------------------------------------------
    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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 269 Super User 2026 Season 2

#2
trice602 Profile Picture

trice602 184 Super User 2026 Season 2

#3
11manish Profile Picture

11manish 136 Super User 2026 Season 2

Last 30 days Overall leaderboard