Outlook attachment download

Below I am given user story. How to do?
1.Get the outlook mails
2.Select the specific mail(specific mean search on mail subject)
3.Double click the attechment (It’s a pdf file)
4.Enter the password for view the attechment
5.Finaly I saved the the file at specific location in my machine.
Can you give me the guide?
This is my incomplete work flows


Hey @Ahsan_Mohamed

As per your user story just wants to make some changes, like below:

1.Get the outlook mails - :thumbsup:
2.Select the specific mail(specific mean search on mail subject) - :thumbsup: can use "Filter mail property with Get outlook mail activity as well.
3.Double click the attechment (It’s a pdf file) - insted of this approach you can use either “Save Attachement” Activity with filter option or can check this post as well:

4.Enter the password for view the attechment- To view the pdf file use “Read pdf Text” activity and enter username and password to it’s properties.
5.Finaly I saved the the file at specific location in my machine.- No need because you have done this with step 3

Let me know, if you still have a doubt on this :slight_smile:

Regards…!!
Aksh

3 Likes

Thanks a lot…

hi Aksh,
I am new in UI Path Could you please tell me the simple steps to download attachment through UI Path.

Thanks,
Neha

Hey @Neha_Agrawal

I can but to get more familiar with uipath, explore it more by using the things by own and if getting any problem then this is a best platform to share :slight_smile:

Steps are as follow:

  1. If you are Using Outlook then use “Get Outlook Mail Message” Activity and if you are using other and if you are using other Like IMAP which supports like GMail then use “Get Imape Mail message” activity and similar like others available.
    *plase make sure you have installed all available packages from package manager.
  2. Use For-each loop construct having type argument “System.net.mailmessage”.
  3. Check if this mail is have any attachment, if nothing then skip it.

For your reference:

Regards…!!
Aksh

2 Likes

Hi aksh, i’m trying to test your solution with gmail, but i did not found “mailmsgs” or “item.Attachement.any”?! is there any specefic command for gmail?

Step 1. Add an Activity - “Get Outlook Mail Messages”

  • In the Properties window use the Filter Option for mails with attachments only. This will fetch only mails with attachments and is a faster solution.
  • “[HasAttachments”] = true

Step 2. Add an activity - “Save Attachments” and specify a folder path.

This is the most efficient way to download attachments from outlook mails

Note: If you have too many mails (I had about 900 mails with attachment) increase the time out property and also make sure the top property is not set to some default number like 100

Hope this helps. I am sure other ways like Items.Attachments works too but if you do not need to do anything with mails with no attachments this is a better option

1 Like

Hello aksh1yadav

Can you help me with steps and sample of how to write a bot to pick data from excel and fill on the web.

I have searched everywhere on the web with no solution.Kindly assist.

[HasAttachments] doesnt work for me. Any suggestions how I can filter on attachments?

Hi,

I have scenario :-1:search from outlook with subject.
2: what ever result we got I have to open that mail one after other(here I stuck).
3.extract data from email body and paste that in to excel.

Please help me .
Thanks In Advance.

Hi,

I have scenario :-
1:search from outlook with subject.
2: what ever result we got I have to open that mail one after other(here I stuck).
3.extract data from email body and paste that in to excel.

Please help me .
Thanks In Advance.

@prvnk1 has attachments can´t work, conversion error. where did you get this from

thx