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 / %RetrievedEmails[0].Fr...
Power Automate
Answered

%RetrievedEmails[0].From% (Outlook Message Datatype Property .From) reporting as bad syntax

(0) ShareShare
ReportReport
Posted on by 5,727 Moderator

I clearly have captured .From in my Retrieve Emails:

MichaelAnnis_0-1634339354219.png

Therefore, %RetrievedEmails[0].From% should give me the from e-mail address.

I am trying to use a Switch Case, but every time I try to get .From from an Outlook Email Message, it fails.

 

I have tried to work around it by getting %RetrievedEmails[0]% as it's own variable %CurrentEmail% which was a success and it was read as an individual Outlook Message; however, when I tried to get %CurrentEmail.From% it gave me the same syntax error.  Any syntax error will not allow you to run the PAD flow.

 

MichaelAnnis_1-1634339607615.png

Anybody know why .From is not working when it is clearly stated as a property in the first image and listed as an available property here:
https://docs.microsoft.com/en-us/power-automate/desktop-flows/datatype-properties#outlook-mail-messages

Any help would be appreciated.

Thanks,


Mike

 

I have the same question (0)
  • Verified answer
    Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hello @MichaelAnnis 

     

    I could retrieve the from email address using %RetrievedEmails[0]['From']%.

    However, I have to agree with the feeling of strangeness you felt.

     

    %RetrievedEmails[0]['From']%
    %RetrievedEmails[0].Date%
    %RetrievedEmails[0].Subject%

     

    I wonder why ".From" cause syntax error, while ".Date" or ".Subject" is working with no problem?

  • MichaelAnnis Profile Picture
    5,727 Moderator on at

    That worked perfectly.  Thank you @Anonymous .  I have no idea how you figured that out.  I tried so many different things.  Thanks again.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hello @MichaelAnnis 

     

    Good to hear it worked. 🙂

     

    How I figured it out:

     

    [1] Use any action to refer infromation of the current Email message, such like "Display message" for example. Click {x} icon to bring "Select variable" fly-out menu.

     

    shindomo_0-1634675562630.png

     

    [2] You will find the variable "CurrentEmail" which type is "Outlook email message" and storing email properties such like .To, .Cc, .Bcc, .Body, etc. Of course there is property .From as you already know.

     

    shindomo_1-1634675767337.png

     

    [3] Choose property .From and click [Select] button.

     

    shindomo_2-1634676162209.png

     

    [4] Now we can see the actual syntax of .From property is %CurrentEmail['From']%.

     

    shindomo_3-1634676239804.png

     

    That's it. Thank you.

  • MichaelAnnis Profile Picture
    5,727 Moderator on at

    Did not know you could do that from that window...That's cool.  I've always directed people to the variable pane on the right to find that info.  Thanks again.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 796

#2
Valantis Profile Picture

Valantis 671

#3
Haque Profile Picture

Haque 551

Last 30 days Overall leaderboard