Email Automation PDF

Hi Guys,

How can we send 10 Pdf files in an Email with Subject as Filename of the Pdf File?

@Aditya_Srinivas - Please read all the files in the String Array using Directory.get files…and Pass the string Array in the ’AttachmentsCollections’ as shown below

In the above example, SummaryFiles = image

So similary you can get the 10 pdfs and pass it to AttachmentsCollection

Hope this helps…

Hey @Aditya_Srinivas

You can follow these steps.

  1. Get Array String of all the pdfs using System.io.Directory.GetFiles(“File Path”,".pdf")
  2. Use SMTP or Outlook(whichever you find feasible) and in subject you have to use String.Join to convert array to string
    image

Take a look at workflow.
Main.xaml (5.3 KB)

thanks for contributing!

Hi,
I’m unable to get file name as subject for the Email. Please help me.

@Aditya_Srinivas … you mean all the 10 file names as subject ? …

Hi,
Yes, I need to send 10 pdf files separately with file name of each file for each mail i.e, 10 mails

@Aditya_Srinivas … I am not clear on your requirement…Initially you asked like this…

Now, you are stating I need to send 10 pdf files separately with file name of each file for each mail i.e, 10 mails

Do a for each loop for the folderlist…and inside send outlook mail message activity, use Path.getfilename(). Click attachfiles and add the same command to attach the pdf file…

Hi,
Thanks for the solution. As I’m looking for the exact thing. Thank you very much.