pavani_paluri
Kilo Sage

Hi @saint ,

 

Since you have users from both groups, you just need to find the common ones between the two lists.
Add a Script step in your subflow and use logic like this:

var commonUsers = [];

for (var i = 0; i < inputs.group1_users.length; i++) {
if (inputs.group2_users.indexOf(inputs.group1_users[i]) > -1) {
commonUsers.push(inputs.group1_users[i]);
}
}

outputs.common_users = commonUsers;
Takes users from Group 1, Checks if they also exist in Group 2
If yes → adds them to output, So you’ll get only common members

 

Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Pavani P