Automating a process involving a file that has yet to be downloaded through email

excel
email
robot
activities

#1

Hi Folks,

I am trying to work on a project to retrieve email attachment ( an Excel sheet) and look up warranty for the devices listed on that downloaded worksheet and enter the validity period into that worksheet again.

I understand that these two are different processes because for the 2nd process I need to select the excel in the first place.

But, how can I select and define a path for the excel while designing the workflow when attached Excel file (the file in which the devices & their serial numbers are listed) is yet to be downloaded from the email ( The first automation task)?

How can I consolidate these two separate processes for automation? Please advice!


#2

you should give the name of that attachment in the path.

like this : “C:\Users\Prathamesh\Desktop\Excel123.xls”

here i dont have any file named Excel123 on desktop. After execution the file is created on desktop.

I hope this will help you!!


#3

You have to get your outlook messages, then save attachment, then use system.io.directory.getfiles(“folder path”) to get the list of files in that folder then do a for loop for each file in that filelist, read the excel file and do the changes u want to make


#4

To piggyback off this, as I feel this is the correct method, I am doing something similar (downloading a report, then having a separate process to perform actions based on the report) and I am doing this by having actions to download the report within the INIT state of the reframework (inbuilt setup within UiPath) and then populating the orchestrator queue with the file names (in your case the excel files I presume) and from there using my PROCESS state to perform work based on these files. I hope that helps clarify?