Identify which item from a list is contained in email subject?




It might be super simple but I can’t find the solution.

I am reading emails from an inbox and want to look for specific keywords in the subject. According to these subjects the attachment should be saved to different folders. The approach I have in mind is storing the keyword in a variable (e.g. var1) and use this variable to identify the folder (“Z:\gloegglt\Documents\UiPath” + var1).

My issue is that the keyword has to come out of this list. But how can I identify which item of the list applies in the specific case?

Thank you!



Hi @TG1989,

Would it be helpful for you?

Main.xaml (6.0 KB)



Hi @acaciomelo ,

Thank you for your answer!

Your solution is good, however, I would like to create the flow in a way that the list is completely dynamic (so that I can for example feed it in from a configuration file). Therefore I don’t wan’t to hardcode the keyword anywhere. My idea is to have to list (which is fed in from extern) and have an (maybe) assign activity, which determines the one item from the list that applies and turns it into a string variable.

Do you have any idea how I could solve this?

Thank you!


Hi @TG1989,

You could create a JSON File which basically contains the list of subjects.

Subjects.json (53 Bytes)

  1. JSON as string variable
    Main.xaml (6.4 KB)

  2. JSON from external file
    Main.xaml (6.7 KB)


Once you have the JSON Object, you may also convert it to a list of strings just like that: