Templates / HR / Create Google Account

Create Google Account

Overview

This workflow automatically creates a G-Suite account for new hires which includes giving the individual a new email address and temporary password. It saves time and prevents user errors. As a callable workflow it can be used by any pre-existing hiring workflow.

The callable trigger is kicked off when a parent workflow sends through an individual's name. The parent workflow might be typical of any multi-job “onboarding” workflow. In that the parent workflow might request several callable workflows to complete a number of small onboarding jobs. Such as “Create Google Account” (like this one) and/ or “Provision Salesforce Account”, etc.

Once this workflow is kicked off it first checks to see if the user’s e.g. firstname@domain.com email address is available. If it is then an email account is created using the new hire's name along with a password. Slack is then notified of the successful run.

If the name is taken, the workflow will check the availability of e.g. firstname.lastname@domain.com to avoid creating a duplicate accounts.

If that email is also taken then the workflow will check incrementally for availability of:

  • firstname.lastname1@domain.com

  • firstname.lastname2@domain.com

  • firstname.lastname3@domain.com

  • etc.

It will loop this process until an available email address is found.

This way guarantees that each G-Suite account and email is unique to each individual, regardless of any similarity of name to others within the company.

slacak-end-result

Connectors Used

The following connectors are used in this template.

This is mostly provided for reference only - there is no need to read through the linked connector pages. All you need to know for this template is explained here.

Though you will probably need to look up service authentication instructions if you don't already have them

End Result

The image below shows the standard message output to your chosen Slack notification channel, once the G-Suite account has been created.

As you can see this output is based on the fact that there are multiple people with the same name at the company. It includes the new hire's preferred name plus a numerical indicator.

end-result

Prerequisites

This workflow assumes the following:

  • You can authenticate with G-Suite

  • You can authenticate with Slack

  • You have a parent workflow, that will send this Callable workflow an individuals information.

Workflow Logic

The following screenshots illustrate the logic of the various workflow steps.

workflow-logic

Getting Live

In order to configure this workflow for use simply follow the accordion steps below.

Implementation notes

Domain name

Make sure you have G-Suite Admin privileges and a valid domain name you can build multiple accounts from before starting.

For test purposes we recommend using a staging environment and a simple two step parent workflow as described above before implementing in production.

Step-by-step breakdown

For educational purposes, the rest of this page will take you through how the workflow template is built to achieve the desired results. This will help deepen your understanding of Tray.io and will give you the power to maintain and edit your workflow as necessary.

Section 1: Get payload and generate password

Section 2: Check if Preferred name is available

Section 3: Check if Preferred name + Last is available

Section 4: Loop and Increment

Section 5: Check if Preferred name + Last + Integer is available

Section 6: Break Loop, Get email & Send