Using "Matches" Activity for multiple emails

I am having issues using the Matches Activity and working with a list of emails.

I am saving emails from a specific folder to a List of Emails. I am then running a “For each” on the email list and getting the body of said email saved to a string variable. Then I run said variable against a Matches activity and get the URL.

The issue I am having is that the email list is picking up both of the emails submitted, the match seems to only pick up one of their URL’s. I checked and both url’s are exactly the same except for 3 numbers at the end.

My sequence is like so:

Get emails from folder
For each email in email-list
-Assign email body to string variable

  • run email body variable against match and save the matched result to an array.

For each match in matched array

  • assign the current match index to URL variable
  • open browser with URL.

The email that is getting skipped is also the newest in the folder, I have it checked so that the “Get Outlook Messages” activity doesn’t care about read or unread messages.

Is there some sort of limit on how many matches the “Matches” activity can hold?

The expression I am using for my Regex is : (http|https):[^\s]*

It sounds like you might be overwriting your collection of matches somewhere in the loop. I would advise to run in debug mode and use the “step into” feature to go step by step. While stepping through, watch you url collection and see where it may have gotten overridden.

If you don’t find issues after a step-by-step debugging, then post your workflow here and one of will take a look!

So I just tested it this morning and the first URL is being overwritten. I guess what I can do is before the next email save the matched URL into an array and then use a for each item in the URL Array.

Thanks for the tip there.