Skip to content

Latest commit

 

History

History

birthday-reminders

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Birthday Reminders

Receive an email notification for each birthday in your 'Birthdays' calendar. This script requires you to use Gmail and Google Calendar. If you are also using Google Contacts, you can create a birthdays' calendar automatically from your contacts.

I run this daily using a standalone script with time-driven trigger.

The script has two optional script properties:

  • calendar: the name of the Google Calendar to monitor (default is 'Birthdays').
  • offset: the numbers of days before an event that you want to receive the email (default is 0).
  • subjectTemplate: template used to generate the email subject, see syntax below (default is ${event.getTitle()}).
  • bodyTemplate: template used to generate the email body, see syntax below (default is ${event.getDescription()}).

The syntax for the template properties is a string where the following substitutions will be conducted:

  • all occurrences of the ${event.getFoo()} where getFoo() is a method with no argument from the Calendar event object will be replaced with the corresponding value returned by the method.
  • all occurrences of the ${properties.foo} where foo can be any script property will be replaced with the corresponding value.