Suppose I have 100 unread emails in my outlook. I want to read the oldest mail(1st email from bottom) only and mark it only as ‘read’. And I have to do some processing based on this mail.
On next execution, the robot has to pick the oldest email(2nd email from bottom) and mark this email only as read and do some processing based on this email.
How can I do this workflow in uipath. Is it possible to do this?
Please post your ideas.
Thanks in advance.
As you told you want to read the oldest mail from bottom, but the Get Outlook message activity reads the message in LIFO method (Last in First out), but as you told you wanted to read the oldest mail that is FIFO (First IN First Out).
Follow the below steps
Take the count of number of emails.
Use a While condition N>=1
Inside the while loop use an assign activity and decrement the count N=N-1
So N represents the last mail or oldest email and now you can extract body, subject and from,to from the oldest to newest email address.
If you reverse your outlook inbox order to have oldest first and if you read top 1 , it should read your first oldest email . How this isn’t working for you?
@veerlapativenkatesh
In-order to read oldest email,
What I tried now is read to all unread emails from outlook and sort it based on received date. Then I move the mail to a different folder(since I don’t have an option to mark this particular email as read.)