Sending varied numbers of attachment in Outlook Email



Hi guys, I am working on a flow which sends multiple emails out, with each email attaching the attachments saved in a directory.

I’ve saved all the attachment in a folder path. I am trying to run a “for each” workflow for the invoke method to add attachment to the email. However, I’m not sure what should the “TargetObject” be as shown in the image below:

Parameters of the invoke method:

Can anyone please help, thanks so much!


Hi @annalyy,

Check this post,


Hey @piyush.2224 you need to setup the smtp for every single attachment .

Regards Abhik .


Thanks @sarathi125

I notice this post is on SMTP but I’m working on outlook email. I tried but the parameter part shows this:

I wonder if outlook mail works differently?



you can iterate using the files information from that directory and send mail activity like this,
AS per my understanding you want to send each file in a separate mails, so I have used System.IO.FileInfo to loop and sending the file’s full name in the attachment action as a parameter.


Thanks @sarathi125

I actually want to send multiple attachments in one email through outlook. How should that work? Thanks!


I am using the workflow below and the file not found exception keeps poping out. However, I’m very sure that the path is correct…any idea? Thanks!!

Main.xaml (12.5 KB)


dynamicattachments.xaml (8.1 KB)


check this attached xaml, we have to pass the parameter to the invoke method. pass file path to that parameter