Introduction

In this article, you will learn how to update organizational units (OUs) in Google Workspace based on departments using automation. In Google Workspace, the Organizational Unit (OU) and Department are 2 related concepts to categorize users. As organizations grow, managing users across multiple OUs manually can become inefficient and error-prone. Ensuring that employees are assigned to the correct OUs based on their departments helps streamline access control, policy enforcement, and administrative management.

Let’s take an example: A company undergoes a departmental restructuring, requiring employees to be reassigned to new organizational units in Google Workspace. Manually moving hundreds of users to their respective OUs would be time-consuming and prone to mistakes. With xFanatical Foresight, IT admins can automate this process, ensuring accurate and efficient updates to organizational units based on department changes, saving time and improving administrative efficiency.

Illustration of automating organizational unit updates based on departments in Google Workspace with xFanatical Foresight.
Illustration of automating organizational unit updates based on departments in Google Workspace with xFanatical Foresight.

Introducing xFanatical Foresight Automation

xFanatical Foresight is a powerful automation platform designed specifically for Google Workspace. It helps administrators efficiently update organizational units based on departments in bulk. This automation saves time, reduces errors, and streamlines user management across the organization.

Automation Setup Instructions

In this section, we guide you through the automation setup in xFanatical Foresight. We have 2 ways to set up automation rules, Set up automation from a template and Set up automation from scratch. After completing the automation rule, verify whether the automation meets your requirements.

Set Up Automation From a Template

Set Up Automation From a Template

Supported plans: xFanatical Foresight Elite plan.

To set up this automation, the admin must first extract a list of users from Google Workspace. Once obtained, the list can be uploaded to the automation rule, enabling efficient updates of organizational units based on department.
The template is designed with two rules to simplify and streamline the organizational unit update based on departments:

  • Rule 1: This rule exports users to a CSV file containing user details, including email address, first name, last name, and department.
  • Rule 2: This rule utilizes the edited CSV file from Rule 1 and updates the organization unit information for each user based on department.


Rule 1: Export users’ department information

  1. Sign into xFanatical Foresight with your Google Admin account. 
  2. Go to the Templates page.
  3. Search Bulk move users to organizational units by department information and click on it.
    In the Templates , Then search for Bulk move user to organizational units by department information template in xFanatical Foresight.
  4. In the Templates > Bulk move users to organizational units by department information page, click Copy Rule 1.
    In the Templates  Bulk move user to organizational units by department information page, click the 'Copy rule' button to duplicate the automation rule in xFanatical Foresight.
  5. For the first time use of the template rule, an dialog Action needed will display requesting necessary permissions required to copy the rule. Click Connect with Google and authorize the permissions.
  6. Upon authorization, a dialog titled Copy of export users’ department information will display.
  7. Click Next. No configurations required.
  8. Click Review.
  9. In the Review screen,
    In the Review page, provide rule name and create Export user's department information rule.
    1. In Rule name, customize the automation rule name.
    2. Click Create.
  10. The rule is created in the Rules page.
     xFanatical Foresight rule graph for exporting user’s department information.
    xFanatical Foresight rule graph for exporting users’ department information in Google Workspace.

Rule 2: Bulk move users to organizational units by department information

  1. In the Templates > Bulk move users to organizational units by department information page, click Copy Rule 2.
    In the Templates 
 Bulk move user to organizational units by department information page, click the 'Copy rule' button to duplicate the automation rule 2 in xFanatical Foresight.
  2. Click Next
  3. Click on If action.
  4. In the Edit actions > If screen,
    Configure If action by adding branch name, conditions and actions.
    1. Rename each branch according to the department name.
    2. In the Add condition field, select Department as the field, choose text contains as the operator, and enter the matching department as the value for each branch.
    3. In the Add next action field, select the Move user to organizational unit action for each branch.
  5. Click on Move user to organizational unit action.
  6. In the Edit actions > Move user to organizationalunit screen,
    Select the desired organizational unit mapped to the department in move user to organizational unit.Select the desired organizational unit mapped to the department in move user to organizational unit.
    1. In the New organizational unit field, select the desired organizational unit mapped to the department.
    2. Click Review.
  7. In the Review screen,
    In the Review page, provide rule name and create Bulk move users to organizational units by department rule.
    1. In Rule name, customize the automation rule name.
    2. Click Create.
  8. The rule is created in the Rules page.
     xFanatical Foresight rule graph illustrating the automated updating of organizational units based on department. xFanatical Foresight rule graph illustrating the automated updating of organizational units based on department.xFanatical Foresight rule graph illustrating the automated updating of organizational units based on department in Google Workspace.
Set Up Automation From Scratch

Set Up Automation From Scratch

Supported plans: xFanatical Foresight Elite and Professional (Legacy).

Rule 1: Export user’s department information

  1. Sign into xFanatical Foresight with your Google Admin account. 
  2. Go to the Rules page, and click new rule button button.
  3. In the Select a trigger screen, select Manual Trigger.
    Xfanatical's "Manual trigger" to trigger rules manually
  4. Click Next
  5. In the Select an action screen, select the List users action.
    Select the list users action within the rule.
  6. In the Edit actions > List users screen,
    Configure list users action as per need.
    1. In the Columns field, select Email, First Name, Last Name, Department and keep all other fields as default.
    2. Click Review.
  7. In the Review screen,
    In the Review page, provide rule name and create Export user's department information rule.
    1. In Rule name, customize the automation rule name.
    2. Click Create.
  8. Now, click the play button button for the Export users’ department information rule to execute it and generate a CSV file containing the detailed user information.
    Execute export user's department information rule to list users.
  9. Once the rule has been executed, download the CSV file from the logs page of the first rule.
    download the CSV file from the logs page of the first rule.

