Artisan IMG > G Suite (g-suite) (9a084bc6-e165-4c41-9134-46e7f93457a8)
Artisan IMG > Slack (slack) (6632c308-2cd1-4f68-8128-e521e552a66b)

Create Google Account

Workflow
HR
Intermediate

This is a 'Workflow' template which means that it is a single standalone workflow.

Some workflow templates can be modified to work with other workflow templates - e.g. to convert a data sync between two services from uni-directional to bi-directional

Overview
Copy

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.

Connectors Used
Copy

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
Copy

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.

Prerequisites
Copy

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
Copy

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

Getting Live
Copy

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

Implementation notes
Copy

Domain name
Copy

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
Copy

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 and will give you the power to maintain and edit your workflow as necessary.

Section 1: Get payload and generate password
Copy

Section 2: Check if Preferred name is available
Copy

Section 3: Check if Preferred name + Last is available
Copy

Section 4: Loop and Increment
Copy

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

Section 6: Break Loop, Get email & Send
Copy