Looping

uiautomation

#1

I have a workflow where I receive an email, download the attachment, and then input it into a third party system. It can download all 2 attachments but only read the latest one and input it into the system.

This is my excel
image

this is my system I have to input it into
image

this is my workflow
image

Is it possible to loop it?


#2

do you want to read both the attachments?


#3

yes read then input it into the system…


#4

If you are using the Save Attachments activity, it stores the attachments to a list in the Output property.
Then, just use a For each with that variable.
It will look like this:

Get mail messages
Save attachments
For each att In attList
    Read Files
    Open browser
    et cetera

You can also if you want put a flowchart inside the For each activity inplace of the Body sequence.

Regards.


#5

Hi thanks for the reply.
So i would put a foreach after the save attachments activity?

image


#6

Yeah, it would go after you have saved the attachments and created a list of those files, which you should be able to store by using the Output property of the Save Attachments.

Also, I noticed you have 2 For each loops that loop through the GetMail variable. You should only use 1 For each.
So, it is For each mail in GETMail, If subject contains keyword, Save Attachments, For each att in AttachList, et cetera

Regards.


#7

thank you I have solved the problem.