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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Retrieve email message...
Power Automate
Suggested Answer

Retrieve email messages from Outlook - not producing variables

(1) ShareShare
ReportReport
Posted on by 6
Hello all!
 
I am attempting to use the 'Retrieve email messages from Outlook' action to pull data from the .Body for further analysis. However, when pull up the RetrievedEmail variable, the only option is '.count'. Can someone point me in the right direction to find .Body or .Subject? I am a bit lost.
 
 

 
Thanks!
Kris

 

 

I have the same question (0)
  • KW-03091517-0 Profile Picture
    6 on at
    Apologies the image cropped in the original post:
     
  • Suggested answer
    eetuRobo Profile Picture
    4,204 Super User 2025 Season 2 on at
    Thats because Retrieve emails returns a "List of Outlook email mesagges"


    When you click "More" you can see each message has .Body and other properties like Subject. So to get those use %RetrievedEmails[0].Body%. But that returns only the first emails .Body since it is index [0] of the list.

     So if you get more than one loop the retrievedEmail list with for each loop and use CurrentItem.Body or CurrentItem.Subject

  • KW-03091517-0 Profile Picture
    6 on at
    Hi there!
     
    Really appreciate your response - I should also mention that I am using the 'Subject contains:' for a unique ID to isolate to a single email. I wonder if this changes things?
     
    Thanks!
     
  • Suggested answer
    eetuRobo Profile Picture
    4,204 Super User 2025 Season 2 on at
    @KW-03091517-0 

    It doesn't change the output from being a list. Retrieve email messages from Outlook -action will always return a list. So even if the "Retrieve email messages from Outlook" returns just one email then the output variable will still be list/array type.

    So since its just one email in that list variable use: %RetrievedEmails[0].Body% or .Subject. You don't need to use loop since you know that the variable will always have list of just one item.
     

     
  • EH-18030801-0 Profile Picture
    4 on at
    Hello There
     
    I have t he same problem and so far i couldnt find any acceptable repl to that. In my computer the variable doesnt show the ITEMS it only shows the summary. However when i look at the variable output i see the details when i click MORE option.
     
    Anyone has any idea why is that happening?
     
    Regards
  • Suggested answer
    EH-18030801-0 Profile Picture
    4 on at
    I think i ve got a solution to that, try these expressions in any action to retreive the items, i suggest first put in variables as i described then use them anyway you like
     
    Set Variable  EmailBody 
    %RetrievedEmails[0]["BodyText"]%
     
    Set Variable EmailSubject
    %RetrievedEmails[0]["Subject"]%
     
    Set Variable EmailFrom
    %RetrievedEmails[0]["From"]%
     
    Set Variable EmailTo
    %RetrievedEmails[0]["To"]%

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard