title | description | labels | material_icon | create_time | update_time |
---|---|---|---|---|---|
Offer a one stop shop onboarding experience |
Set new hires up for success with the resources they need. |
Sheets, Forms, Groups for Business, Apps Script |
settings_input_component |
2019-08-30 |
2019-09-17 |
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.
- 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.
-
Make a copy of this Google Spreadsheet from your Google Workspace account.
-
From your spreadsheet, click on Extensions > Apps Script.
-
Ensure the Admin Directory API is enabled via Resources > Advanced Google Services.
-
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).
-
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...
-
After granting permissions, return to your spreadsheet and locate Form > Go to live form.
-
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.
-
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
andALREADY_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.
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.