Downloading attachement from a specific folder outlook

Hello,

I am here again.

The use case I want to develop is :slight_smile:
1 Open outlook and go to "RBT "
2 Open the first unread message and check if a pdf attached
3 If yes, then download it in a local folder, If not , move file to "already treated " folder.
4 Send email to customer to notify that his email has been taken into account

I am facing some problems…
You will fin herewith attached an image to show you an example of the problem

I thank you in advanced
image

1 Like

@dalilasencha

Could you please go to that exclamation mark and show us the error.

And also you are using this inside For Each loop right ? If yes then please check whether you passed TypeArgument as System.Net.Mail.Message or not ?

@dalilasencha

Save attachment activity path property must be double quote
Like “D:\Profle”
Thanks

2 Likes

image

This is what I obtain as a message

In fact I don’t have the error anymore , howeevr I don’t know what should I put as VB Expression
Could you help me please?

@dalilasencha

You have to pass output of Get Outlook MailMessage Activity here.

1 Like

To pass output , what do you mean by that?
I am still a junior developer so need more explanation… Thanks!

1 Like

Fine now worries
Hope these steps could help you resolve this
—use a get outlook mail activity and get the output with a variable of type list of mailmessages I.e.,
System.Collections.Generic.List(of mailmessages)
with a variable named out_nailmessage
—now use a for each loop activity and pass the above variable out_mailmessage as input (the one you asked what to pass in expression, just mention the output variable name of the get outlook mail activity) and change the type argument property in the property panel of For each loop as mailmessage
-inside this as you have used in a if condition like
Mail.Attachments.Any is correct
And if this condition passes it will go to THEN part where we can include the save attachment activity and mention the mail as mail (as this the variable that has the mailmessage obtained from the for each loop) and mention the folder path where you want to save the file
—after this in the THEN part itself we can use a send outlook mail Activity stating that “the mail is acknowledged” in the body of the mail.

Simple isn’t it
Hope this would help you
Kindly try this and let know for any queries or clarifications
Cheers @dalilasencha

Hi @Palaniyappan, thanks for all your explanaitions.

I am trying to put into practice your advices however still not working.
Could you please share with me the the workflow?

1 Like

Fine
May I know what was the error faced
Cheers @dalilasencha

image This is what I obtain…nothing else happens

1 Like

@dalilasencha

could you please check specified folder exists in outlook. And also it should be enclosed in double quotes and if it is sub folder then specify its parent folder along with it.

"ParentFolder\ChildFolder"

You were almost done
Fine this looks like issue us with the folder mentioned in the property
Kindly mention the folder as “Inbox\RBT”
If RBT is a subfolder
Or can I have a view in the property panel of get outlook mail activity if possible
Cheers @dalilasencha

Already done…

:frowning:

image this is the folder I want to chose

@dalilasencha

Could you please show me the screenshot of your mailbox also.

Do you mean this?

outlookissue.xaml (8.3 KB) this is my worfklow

@dalilasencha

Output of Get Outlook MailMessage activity is of type System.Net.Mail.MailMessage but not System.Web.Mail.MailMessage.

And also show me scrrenshot of your Outlook mail folder.

I’ve juste shared the entire workflox, I think it would be easier for you to identify the problem