Skip to content

Google App Script to set vacation response in Gmail setting using Calendar's specific event

License

Notifications You must be signed in to change notification settings

Werror/GmailAutoVacationResponse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

GmailAutoVacationResponse

This is a Google App Script to set vacation response in Gmail setting using Calendar's specific event The setup will trigger this script to run once each day (preferred between 0:00 - 1:00 am) and go through your all day event and find "Vacation" (this is customizable) and set startDate, endDate, subject, body in the Gmail Vacation Setting.

Prerequisite

The following Advanced Google Services need to be enabled before running this script. Please refer to https://developers.google.com/apps-script/guides/services/advanced

  • Calendar
  • Gmail

Usage

  1. Login to Google drive and create a new App Scriot
  2. Copy the Code.gs and paste into the new App Script
  3. On the calendar, book a chunk of all day event, (E.g. "PTO" or any thing you like, but make sure you change here). You can also change the subject and body if the response message.
  4. To test this standalone script, follow https://developers.google.com/apps-script/guides/standalone and choose run or debug.
  5. To schedule time trigger go to Resources -> Current project's trigger -> Add a new trigger -> Select to run main fucntion -> Time driven -> Set to run once a day from 0:00 am - 1:00 am (or your choice). To install trigger manually follow this link
  6. To verify the result, go to Gmail->Setting, then scroll all the way to the end and verify Vacation responder is turned on with all the other field populated. Image Gmail Vacation Setting

About

Google App Script to set vacation response in Gmail setting using Calendar's specific event

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published