Showing results for 
Search instead for 
Did you mean: 
New Member

Mail merge with unique attachment in desktop version

I have been trying to create a workflow for mail merge with unique attachments in Power Automate Desktop. I have an excel list of email ids.  And all the files in a folder. Please help. I am new to this.


Accepted Solutions

ColumnName is the name of the column in your Excel file. You don't need all those extra variables

View solution in original post


Getting this error.


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)

Might be caused by the recipient address? If you get that from Excel, try to use trim before to remove whitespaces.

New Member

I don't think so. I used VBA coding for the same. It worked fine through that excel. 

Memorable Member
Memorable Member

PAD is not VBA 😉


This is how I extracted all my data from different columns into list such as To sent, cc, subject, document path. 

Did that. Still same. Have a look at the screenshots I posted in this comment and others. 





Memorable Member
Memorable Member

the error comes from the send email action

yes. I reduced my email list to just 1 line. It worked fine. There is something wrong with the way I am extracting my data from excel I guess

Memorable Member
Memorable Member

You are sending to a list variable, which values are separated by comma. Outlook recognizes semicolon by default.

Do you really want to send one single email to all recipients? Otherwise you need to go through every row of your columns. 



No. I dont wanna send a single email to all the recipients. I wanna send individual mail to each of them. So what should I do now?  For loop used here should do that, right?


for each in %ExcelData%


Still not working. 


It is saying Index 'Tosent' is invalid.

ToSent is my list of email ids

ColumnName is the name of the column in your Excel file. You don't need all those extra variables

View solution in original post

Worked perfectly fine. Thanks a ton🤗

Helpful resources

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group


Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Users online (55,020)