Rule 2: Bulk move users to organizational units by department information

Now set up a second rule to streamline the updating of organizational units based on department information.

  1. Click the New Rule The New Rule button in xFanatical Foresight button.
  2. In the Select a trigger screen, select the Data Uploaded trigger.
    The data uploaded trigger to trigger a rule by uploading a CSV file in xFanatical Foresight
  3. In the Edit trigger > Data Uploaded screen,
    Select the CSV file within the data uploaded trigger.
    1. Select the CSV file you downloaded in Step 9 of Rule 1 to proceed with updating organizational units based on department data. 4 columns of Email, First Name, Last Name and Department are analyzed and set.
    2. Click Next.
  4. In the Select an action screen, select the If action.
    The IF action to execute different actions based on conditions in xFanatical Foresight
  5. In the Edit actions > If screen,
    Configure If action by adding branch name, conditions and move user to organizational unit action.
    1. Rename each branch according to the department name.
    2. In the Add condition field, select Department as the field, choose text contains as the operator, and enter the matching department as the value for each branch.
    3. In the Add next action field, select the Move user to organizational unit action for each branch.
  6. Click on Move user to organizational unit action.
    Select move user to organizational unit action for bulk move user to organizational units by department information rule.
  7. In the Edit actions > Move user to organizational unit screen,
     Configure move user to organizational unit action for bulk move user to organizational units by department information rule.
    1. In the User primary email field, select the Email variable from the Data uploaded trigger.
    2. In the New organizational unit field, select the desired organizational unit mapped to the department.
    3. Click Review.
  8. In the Review screen,
     In the Review page, provide rule name and create Bulk move users to organizational units by department rule.
    1. In Rule name, enter a rule name.
    2. Click Create.
  9. The Automation rule is created.
    xFanatical Foresight rule graph illustrating the automated updating of organizational units based on department. xFanatical Foresight rule graph illustrating the automated updating of organizational units based on department.xFanatical Foresight rule graph illustrating the automated updating of organizational units based on department in Google Workspace.
Verify Automation

Verify Automation

To ensure that your rule setup automates as expected, it’s essential to conduct a simple test. The following instructions demonstrate how xFanatical Foresight automates the bulk update of organizational units in Google Workspace based on department information.

  1. Go to the Rules page.
  2. First, click the play button button of Export users’ department information rule to generate a CSV file containing the latest details of all users.
    Execute export user's department information rule to list users.
  3. Wait until you receive a notification in the top right of xFanatical Foresight. In the notification message, click View log.
     A notification will be triggered and sent upon the execution of the rule, informing users of the action taken.
  4. In the Logs > Log details page, download the CSV file from the Rule history section.
     Download the CSV file from logs details page.
  5. Edit the CSV file downloaded from the Export users’ department information rule according to the information that needs to be updated.
    Edit the CSV file downloaded from logs details page.
  6. Go back to the Rules page.
  7. Click on the upload-button. icon and upload downloaded CSV file to the Bulk move users to organizational units by department information rule.
    Upload the CSV file to bulk move user to organizational units by department information rule.

  8. Wait for the CSV file to be processed and receive a notification in the top right of xFanatical Foresight. In the notification message, click View log.
     A notification will be triggered and sent upon the execution of the rule, informing users of the action taken.
  9. In the Logs > Log details page, the Rule history section explains the automation history and task xFanatical Foresight has automated on behalf of your Google account.
    A detailed log screen, sent upon the execution of the rule, informing users of the action taken.
  10. Sign into your Google Admin Console. and verify that the user’s organizational unit has been successfully updated by the automation rule.
    In the Google Admin Console, user's organizational unit is updated successfully according to department.

Notes

  • Once the automation rule is established, xFanatical Foresight will begin exporting the user list and updating their organizational units based on department information.
  • When updating organizational units based on departments, if all users with a matching department value are being updated but the intention is to target only one specific department, it’s best to use the text is exactly operator with case-sensitive matching.
  • Each If action supports up to 10 conditional branches. To handle more than 10 departments, admins can chain multiple If actions by placing an additional If condition in the Fallback branch of the previous one.
  • At each time a rule is executed, you will receive a notification in the app telling you how it has happened to your rules and whether rules were automated successfully or not.
  • The rule execution and CSV processing may take a few minutes to complete as the system processes the file and updates information efficiently.

Conclusion

Updating organizational units based on department information helps maintain a well-structured Google Workspace environment, ensuring users are assigned the correct policies and access controls. Automating this process with xFanatical Foresight reduces administrative workload, minimizes errors, and keeps organizational structures up to date. By setting up a rule to streamline updates, IT administrators can enhance efficiency and ensure seamless management of user assignments.

Try a 14-day free trial with xFanatical Foresight and manage your tasks.


Related Articles

For more article please visit our website: Articles