A simple Google Apps Script that sends automated birthday wishes via Gmail, using data stored in a Google Sheet.
git clone https://github.com/agneay/Birthday-Email-Sender-Google-App-Scripts.gitCreate a Google Sheet with the following columns:
- Name
- Birthday (in MM/DD/YYYY format) converted to date object in Google Sheets
- Ensure the three columns are named exactly as
Name,Email, andBirthday. - Select all the data (including headers) and click on
Format > Convert To Tableor alternatively you can use the shortcutCtrl + Alt + Shift + t.

- Rename the table in the Google Sheet to
Data Table
- Rename the sheet to
Data Sheet
NOTE: Extensions option will not be available if you are using a file imported from Excel, view troubleshooting section above to convert it to a Google Sheet.
- Delete any code in the script editor and replace it with the code from
Code.jsfile in this repository.
- Save the script with a name like "BirthdayEmailSender".
- Ensure the app Script is saved.

- In the Apps Script editor, locate the
sendBirthdayEmailsfunction. - Modify the email subject and body as desired.
- Subject and body can be customized in the following lines:
var subject = "Happy Birthday, " + name + "!"; var body = "Dear " + name + ",\n\nWishing you a fantastic birthday filled with joy and surprises!\n\nBest wishes,\n[Your Name]";
- Make sure to replace
[Your Name]with your actual name or the name you want to appear in the email.
- In the Apps Script editor, click on the clock icon (Triggers) in the left sidebar.
- Click on
+ Add Triggerin the bottom right corner. - Choose the following options:
- Click
Save.
- The first time you run the script or set up a trigger, you will be prompted to authorize the script to access your Google account.
- Click on
Review Permissions. - Choose your Google account.
- Click on
Allowto grant the necessary permissions.
NOTE: Incase of
Google has'nt Verified this apperror, refer to the troubleshooting section below.
- If you encounter issues with date formats, ensure that the 'Birthday' column is set to the correct date format in Google Sheets.
To Change the date format:
- Select the 'Birthday' column and click on the dropdown arrow next to the column letter and Select
Edit Column Type
- Choose
Date
- Choose
Date
-
Ensure that the email addresses in the 'Email' column are valid and correctly formatted.
-
If you have imported a excel file file into Google Sheets, there will be a
.xlsxnear the name of the sheet. Convert it to a Google Sheet by clicking onFile > Save as Google Sheets.
- The sheet imported from excel will have a
.xlsxnear the name of the sheet.
- Click on
File > Save as Google Sheetsand work with the new Google Sheet created.
- Incase of
Google has'nt Verified this apperror, click onAdvancedand thenGo to BirthdayEmailSender (unsafe)to proceed.








