I clearly have captured .From in my Retrieve Emails:
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.
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-messa...
Any help would be appreciated.
Thanks,
Mike
Solved! Go to Solution.
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?
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?
That worked perfectly. Thank you @Anonymous . I have no idea how you figured that out. I tried so many different things. Thanks again.
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.
[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.
[3] Choose property .From and click [Select] button.
[4] Now we can see the actual syntax of .From property is %CurrentEmail['From']%.
That's it. Thank you.
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.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
At the monthly call, connect with other leaders and find out how community makes your experience even better.
User | Count |
---|---|
43 | |
10 | |
9 | |
5 | |
5 |