Get outlook mail message getting mail with a specific subject

Hi guys.

How do you get email with a specifc subject using get outlook mail message.

So for now I have the get outlook mail messgae and then a for each loop to cycle through each message. How do you set it to get a specific subject line.

Also how do you use the save attachment activity. So save an attachment in an email from a person with a particular subject line. Then open that attachment.

So far done this. Not sure if I am doing it right. If anyone can help please.

image

@bobby in if condition give as mail.subject.contains(“value”)

1 Like

Ok thanks man. Can you also help me with the save attachments activity. Not sure what to place here?
I am thinking that text must be quoted in the path to where to store the attachment. But what is mail message. I thought this is taken care of by the if statement activity?

image

@bobby in the mail message place mail and in the text place place the path where you want to store.

1 Like

@bobby did it works buddy

1 Like

Thanks man. It worked. Yay. Also once the attachment is saved. How do you get uipath to open it. Would you have to use click activites and navigate to the folder. Or can you open it another way? Not sure what the output attachments property does? Can you store the attachment in a variable and open it that way in uipath?

@bobby ok so you want to open the downloaded files right.you can make it by using directory.getfiles(“folder path”) and then using for each you can do whatever you wish.

1 Like

Yes exactly man. I want to open the files and then scarpe data from them. Where do you place the directory.getfiles? what activity do you use?

Use assign activity below the for each in the value place give as directory. Getfiles(“folder path”) and assign this to a variable say outfiles use for each to loop each file

1 Like

It does not seem to work man.

Also once you set up the assign then the for each loop. What opens the files. Not sure what activity to use?

@bobby give like this buddy directory.getfiles(“path where you stored the attachments”)

1 Like

I got it man, cheers. I assigned it to a string variable whereas it should be a string array. I am so silly. Ok in the for each loop what activity opens the files in the variable?

@bobby in the body section use write line activity to check whether the files are coming or not,if yes then what are the files you’re getting are those excel or pdf files

1 Like

Excel spreadsheet. When I used the writeline. It says:
image

@bobby have a look at thissave attachments.xaml (8.3 KB)

@bobby where you used that write line activity it should be in body of for each and make sure the change the type argument of for each in properties panel should be string

1 Like

Never mind man. I fixed it.

@bobby cheers is it worked now for you.

1 Like

Yeah man. Thanks. Just for my understand what does the last for each row used for?

@bobby since we’re getting output of read range as datatable to read each and every row of the excel sheet we use for each row activity.for your understanding do one thing give assign activity and in the place value give like get row item,in properties panel give column index as 0 and and in row give as row and store the value with in a variable and then just below the get row item use write line activity and give that variable.

1 Like