Removing people from groups based on a wild card

Hi there,
New to workflows at the moment and would like a couple of suggestions. I have adopted the workflows template that adds and removes people to various groups in Okta when their department changes and then we push those to AD. This works out well as during the course of a production an artist can transition to different crafts (departments) and this scoops up the myriad of group memberships they have. I have come up with a challenge when it comes to an artist changing a production.
For example we had a cross over with artists working on Peter Rabbit 2 and then they moved over to Super Pets. The artist would be in a production specific mailing list,job_peter2, as well as some craft specific ones i.e. for lighting they would be in job_peter2_lighting. If they moved to Super Pets they would then be removed from the Peter 2 mailing lists and added to the job_paws mailing list and for lighting it would be job_paws_lighting. What I would like to do is when there is a change detected in the ‘production’ field a workflow is triggered that would remove the user from any job_ mailing lists and then add them to the new job_production and job_production_department mailing lists. This sort of thing is a VERY regular occurrence and workflows seems ideal for this situation as currently it is pretty manual in Active Directory and things get missed. I know I can concatenate various values in the cards in workflows to build up the job_production and the job_production_department mailing lists but I am just not sure how to sweep through and pull people out of various job_ mailing lists.

I know that may be a clumsy explanation but just trying to be clear about what I am attempting to achieve. If there is a way for this to be done outside of workflows, happy to hear it also.



Where are these mailing lists located? Is that part of the user profile or is it stored externally?

For a one-time op, you should be able to search for users with matching lists in their profile an then iterate over the resulting list of users (in that loop, you can also verify that the users the search returned should be updated). If you need this to occur for every update, you could instead configure the workflow to be triggered when a user’s profile is updated (User Okta Profile Updated event for the Okta connector)

Additionally, I’d recommend checking out our Workflows Office Hours and see if you can to get some help/advice about your use case, as they are more specifically focused on this product than I am: Calendly - Okta Workflows.

There’s also a lot of good information about Workflows here: Okta Workflows | Okta

Mailing lists are stored in Active Directory and we add users to them when they are added to projects (using this specific example). Then when they move to a new project or we finish a movie we shift people around, all manual and subject to error.

With us passing the user production and their department to Okta from the HR system I want this whole addition and removal done when a change is detected.

I’ll check the example you mentioned.