Good Morning, I have a requirement to get emails from Outlook by filtering list of send emails using Get Outlook Mail Message. But, here i can not use loop, instead of loop i need to use a filter query.
So, can anyone please help me.
Take a look here at the documentation and scroll down to the Filtering Emails section.
https://docs.uipath.com/activities/docs/get-outlook-mail-messages
Also, take a look at this video.
Hopefully this helps,
Cheers
Steve
Hi @Steven_McKeering, here my requirement is to get emails from Outlook by specific email sender address which are there in a excel file called mapping file. So, i need to pass a filter query in a way that, i need to check if the email sender address is matches with the emails which are there in the mapping file and if matches get the email. So, any idea how to do it without loop…!?
Hey @mitradev_das
Thats an interesting one. There are a few options.
Can I suggest this - I would setup a pre-step/process before this step where you can use a for each loop. Then I would move all the emails for processing to a subfolder in the pre-step. Then in the main process redirect to that subfolder instead of the inbox
Cheers
Steve
@mitradev_das try this
Mapping.xlsx (11.5 KB)
Sequence3.xaml (10.2 KB)
Example mapping file
-
read range to read mapping table to mappingDt
-
assign this to emailFilterString
String.Join(" OR ", mappingDt.AsEnumerable.Select(Function(row) "[SenderEmailAddress]="+"'" + row("Sender").ToString+"'"))
now emailFilterstring will look like this
[SenderEmailAddress]='noreply.invitations@trustpilotmail.com' OR [SenderEmailAddress]='noreply@steampowered.com'
- now simply pass emailFilterString to get mail message activity
Use a For Each Loop on the Mapping File Spreadsheet to update the yellow highlighted section of the below Mail filter:
Yellow section = For each ‘item’ value
Is that enough detail?
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.