Save email attachments in a folder name with subject and email data and time


I have to download attachments from email and store in a folder,folder name should subject,Date time of email.

and if email has Zip file it should also get extracted in the same folder.


1 Like


Use Save Attachments activity to save Attachments.

@lakshman but how to save in a folder naming with subject and date of email


For subject - mailMessage.Subject
For Date - mailMessage.Headers(“Date”)

Where mailMessage is of type System.Net.Mail.MailMessage.

1 Like


Can you help me to understand what mistake i am doing.

I am getting the below error.

Create directory: The given path’s format is not supported.

MailMesage _Saveto_folder.xaml (9.4 KB)


Could you show me screenshot of how you specified path. So that I can check and let you know what went wrong.

i am tryiing to create a folder with mail subject and date


Is the subject contains any special characters ? I guess may be because of that it’s giving error. Try to print the entire path and check it once.

@lakshman i tried with the subject having no special characters still the error persist


Could you please print that path and show me screenshot of it.

@lakshman Thank you so much for all your efforts . . …i have managed to get the desired output :slightly_smiling_face:

1 Like

Great @heena_shaikh