web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Creating efficient Flo...
Power Automate
Unanswered

Creating efficient Flows resistant to organization structure changes

(0) ShareShare
ReportReport
Posted on by 51

Greetings,

 

I've been using the Power platform for a while, and while I can say it is a pretty useful tool which I got pretty used to, I still have one big issue I can't seem to get right.

It's best explained with an example:

 

With my latest Flow that handles the onboarding process in my company, I want to try to create it so that it is completely resistant to changes that can/will happen to my company's organizational structure. I have a good prerequisite for that already set up, and that is Dynamic Membership security groups.

I've got a Dynamic HR security group (and others for other departments) which is automatically updated with new HR members when we hire them and set their profile details (Department field -contains "HR"). 

 

For example, we currently have 4 people working in our HR department. One step in the onboarding process is that all 4 of the HR people are mentioned in a Teams channel message. For that to work, I need to get the mention token for every member of the group and use the tokens in the message for them to be mentioned & notified. 

 

The idea: use the Get Group Members action to get all the members of the HR Dynamic group and for each of the member's IDs, get the mention token for them and append it to an array variable. That way, no matter how many people we employ in HR, I'll always have all their tokens stored neatly in an array variable. 

 

The problem: after storing the mention tokens in an array, I don't know how to actually dynamically reference the tokens from the array in the Teams channel message when I use the 'Post a message as the Flow bot to a channel' action.

I can't put the whole array in the actual 'Message' field of the action, I can't reference the tokens one by one manually because I don't know how many HR people will there be in advance .

One option is to create a separate message for every token in the array but that is not very elegant.

Is there a way to solve this concrete issue the way I want it?

 

My higher level question is this: is there a way/methodology to design Flows so they completely user-agnostic? Meaning no one specific user is ever mentioned in the Flow, but they are retrieved from the directory using their 'containers', i.e. their Dynamic security groups (which are automatically updated)? 

 

I'd love if this would be a thing, since it's much of a hassle to change all the numerous Flows I have deployed every time something in the organization structure changes. 

 

Did anyone bump into the same issue? Does anyone have any smart solutions for this problematic? I'd love to hear opinions and ideas! Thanks in advance.

Categories:

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 302 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 263

#3
Henil Profile Picture

Henil 115

Last 30 days Overall leaderboard