How can i filter this case

think we have
10 mails from [test@gmail.com]
5 mails from [sample@gamil.com]
2 mails from [kholi@gmail.com]

i need to get the last email send by [test@gmail.com], [sample@gamil.com] ,kholi@gmail.com

Hi @Tharusha_Fernando
Please use the “Get Outlook Mail messages” activity.
You can use it 3 times if you need latest mail only from 3 email senders.
In the options:
filter: “[From]= test@gmail.com
Top: 1
See the video below for more details:

You can use “Get outlook mail message” with a filter, input the below text into the filter field to get messages where sender = test@gmail.com or sample@gamil.com or kholi@gmail.com.

"@SQL=urn:schemas:httpmail:fromemail = 'test@gmail.com' OR urn:schemas:httpmail:fromemail = 'sample@gamil.com' OR urn:schemas:httpmail:fromemail = 'kholi@gmail.com'"

The result will be a list of messages that matches the filter. You can choose what to do with this result e.g. loop over each mail in the result etc

If you just want the latest mail from each email you can call “Get outlook messages” 3 times with 3 separate filters and just get the first result
image

@jack.chan thats also fine but for this situvation im finding just one code to do it all
thanks buddy

1 Like

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