Search and Download the attachments on Outlook

HI,

I need to handle the following kind of scenario using outlook.

  1. Filter Unread emails (OK)
  2. Search Email with specific name (OK)
  3. IF attachment available download it into a specific folder. (Pending)
  4. Check next unread email (pending)
  1. Retrieve the email message from outlook
     Go to the Office365.
     Click on Filter.
     Select the Unread emails.

  2. Read the email (Subject line and attachment) and Save the attachment at specific folder in our machine
     Read the Unread emails one by one and download the attachments to a common folder.

Please Refer the Screenshot

  • According to the screenshot, I need to download every attachment under the NTB Subject

@azinchuk

@Lasitha_Wijenayake,

Where exactly do you have problems or need an advice?

1 Like

I didn’t get you, I have this problem, and I looking for a solution . :frowning:

IF you can please help me

So you have problems on the step # 3?

IF attachment available download it into a specific folder. (Pending)

1 Like

ya, I have a problem in steps 3 and 4.

" Read the email (Subject line and attachment) and Save the attachment at specific folder in our machine

  • Read the Unread emails one by one and download the attachments to a common folder. "

You can download an attachment by searching the “clip” icon and clicking on it:

Afterwards, you can add a mouse-click action (right-click) with an anchor area on the Message and the crosshair on the first attachment

Finally you need to click the Save all attachments button

1 Like

Ok, that’s cool. :smiley:
But one thing, How to iterate Unread email box? I need to filter and read emails one by one and download the attachments to a common folder.

If you can please upload a sample script :confused:

We have no sample script for this but the idea could be the following:

create a Boolean variable no_unread_found = false

action flow can look like this:

While (no_unread_found == false)
    Find Image (inbox.png), result to 'no_unread_found'
    ...your custom action (clicking on attachments, etc.)

inbox.png

This image will not be found if inbox contains any elements:

it will hard to use the following kind of situation.

IF I search Unread emails as “NTB” Inbox = 1 after finish my iterations.

You can create a Rule in Outlook that will move all your filtered emails to a specific folder.

And then apply the approach above to this folder

2 Likes

That’s looks fine, I’ll try and let you know. Thanks a lot

@azinchuk
I have an another problem regarding this process
image recognition? please check the attached image

I need to get this attachment name and store in a variable.
File is in Locked mode cannot open file

@azinchuk help me

You can use the OCR action to get the file name into a text variable.

1 Like

its take a huge time in my PC… :frowning:

@azinchuk OCR part is not working. but I found a work around, Click save as and then I copied file name into clipboard

1 Like

I don’t understand why are you looking to do this with a bot,

Wouldn’t be easier to user Office 365 FLOW (or an Outlook rule) to download every attachtment on your OneDrive and have your OneDrive folder synced in your PC?

1 Like

Hi,

@JPena_Gonzalez Good point.

But for example, in my case i have a link in the body of message, but i dont know how to filter the messages. how you doing @Lasitha_Wijenayake and @azinchuk can you help me?

Thanks

1 Like

Actually what you need?