My question is as above but this isn't the first situation like this. Really I want to check that this approach is the 'recommended' way and im not missing a chance to make my flows more simple.
So I have a 365 group and within a flow I want to add someone to it. But I only want to add them if they're not already a member. Similarly, I may want to remove them - but only if they're a member.
So the programmer in me wants to create the equivalent of 'if x is not a member of group y then add as member else do nothing'. But as far as I can tell the way to do it is to get group members, then work out if the person is in that array of members, then do whatever I want to do. I know it's not much different, but it still feels clunky.
Is there a better way of accomplishing this? Or is it just not the way Power Automate works?