I'm using Power Automate with Regular Expression Match.
My trigger is when an email arrives in a specific outlook folder. So, that returns only one email on each trigger. I am RegEx matching against the subject (and later the body).
I ask because whenever I select dynamic content from the match (in later steps) power automate forces an "Apply to Each" step.
Is the Regular Expression Match returning a set and not just a single record?
Can I stop that? It's not a huge problem. Just an annoyance because I have to work with "Apply to each" when I only have one "each". It clutters up my flow.
Regular Expression Match action returns an array of Matches (Match0 Match1, etc). For example, if you select dynamic content Matches - Flow automatically select Apply to Each action, since it's an array.
Thanks @Petr,
When you say "...if you select dynamic content Matches..." is this a selection that I make within Plumsail's Regular Expression Match step? If so, I'd like to turn that off so I don't get an array. I only need one result since I'm only passing one record.
Or is returning an array the unchangeable default of the step? If so, are there RegEx steps that only return 1 result?
If you need only 1 value (not the array) you can select dynamic content Match0, Match1, etc. In that case, the Apply to each action will not be created.
Hmm. That seems like it might help. However when I change Matches to Match0 in my Apply to Each it forces another encapsulating Apply to Each with a Matches.