Send a mail with a list of all special dates (birthdays and anniversaries) of your contacts using Google Apps Script
This script uses Google Apps Script to access one's Google Contacts and calculate the age on a person's birthday & anniversaries and send a mail with for
Using Google Contacts and the Google Apps Script environment mail me a list of all special dates of contacts (birthdays and anniversaries).
- Send an email with a list of birthdays of people in my Google contacts for the remainder of the current year. Starting in the month the script runs.
- Send an email with a list of anniversaries of people in my Google contacts for the remainder of the current year. Starting in the month the script runs.
- Head to https://script.google.com/home/my and create a new project. Rename the existing file Code.gs to your liking and paste the code from sendSpecialDaysList.gs.
- Paste your mail address in line 8
- Customize the mail text in lines 9-17
- Customize the mail text for each birthday in line 218
- Customize the mail text for each anniversary in line 270
- Enable the People API
- Before running this script, you must enable the People API:
- In your Google Apps Script editor, click on "Services" (the + icon)
- Find "People API" and add it
- Set the identifier to People and version to v1
- Hit run and see the mails in your inbox
- Create a trigger to run this every month for a monthly reminder
Remove line 37 and 38 when you do not want a mail for the anniversaries (and/or remover the code completely).
The latest version of this script was updated with the help of Claude AI.