cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
r96359
Helper IV
Helper IV

Power Automate Desktop: Using email "From" variable for office 365 email on same domain doesn't return email address

I am retrieving email that match by subject using "Retrieve email messages from Outlook".

I am then trying to respond to these emails by picking up the variable %CurrentItem['From']% from "For Each" "Current Item" .

The value "From" is not an email address as expected. Instead it's a very long string that has DN information and cannot be used when trying to send emails back in reply to sender. Example Below:

 

From value returned:

r96359_0-1619673628411.png

 

When trying to use the From variable value I get this message:

 

Robin.Core.ActionException: Failed to send email message ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Runtime.InteropServices.COMException: Outlook does not recognize one or more names.
--- End of inner exception stack trace ---
at System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture, String[] namedParameters)
at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
at System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args, CultureInfo culture)
at Robin.Modules.Outlook.Actions.OutlookActions.InvokeMethod(Object o, String methodName, Object[] methodArgs)
at Robin.Modules.Outlook.Actions.OutlookActions.SendEmailThroughOutlook(Variant outlookInstance, Variant account, Variant from, Variant to, Variant cc, Variant bcc, Variant subject, Variant body, Variant attachments, Boolean isBodyHtml, Int32 sendEmailFrom)
--- End of inner exception stack trace ---
at Robin.Modules.Outlook.Actions.SendEmailThroughOutlook.Execute(ActionContext context)
at Robin.Runtime.Engine.ActionRunner.RunAction(String action, Dictionary`2 inputArguments, Dictionary`2 outputArguments, IActionStatement statement)

 

Anyone know how to solve this? 

Thanks!

3 REPLIES 3
r96359
Helper IV
Helper IV

Of course it's always when I type in a message for help that I find some other way to search for an answer.

So it looks like I need to use "Respond to Outlook Message" instead of  Send email message through Outlook.

Using this way, it automatically takes the variable of FROM and can send it properly even when on the same domain.

This tests out and works great.

Found this video: https://www.youtube.com/watch?v=zKEjiqb0SBU 

r96359
Helper IV
Helper IV

Anyone know why a DN string is stored as FROM when retrieving email from other employees within the domain?

Doesn't happen from outside email.

 

Looks like this and it not usable for replying.

r96359_0-1619923495639.png

 

This is still an issue because I want to capture the Email Address so I can use it later but it's un usable as is.

r96359
Helper IV
Helper IV

This should really get fixed so that we can store a "From" variable and not have to rely on the "Respond to Outlook Message". 

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (1,367)