Filter emails and download attachments from Shared Outlook folder


Can somebody help me what activities and logic I should use for the below use case?

I want to search in a shared Outlook inbox. However, it should search through the folders Inbox, Sent, Deleted to see if a particular email was found. The search criteria would be a string that I am pulling from a datatable. Also, only the emails that have attachments (only .pdf) should be searched for. Once the email is found, the top 3 emails should be copied and pasted into a shared drive folder (as email message files) and the attachments within the email should be downloaded.

Can someone please help me with how I should go about this?



  1. Read the outlook messages from each folder with a filter only subject contains the intended string.
  2. Filter all the emails only with attachments. (once all the messages read, add condition to filter the messages with attachments).
  3. Save the attachment in the temp folder and check if the file is ending with pdf (one more filter condition).
  4. Read the time stamp of each message and filter first three emails.
  5. Save outlook message using save mail message activity in a shared folder.

Karthik Byggari