Edit a user's groups

hi
I would like some help, as I couldn’t find a possible solution

I would like to change the groups a user belongs to via workflow, but I couldn’t find a dynamic way to do this
I read in the documentation that it is possible to change using the User: Update Node block, I managed to change a group, but I needed to change the user and include him in several groups simultaneously.

for example
I need to change the user and place him in two groups dynamically, how do I tell which groups he will be part of?
image

is it possible to do that?
Thanks in advance for your help

Hey @Jonatas_Liasch,

Our documentation definitely isn’t very clear on how to do this. You have to select “JSON Template” to dynamically update fields on a user. You can then set the experienceGroupIds property to an array of experience group IDs.

If you have an array of group IDs already on the payload, you can use the jsonEncode helper to dynamically build the JSON template:

The experienceGroupIds property comes from the Experience User Patch schema. The JSON template you provide can include any properties found in that schema.

Thank you very much @Brandon_Cannaday
you helped me a lot :smiley: :smiley: :smiley: