Flow Studio
Role Members Node
Getting all active users in a named role — the RoleMembersNode config and using the result to populate dynamic approver lists or notification targets.
Node Configuration
{
"nodeType": "RoleMembers",
"name": "getFinanceApprovers",
"config": {
"roleName": "finance-approver",
"activeOnly": true,
"department": "$output.fetchEmployee.department",
"maxResults": 50
}
}
Configuration Fields
| Field | Type | Description |
|---|---|---|
roleName | string / expr | The Passport role name to query. Must be an exact match (case-insensitive). |
activeOnly | bool | When true (default), only returns active (non-suspended) users. |
department | string / expr | Optional filter — only return members from this department. |
maxResults | int | Maximum members to return. Default: 100. Cap: 500. |
Node Output
{
"roleName": "finance-approver",
"members": [
{ "userId": "usr-a1b2", "email": "alice@acme.com", "displayName": "Alice K.", "department": "Finance" },
{ "userId": "usr-c3d4", "email": "bob@acme.com", "displayName": "Bob M.", "department": "Finance" }
],
"memberCount": 2
}
Common Use Cases
Dynamic Approval Assignment
// RoleMembers → ApprovalNode
// ApprovalNode config:
{
"actorIds": "$output.getFinanceApprovers.members.map(m => m.userId)",
"assignmentMode": "any-one"
}
Bulk Notification
// RoleMembers → ForEach → SendEmail
// ForEach items:
"$output.getFinanceApprovers.members"
// SendEmail to (inside ForEach):
"$json.email"
Role Membership Count Guard
// Condition node expression — stop workflow if no approvers:
"$output.getFinanceApprovers.memberCount === 0"
// → route to error / notify admin path
Large roles: Roles with hundreds of members should use
maxResults and department filters to narrow the result. Returning 500 users into a ForEach that sends individual emails creates 500 parallel node executions — ensure the workflow is designed to handle the scale.