Outlook attachment file type and count

Hi, how do I get a list of attachments from the emails in outlook before downloading? I want to get emails with >1 attachment and I want to move the emails with attachment file type (.doc or docx or pdf) to another folder without downloading. Can it be done? How do I do so?

we can get the count like this
where list_mailmessage is a variable obtained as a output from get outlook mail activity

Kindly try this and let know for any queries or clarification
Cheers @junnieset

@Palaniyappan How about the file type for the count of e .docx? Will you be able to advise? Thank you very much.

1 Like

I can help you at this part:

mail_messages(0)-is the last email from the List
For each: TypeArgument: System.Net.Mail.Attachment
Values:mail_messages(0).Attachments
To move the email I used the Exchange activity but you can use other one.
I added Break because when you find a single attachment with your extension the e-mail will be moved and it is not necessary to check the remain ones.

Hope to be helpful.

Regards

yah thats possible
like this where counter is a variable of type int32 with default value 0 defined in the variable panel
use a for each loop inside the first for each loop
here you go with a sample xaml

mail.zip (9.9 KB)

Cheers @junnieset

While using outlook I was getting some errors at the time of attaching file. I was basically getting this at the time of outlook loading profile stuck. Can anybody please tell me how to fix it?

@VladTof This works for finding the file type so far. Thanks!

Thank you. The counter works.

1 Like

Great
@junnieset

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