Recursive workflow - Help needed!

I am trying to build a workflow that bulk matches users with other users (for internal company tool)

Example:

  1. I have 10 users

  2. I want to match each user with another user, but not have them matched with previous users they have already matched with.

  3. Display the matches in a separate table (user 1, user 2, match date)

Right now, I have a “matches” field on table “Users” that is of type User.

I have a “Matches” table with type “Participant 1” and “Participant 2” that are of type User.

For the workflow, I believe in theory I need to start with User 1 as index 1, and then find the next user that is not contained in User 1 “Matches” cell.

Then, assign the Match User to User 1 “Matches” cell and also assign User 1 to Match User 1’s "Matches Cell. Then someone remove the Match User 1 from the pool of possible matches for the next loop?

Then move on the to next user?

I am struggling to organize this and figure out the recursive workflows.

Is there an easier way?

Any advice and help is much appreciated!

Hi @hcassin
Recursive workflows are tricky at first but when you get the logic right its pretty straight forwards.
We can join a call and I can help show you how they work and solve this problem if you like.
Feel free to DM me.
Simon