cancel
Showing results for 
Search instead for 
Did you mean: 

Find value from collection in Email Body

MatthewRoss
Level 4
Hello All,

I am trying to categorise emails based on key words from inside the email body.

If I hardcode the values it is looking for then the process works as expected.
17527.png

Now the next step is to have the keywords which define a category in a locally managed file.

I would of thought putting the list of key words into a collection.

17528.png
To then add that collection to my choice stage

17529.png

But this isnt working as expected.

There is 7 categories, with undefined number of key words (as this is likely to gorw as we progress over time).

Any suggestions or guideance on this would be great.

Thanks


------------------------------
Matthew Ross
Principal Innovation Developer & Analyst
NHBC
Europe/London
------------------------------
3 REPLIES 3

IanCampbell
Level 3
Hi Matthew,

The above logic should work with one minor change. In the first image above you are asking it to find [String_A] in the emai_text OR [String_B] in the email_Text, as this is basic string matching this works as expected​, however in the third image you are asking it to find a column of a collection in the email_text, which will cause an error as the data types are not compatible in this way.

To fix the above, use a loop stage and set it to loop through your collection of keywords, then move the decision stage containing the logic (image 3) between the open and close of the loop. This will then go through the collection one row at a time, allowing the keyword in each row to be searched for individually.

Hope this helps with your issue.

Kind regards,

------------------------------
Ian Campbell
RPA Specialist
Allen & Overy
------------------------------

Hi, Matthew,

did you think about using Filter collection to get the right rows?

Regards,

------------------------------
Zdeněk Kabátek
Head of Professional Services
NEOOPS
http://www.neoops.com/
Europe/Prague
------------------------------

This sounds like a plan to me!

Will work on it today and report back with my findings.

Think i was looking at it too much and could see the simple loop path.

Thanks
Matthew



------------------------------
Matthew Ross
Principal Innovation Developer & Analyst
NHBC
Europe/London
------------------------------