Outlook download attachments

Hello!
I am using download email attachments activity to under outlook integrations to download attachments from mail. Here I am getting output type as “O365AttachmentLocalItem”. Can anyone help me how to extract file or path of downloaded file from this output?

I have tried with path from output variable, the path it’s showing doesn’t exists in my pc.
Thanks in advance!

@panguluri.vamsikrishna,

Welcome to the UiPath Community :tada:

Refer this thread for the solution.

Thanks,
Ashok :slight_smile:

@ashokkarale
Thank you for looking into this!
I have tried using this. But not able to save the attachment. I am using output from Get Email list which will be in form list of office message with index. Can you please look into this?

If I am using Download email attachments activity, the output is not accepting in the code shown in above post.

@panguluri.vamsikrishna,

Could you please share screenshot of the activity configuration?

First, the output of that activity will be a collection of items, not just a single item. So you will have to refer to them like downloaded_file(0), downloaded_file(1), etc. Even if there is only 1 file.

Second, to get the path on your computer, use something like downloaded_file(0).LocalPath

Just be aware that the LocalPath will have a random filename.

image

@KevinE Thank you for looking into this.
I am able to get the local path. But to view the file, I can’t find the path in my local pc, where it shows no results when I am searching for the same.

What do you mean view the file? Within your workflow, or after the workflow has competed?

Within the workflow, refer to it like output(0).LocalPath.

After the workflow has completed, the file is deleted. Notice the. LocalPath is in a temp folder, and it is deleted after the workflow completes.

If you want to save the file for use after your workflow completes, use. LocalPath as the input, and either move or copy the file anywhere else.

@KevinE
I have got that. Thank you

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