How can i add multiple emails one by one using Top "1" property of outlook Message Activity

How can i add outlook MailMessage object in List one by one from top to bottom where in outlook property is Top “1”.
email

add one by one from top to bottom using Outlook Property Top = “1”
“List list”

Top = 1 is used to retrieve only one mail from the outlook @pankajs3 ,

If you want to get all the mails from the outlook try increasing the count and use for each activity to iterate through the mails .

image

@HareeshMR
i want to add one by one from top to bottom. But each time it read only one mail then add it in list from top to bottom

Can you elaborate a bit please?

You can get any number of mails from the outlook by increasing the value in the top and you can read them one by one using for each as mentioned above

If i will increase the value in top it will read from top starting email to the number of increase in Top field. But i want it read only one email. and i don’t want it read from Starting top 1st email to number or Top value given.

If i will give Top = “2” it will read 1st email then 2nd email from top
If i will give Top = “3” it will read 1st email then 2nd email then 3rd email from top

But i want it read only one email

I’m still confused. Correct me if I’m wrong

You want to read single mail everytime?

@HareeshMR
Yes
it gives me
If i will give Top = “1” it will read 1st email from top
If i will give Top = “2” it will read 1st, 2nd email from top
If i will give Top = “3” it will read 1st, 2nd, 3rd email from top

but
i want
If i will give Top = “1” it will read only 1st email from top
If i will give Top = “2” it will read only 2nd email from top
If i will give Top = “3” it will read only 3rd email from top

Tell me how can i read one by one only one email from top to bottom

We don’t have predefined activities for that. Why don’t you use output index in for each activity so that you can get the index of the element you are iterating and you can get the value based on the index.

Or you can save each message body or subject to a collection as :

  1. Key is the subject or from address and
  2. Value is what you want to get from the loop. Then you can get the values from the dictionary based on the count or the mail id.

because i am not sure how will i handle more emails that’s why i am getting one by one email.
there may be 20 emails, 200 emails, 2000 emails or 5000 emails. there is not sure of emails numbers because on more emails it gives times out error.

@HareeshMR

How can i get output index in for-each activity?
Can you elaborate more…?

You will have it in the properties pane on the right