I need support for how to download spacific attahc file and ignor the aothers

i have used get outlook message to read email account and then used for each to download attached files from all mails to be processed. but i need to download only the excel file. and ignore the other attachment using the filter at the get outlook activity. i have used this as filter “xlsx” didn’t work also i tried this “*.xlsx” also didn’t work.

another thing i need the bot to process only the emails coming from specific senders not
all senders.
thanks

That’s a filter for the emails, not the attachments. Filter for emails would be like “subject eq ‘this is the subject’”

To get only certain attachments, you have to use the Save Email Attachments activity and set the filter there.

1 Like

Here is how to filter emails.

i am using get outlook message only because it has the option of process the first in first out
image
is it also can be done by using outlook app?

Hi @mohamed.saty2012

Can you try like below

Regards,

@mohamed.saty2012

For only specific sender mails

"[SenderEmailAddress] = 'no-reply@microsoft.com'"

Regards,

i have done the same for the senders but it didn’t work

@mohamed.saty2012

You are using .com 2 times please check

Regards,

i have adjusted it but still same result

@mohamed.saty2012

Is it throwing any error?

Another way try the below

FilteredMails = RetrievedMails.Where(Function(msg) msg.SenderEmailAddress.Equals("MailAddress")).ToList()

Regards,

it doesn’t throw any errors the bot will process any unread email once i entered any value in the filter field it acts like there is no unread messages

@mohamed.saty2012

Can you try to update UiPath.Mail.Activities package to 1.23.1 version if that doesn’t work try above method

Regards,

I don’t understand your question. You are putting the filter into the Get Emails activity, that’s not where the filter should be. To get attachments you use the Save Attachments activity, and put the “*.xlsx” filter in THERE.

yes, I get that and I have done it the problem now in the get outlook filter i need to download the excel from specifics senders. the bot runs normally and process only the excel sheets but once I put in the outlook filter any email sender the boy ignores any unread emails.
if I remove the filter, it works fine

i have updated the package but still the same problem

@mohamed.saty2012

Have you tried another method which i have shared

Regards,

can you share the assign value

@mohamed.saty2012

FilteredMails = RetrievedMails.Where(Function(msg) msg.SenderEmailAddress.Equals("MailAddress")).ToList()

1 Like

i will try and inform you

1 Like

Hie @mohamed.saty2012 pass this filter in save attachment not in get outlook mail message actvity


this solve your query
happy automation

1 Like