Introduction

This blog explains how to automatically add Gmail labels to new Google Workspace users using xFanatical Foresight. Gmail labels help users organize emails based on departments, teams, projects, or other organizational requirements. For example, organizations may want every new employee to have labels such as HR, IT, Marketing, Accounting, or Technical Support in their Gmail mailbox.

Creating the same labels manually for every new user can be time-consuming, especially for organizations that onboard employees frequently. It can also result in inconsistent mailbox setup when administrators forget to create one or more required labels.

With xFanatical Foresight, administrators can automatically create predefined Gmail labels whenever a new Google Workspace user is created. This helps standardize Gmail setup, reduce repetitive administrative work, and ensure new employees have the required labels from the beginning.

Introducing xFanatical Foresight Automation

xFanatical Foresight  is a powerful automation platform designed for Google Workspace. It helps administrators automate repetitive administrative tasks and streamline user onboarding workflows.

Using xFanatical Foresight, administrators can automatically create Gmail labels in a new user's mailbox when the user account is created. The automation uses the new user's primary email address as the actor, ensuring that the labels are created in the new user's Gmail mailbox rather than the administrator's mailbox.

Administrators can configure multiple Create Gmail label actions in the same rule. For example, the automation can create Technical Support and IT Security labels automatically and can be customized to create additional labels based on organizational requirements.

Automation Setup Instructions

In this section, we guide you through the automation setup in xFanatical Foresight.  Set up automation from a template and after completing the automation rule, verify whether the automation meets your requirements.

Set Up Automation From a Template

Supported plans: xFanatical Foresight Elite plan.

Prerequisites

Before setting up the automation, make sure the following requirements are met:

  • You have a Google Workspace Admin account with the required permissions.
  • A service account with ready state in xFanatical Foresight.  Checkout create service account in xFanatical Foresight for more details. 
  1. Sign into xFanatical Foresight with your Google Admin account.
  2. Go to the Templates page.
  3. Search for the Auto add Gmail labels to new users template and click on it.Auto add Gmail labels to new users
  4. In the Templates > Auto add Gmail labels to new users page, click Copy rule.
    Templates > Auto add Gmail labels to new users
  5. For the first-time use of the template rule, an Action needed dialog will display requesting the necessary permissions required to copy the rule. Click Connect with Google and authorize the permissions.
  6. (Conditional) If the service account is not configured or is not in the Ready state, a dialog will appear displaying the error message and possible solutions.
    • Resolve service account related errors and restart from step 4.
  7. Upon authorization, a dialog titled Copy of Auto add Gmail labels to new users will display.
  8. Click Next.
  9. In the Create Gmail label action,
     Label name field, enter the Gmail label you want to create. 
    • In the Label name field, enter the Gmail label you want to create. 
    • Review the fields like Label list visibility, Message list visibility, Label text colour, Label background colour and change according to your requirement.
  10. Click Create Gmail label (1) from the rule graph or chip below the Actor field.
  11. In the Create Gmail label(1) action,Review the fields like Label list visibility, Message list visibility, Label text colour, Label background colour
    • In the Label name field, enter the Gmail label you want to create. 
    • Review the fields like Label list visibility, Message list visibility, Label text colour, Label background colour and change according to your requirement.
  12. (Optional) To create additional Gmail labels click Add next action and select Create Gmail label action.
    • In the Actor field, select User created > Primary Email variable from dropdown.
    • In the Label name, enter the new Gmail label you want to create.
  13. Click Review.
  14. In the Review screen, customize the Rule name.
    In the Review screen, customize the Rule name
  15. Click Create.
  16. The rule is created in the Rules page.
    rule graph illustrating Auto Add Gmail Labels to New Users
    xFanatical Foresight rule graph illustrating Auto Add Gmail Labels to New Users
Verify Automation

To ensure your rule setup automates as expected, it is important to perform a simple test. The following instructions demonstrate how xFanatical Foresight automatically creates Gmail labels for a newly created Google Workspace user.

Verify Auto add Gmail labels to new users

  1. Sign into your Google Admin Console.
  2. Add a new user to your Google Workspace. For more information, see Google’s documentation to add a new user in Google Admin.
    Add a new user to your Google Workspace
  3. Go to xFanatical Foresight and check the Notification.
  4. When you receive the automation notification, click View log.receive the automation notification, click View log.
  5. In the Logs > Log details page, review the Rule history to confirm that the automation executed successfully.
    In the Logs > Log details page, review the Rule history to confirm that the automation
  6. Sign in to the new user’s Gmail account.
  7. Verify that the configured Gmail labels, such as Technical Support and IT Security, have been created in the user’s mailbox.
    Verify that the configured Gmail labels, such as Technical Support and IT Security, have been created in the user's mailbox.
  8. If additional labels were configured, verify that those labels are also available in the user’s Gmail account.

Notes

  • This template requires a service account and domain-wide delegation to function.
  • This automation creates Gmail labels only for newly created Google Workspace users. It does not add labels to existing users. 
  • The User created > Primary email variable is used to create the labels in the new user's Gmail mailbox.
  • You can add or remove Create Gmail label actions according to your requirements.
  • The template creates Gmail labels but does not control how users apply or use those labels.
  • When a user is first created in Google Workspace, it may take up to 24 hours for the user account to be fully initialized.
  • The Create Gmail label action may fail if the user's Gmail account is not ready when the automation runs.
  • Keep Create Gmail label > Actor field unchanged to avoid mistakes in creating Gmail label.
  •  If any error shown in Create Gmail Label > Actor field, refer xFanatical Foresight Service Account Troubleshoot guide.

Conclusion

Automatically creating Gmail labels helps organizations standardize Gmail setup for new Google Workspace users and reduce repetitive administrative work.

With xFanatical Foresight, administrators can automatically create the required labels whenever a new user is created, ensuring every new employee starts with a consistent Gmail setup.

Try a  14-day free trial with xFanatical Foresight and automate your Google Workspace tasks.

Related Articles

For more articles please visit our website: Articles