Mark oldest email only as read

Dear all,

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.


Use the Get Outlook Message activity with properties:

  • MarkAsRead - Enable
  • OnlyUnreadMessages - Enable
  • Top 1

This will get 1 unread email message and mark it as read.
The next execution of the robot will get another 1 unread email.


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

  1. Take the count of number of emails.
  2. Use a While condition N>=1
  3. Inside the while loop use an assign activity and decrement the count N=N-1
  4. 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.

Refer the below workflow for reference.Main (2) (1) (5) (2).xaml (9.0 KB)

1 Like

Hi, @MariaJosephina

Reverse you Microsoft Outlook Inbox order to Oldest First, it will read your old email first.


TThis aslso didnt work

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?


Its not working for me. I changed to oldest in outlook and read top 5. It`s not reading first 5

Hi @MariaJosephina

Did you get the solution for these, if you get it please share the solution.

Thanks and Regards

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.)


Even I have done the same thing thanks for the response

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.