Hello i would like to save an attachments from outlook but with specific subject for example “G978787” this is the subject of document so i have to search and save.
thanks.
Hello i would like to save an attachments from outlook but with specific subject for example “G978787” this is the subject of document so i have to search and save.
thanks.
Please refer to this thread
https://forum.uipath.com/t/download-attachments-from-emails-with-a-specific-subject/6544
Regards
loop the get outlook mail messages activity to for-each activity and set type argument System.Net.Mail.MailMessage
use if activity to filter like item.Subject.Equals("G978787")
inside the if activity use save attachments to save files
please refer the blow image for better understanding
Thanks
Robin
@Robinnavinraj_S hi but this is the subject of the mail have to search the subject of the pdf that is in the mail and save so i have to find the name of pdf and save
Hi but this is the subject of the mail have to search the subject of the pdf that is in the mail and save so i have to find the name of pdf and save
Then you have to get all the emails. Loop through them and check the filename of the PDF attachment.
@postwick ok but how i could read the name of the file ?
Array_variable=Directory.getfiles(“your pdf file folder peth”)
Pass the array variable to for each
Path.getfilename(item) - returns the file name
Use if activity to check your desired file name like
Path.getfilenamr(item).equals(“your desired file name”)
Or. Else
You can use for each files in folder
Hope it solves your issue
Thanks
Robin
There is no file. You’re using the Outlook activities to get the email directly from Outlook into a variable. That object then has various properties, one of which is the attachments you can loop through, and the attachments have properties also.