How to save mail attachment with subject into a particular folder

How to save mail attachment with subject into a particular folder

Hi I am trying to save outlook attachment with subject name in particular folder, could you please help me with this

@Sudheer_Kumar_S - have a look

@Sudheer_Kumar_S,

You can use for each on list of mail message variable.

For each mail in mailMessage {
if mail.subject.contains(“xxx”) {
// save attachment
}else{ // do nothing}
}

Hi @Pankaj.Patil

I am trying to save the attachment with subject name(need to rename the attachment with subject name ex: attacment name is pankaj but subject is sudheer i want to save file with subject name that is sudheer). but it is creating folder and inside it saving the file.

@Sudheer_Kumar_S,

Got it, so review your path of save attachment file where you’re locating file.

Tried many things but no it is creating folder and inside it is saving file as it is

I am trying to save the attachment with subject name(need to rename the attachment with subject name ex: attacment name is pankaj but subject is sudheer i want to save file with subject name that is sudheer). but it is creating folder and inside it saving the file.

@Sudheer_Kumar_S - use the Move File activity and change the file name and destination accordingly.

can you update that code how to change the file name dynamically

@Sudheer_Kumar_S - check the solution pls…

this will save the file but it will save in side a folder with subject name of that mail… I am looking for how can we save the file with subject name without creating the folder