This article is written for Google Workspace (formerly G Suite) administrators.

It's not uncommon your organization often associates default groups to an organizational unit (OU) and employees in those OUs are required to join the groups by default. When a user is moved into the OU, you wish to add the user to the default groups associated with the OU. It's cumbersome doing so over and over again with numerous mouse clicks and keyboard typing in Admin Console.

Foresight can automate the tasks and skyrocket your productivity.

Video demo

Given that we are moving 3 users from different OUs to the OU /Marketing/Digital Marketing, see as below. They are supposed to be added into 4 new groups, Online Advertising Age, B2B Content Marketing, Social Media Hub and Video Production Workshop.

NameFrom OUTo OUGroups to be added into
Bethany Jones/Marketing/Offline Marketing/Marketing/Digital Marketing- Online Advertising Age
- B2B Content Marketing
- Social Media Hub
- Video Production Workshop
Jacob Taylor/Sales/North America Sales
Timothy Wright/Customer Support/Customer Service

After they are moved to the /Marketing/Digital Marketing OU in your Admin Console, Foresight automates adding them to the given groups.


  1. Sign into Foresight.
  2. Go to Rules.
  3. Click the new rule button button to create an automation rule.
  4. In the Select a trigger page, select User's organizational unit changed trigger.
  5. In the Edit trigger > User's organizational unit changed step,
    configure User's organizational unit changed trigger
    1. Sign in with Google
    2. In the New organizational unit field, select the new OU you move the users to.
    3. Leave the Present organizational unit and Primary email fields empty unless you want further restriction on how this rule triggers.
  6. Click Next.
  7. In the Select an action page, select the Add group member action.
  8. In the Edit actions > Add group member page,
    Configure Add group member action in Foresight
    1. Sign in with Google
    2. In the User field, type {{ and the select the User Primary Email variable. This variable will become the real primary email address of the user who is moved to the new OU.
    3. In the Group email field, select one of your groups you want to the user to be added into.
  9. Click the + button at the tab to add a parallel action.
  10. Repeat steps 7-9 for all other groups associated with the destination OU.
  11. When you finished adding all actions, click Review.
  12. Name the rule.
  13. Click Create.
  14. Your automation is rule is created like this
    Move user to a new OU = data-lazy-srcset= Add to OU specific groups">

That's all for setting up the automation in Foresight. Now in your Admin Console, move a couple of test users into the OU as you configured in the Step 5 above. You'll be notified for the results momentarily in Foresight.


  • This rule covers only one destination OU. For more OUs, duplicate the rule and change the settings in the trigger and actions for each OU.
  • You also have an option to remove the user from all existing groups before you add the user to the new groups. The rule structure will look more sequential like the following. In plain language, when a user is moved to a new OU, remove the users from all groups s/he is in, and add the user to new groups one by one.
    Add user to groups automation

If you have questions or new automation use cases, please leave comments in the Foresight community.