Is there any activity to continuously watch for an particular mail, and if there is any attachment it should download and copy or read the content from the mail body, and use the attachment and body content for processing.
You need to run the bot to check if there is new mail in the inbox and you can check the attachments of the mail as mail.attachments.count < 1 in the if else condition @monish06
My requirement is my bot should continuously run, whenever a new mail has been arrived, I want to filter the mail subject, after opening it i want to download the attachments and use it. @lakshman @Palaniyappan @HareeshMR
Use Get Outlook Mail Message Activity and set Top field as 1 and also check MarkAsRead and Unread options. So that it will read first mail from mail box. And it will give output as List of System.Net.Mail.Messages and say mail messages
Then use ForEach loop to iterate that list.
ForEach item in mailMessages IF item.Subject.Tostring.Equals("requiredSubject") AND item.Attachment.Count > 1 Then use Save Attachment Activity to save attachment. Else Nothing
We have already got a document from uipath in this
And here in the right side of flow decision along the sequence check for mail message
We can make some changes according to our need
—like use a FOR EACH loop and pass the list of mail message variable as input and change the type argument as system.net.mail.mailmessage in the property panel of for each loop
—inside the loop use a IF condition like this
If true it will go to THEN part where use another FOR EACH loop and change the variable name from item to mails and pass the input as item.Attachments and change the type argument as System.Net.Mail.Attachment
—then inside that inner for each loop use SAVE ATTACHMENT activity and mention IF conditon like this
If true it will go to THEN part where we can use READ PDF or READ PDF WITH OCR activity to read them and store it for processing
It will go to ELSE part where we can use another IF condition like this
If true it will go to THEN part where we can use EXCEL APPLICATION SCOPE and pass the file path as input and use read to process them
Kindly try this and let know for any queries or clarification
thank you i will give a try.
thank you i will give a try. @lakshman
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.