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

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

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

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

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
 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Top Solution Authors
Top Kudoed Authors
Users online (5,078)