This guide explains how to automatically add users to groups based on their selection of a custom user field during signup or profile update.
Required user level: Administrator
Summary
- Create the necessary groups
- Set up a custom user field
- Create an automation to add users to groups
- Test the setup
Creating the groups
First, create the groups you want users to be automatically added to:
- Go to your site’s Admin area
- Navigate to Groups in the admin sidebar, or visit
/admin/groups - Click “New Group” for each group you want to create
- Make sure to add a “Full Name” for each group, as the automation script uses this
The automation script matches the user’s custom field value against a group’s Full Name. Make sure each group’s Full Name exactly matches the corresponding custom field option (e.g., if the dropdown option is “cat”, the group’s Full Name must be “cat”).
Setting up the custom user field
Next, create a custom user field that users will select from:
- Go to your site’s Admin area
- Navigate to User Fields in the Community section of the admin sidebar, or visit
/admin/config/user-fields - Click “Add user field”
- Set up the field with appropriate options
Here’s an example of how your custom user field might look:
Use a dropdown field type with predefined options that exactly match your group Full Names. Free text fields can cause mismatches. If using a confirmation field type, the value will be “true” or “false”, so your group’s Full Name must be set accordingly.
Creating the automation
Now, set up the automation to add users to groups based on their custom user field selection:
- Go to your site’s Admin area
- Navigate to Plugins > Automation in the admin sidebar, or visit
/admin/plugins/automation - Click “Add automation”
- Select “Add user to group through User Custom Field” as the script
- Choose a trigger:
- “User first logged in” to add users to groups at signup
- “Recurring” to run on a schedule, allowing users to change groups over time
- Choose your custom user field from the dropdown menu
- Configure the automation settings and make sure to enable it
Here’s an example of how your automation setup might look:
The automation includes a dropdown to select your existing custom user fields, making setup easier and less prone to errors.
Testing the setup
To ensure everything is working correctly:
- Sign up as a new user or update an existing user’s profile
- Select an option from the custom user field you created
- Complete the signup or profile update process
Here’s an example of how the custom user field might appear during signup:
After the automation runs, you should see the user added to the appropriate group:
FAQs
Q: Can this automation add users to primary groups?
A: By default, this automation adds users to secondary groups. To set a group as primary, go to the group’s Manage > Membership settings page and select “Automatically set as primary group”.
Q: How often does the automation run if I choose the “Recurring” trigger?
A: You can set the frequency when creating the automation. Choose a schedule that best fits your community’s needs.
Q: What happens if a user changes their custom user field selection?
A: If you’ve set up a recurring automation, it will add the user to the new group based on their updated selection during the next run. However, the automation does not remove users from their previous group — it only adds. You will need to manage group removal manually if needed.
Q: How does the automation know which group to add a user to?
A: The automation matches the user’s custom field value against each group’s Full Name. There is no explicit group selection in the automation setup — the matching is automatic based on the Full Name.
Additional resources
Last edited by @MarkDoerr 2026-02-03T23:57:30Z
Last checked by @hugh 2024-07-16T02:47:13Z
Check document
Perform check on document:

















