For each loop for emails

Hi, I’m creating a bot that retrieves emails from Outlook. I have created a variable that counts the number of emails found in the inbox folder. I’m working with the subject and what I want is for the bot to create x amount of variables with the subject name that at the end will create a long variable with al of them. I’m using a for each loop for the mail messages.

Any help is appreciated, thanks!

we should keep in mind that:

  • we look for an appropriate datatype allowing us such flexibility - e.g. list / dictionary…
  • not missmatching modelling / compiling (creation of variable modelled within the flow)

Give a try at:
Create a variable arrSubjects | DataType: String() - a String Array
Assign actvitiy
arrSubjects =
YourGetMailOutputVar.Select(Function (x) x.Subject).toArray

it will create a String Array with all Subjects

When needed it as a flat String then use:

String.Join(“#”, arrSubjects)

This worked! Thank you very much!

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