I’m trying to iterate through emails in Outlook, and send a message if the body of any of those emails contains a specific RegEx pattern. I have already verified that the RegEx is working and accurate. I’ve also verified that it is iterating through the correct emails.
However - when I run my automation it is not working as expected. I removed the two emails that match each RegEx pattern, and it is still returning my “Then” statement. When it should be returning my “Else” statement. Do I need to adjust my workflow at all since I’m using two “Is Match” activities?
Write the email body content that has the match into text file. Now in an online regex tester put the text and the pattern to check the existence of the Match. If its not working, then you need to update the regex. It might be matter of space or any special characters.
@Luecke_Anthony Refering to your screenshot and with the interpretation the bot should only mail 1 email for all tests the ensure you will stop the iteration e.g. with a break. Otherwise for each email check a mail will be sent
About catching the issue do set a breakpoint and do inspection / analysis within the watch panel with live values. Also you can edit variable values and test the if / else routes