Offer a one stop shop onboarding experience

Set new hires up for success with the resources they need

Last updated: September, 2019

Contributed by Tech and Eco, follow me on Twitter!

It’s hard to give incoming peers a consistently good experience when joining the team because of how error prone giving access to different resources can sometimes be. By using a Google Group, and sharing resources with that group's address, it makes it easy to help new hires get access to what they need to be productive in one step.

If you have permissions to add users to a group, you can use this script to distribute the responsibility to other members of your team to fill out the form as you, and have the new person's email added to the group, and be granted access to the resources the group is permitted.

For larger teams, you can optionally enable notficiations in the spreadsheet to receive an email everytime a new form submission occurs.

Topics are selected in a form, and upon submit an email is sent

Technology highlights

  • The onFormSubmit installable trigger is used to run the script upon a user submitting an entry in a Google Form. To learn more visit this page
  • Add members to a Google Group for Business using the Admin Directory API
  • Use a Google Document as an email template.

Try it

  1. Make a copy of this Google Spreadsheet from your G Suite account.

  2. From your spreadsheet, click on Tools > Script Editor.

  3. Ensure the Admin Directory API is enabled via Resources > Advanced Google Services.

  4. Now run the script by clicking the "Select function" drop down > choose "installTrigger." Then click the Run button (►). This will create a trigger for your sheet automatically.

    Caution: If you run this script more than once, it will generate multiple triggers which would duplicate emails. You can visit the triggers page by clicking on the trigger icon (which looks like a clock).

  5. When prompted, click the Review permissions and click Allow so the script can email on your behalf.

    Note: If you get a warning that This app isn't verified continue with the verification process by clicking Advanced and then scroll down and click the grey text at the bottom that begins with Go to...

  6. After granting permissions, return to your spreadsheet and locate Form > Go to live form.

  7. Fill out the form and enter your own email and a Google Group you have rights to manage its membership in order to receive an email. The membership status will be populated by the words Newly added if the user was added to the group, or Already added if it recognizes the user is already a member.

    Note: if you do not see the form responses in your sheet, you need to unlink and relink your form to it. From your sheet click Form > Unlink Form. Then visit your form in edit mode and in the responses section click select response destination > Select existing spreadsheet, and choose your spreadsheet as the source. This creates a new sheet called Form Responses 2. You can delete the tab Form Responses 1 so you only have one active sheet.

[optional] Customize your script

  • Add custom fields to the form. For example, you may want to record who on the team helps new members the most by adding a Requestor name field, which will create an additional column in your sheet.

  • Enable notifications in the Google Form in the Responses section > 3 dots > Get email notifications for new responses if you wish to get notified everytime someone submits a new request.

  • If you wish to change the subject lines of your emails, replace the text in the variables ADDED_TO_GROUP_SUBJECT and ALREADY_IN_GROUP_SUBJECT at the top of the script.

  • You can modify the font, color, and pictures of your email templates by making a copy of both Added to a group and Already in a group

    Note: set the documents permissions to Anyone in your organization with the link can view it.

Next steps

To get started with Google Apps Script, try out the codelab which guides you through the creation of your first script.

You can also view the full source code of this solution on GitHub to learn more about how it was built.

Feedback

Were you able to get the solution up and running?

If you have an idea for another solution you'd like to see featured in our gallery submit a request on the GitHub issue tracker.