Skip to content

A google app script that links a google form and google spreadsheet to function as an out of office request and approval system

Notifications You must be signed in to change notification settings

nguyen18/Out-Of-Office

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 

Repository files navigation

Out-Of-Office

A google app script that makes a google form and google spreadsheet function as an out of office request and approval system

How to Install:

1. Create google form for requests

Create a google form with questions you would like to know when someone submits a leave request. The following questions used to work with this script are as followed and in this order:

Screen Shot 2021-09-25 at 4 09 32 PM

Screen Shot 2021-09-25 at 4 09 39 PM

When asking for their leave dates, make sure to use the date question feature in forms. If not, you have to convert it to a date time format in the script itself.

2. Link and format a spreadsheet where you want to store pending and archived requests

You can use the automatic generated one with the forms or link a google spreadsheet you personally created. After linking the spreadsheet sheet to the form, create a new tab/sheet on the bottom called "Archive" where you will store processed requests. Optional: Rename the linked tab with the purple icon as "Pending". Add a column after your question columns called "Approved" where the approver will process requests

Screen Shot 2021-09-25 at 4 13 37 PM

3. Install the script

a) Click the app script editor and a new script file should be automatically generated for you

Screen Shot 2021-09-25 at 4 17 02 PMScreen Shot 2021-09-25 at 4 18 51 PM

b) Rename the file to "out-of-office-script" and delete the generated contents. Paste in all the contents from out-of-office-script.gs

c) Adjust the customizable information to your liking (email bodies, variable and data changes, calendar IDs, etc.) - some areas are labeled for you and are required for you to change them in order for it to work.

d) Save!

4. Install triggers to make Notify function work

Install a form trigger to run the notify function when someone submits a request. Click on the triggers category on the left and then click add trigger on the bottom right. Create a trigger to run the notify function on a new form submit.

Screen Shot 2021-09-25 at 5 09 58 PM

Congrats you have successfully installed Out-Of-Office! 🎉

How it works:

After submitting a leave request, both the manager (approver) and submitter will be notified of the submission. The request will populate the linked sheet and the approver can open the sheet at anytime to manage requests.

Screen Shot 2021-09-25 at 5 19 16 PM

The approved column handles "yes" and "no". Blank cells or other text will be ignored. After approving and denying requests, the manager can press the schedule events tab and press the set time off button. Approved and denied rows will be processed and moved to the Archive sheet, all other rows will be ignored to be processed another time.

Screen Shot 2021-09-25 at 5 29 13 PM

If approved, a new event will be created and the submitter will receive an approval email and calendar invite to their out of office. If denied, the submitter will receive a denied email. All emails will be sent from the user who ran the set time off button.

About

A google app script that links a google form and google spreadsheet to function as an out of office request and approval system

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published