I'm head of IT for an organisation of just over a hundred members and we have every member's name and birthday on Googl;e sheet.I would like to get a birthday email reminder to a specific email for member who's birthday is on that day from the google sheet so we can send them birthday wishes.
--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/google-apps-script-community/1dbfda3b-e6f3-470a-9eeb-c352336fffc9n%40googlegroups.com.
Follow these steps carefully to get the automated reminders working in your Google Sheet.
Step 1: Prepare Your Google Sheet
Open the Google Sheet containing your member data.
Ensure your data is organized clearly.
Row 1 must be headers (e.g., "Name", "Birthday").
Ensure the column containing the birthdays is actually formatted as dates. You can check this by selecting the column, going to Format > Number > Date.
Note down the exact name of the tab (sheet) at the bottom (e.g., "Sheet1", "Members", "Birthdays").
Note down which column has names and which has birthdays. (Column A is 0, Column B is 1, Column C is 2, etc.)
Step 2: Add the Script
In your Google Sheet menu, click on Extensions > Apps Script. This will open a new tab with the Apps Script editor.
You will see a default file named Code.gs with an empty myFunction(). Delete all the code in that window.
Copy all the code from the block I generated above and paste it into the Code.gs editor.
Step 3: Configure the Script
In the code you just pasted, look at the first few lines under // Configuration Variables. You must change these to match your setup:
const SHEET_NAME = 'Birthdays'; -> Change 'Birthdays' to the exact name of your sheet tab (keep the single quotes).
const NAME_COLUMN_INDEX = 0; -> Change 0 if your names are not in Column A (e.g., if names are in Col C, make it 2).
const BIRTHDAY_COLUMN_INDEX = 1; -> Change 1 if your dates are not in Column B.
const EMAIL_RECIPIENT = 'your_i...@example.com'; -> Change this to the specific email address where you want the daily reminders sent.
Step 4: Save and Test the Script
Click the Save icon (floppy disk) in the toolbar or press Ctrl + S (or Cmd + S).
To test it, ensure you have at least one test row in your sheet with today's date as the birthday.
In the toolbar at the top, select checkBirthdaysAndSendReminders from the dropdown menu (it's next to the "Debug" button).
Click the Run button.
Authorization: The first time you run this, Google will ask for permission.
Click Review permissions.
Select your Google account.
You will see a warning saying "Google hasn’t verified this app". Click Advanced.
Click Go to Untitled project (unsafe) (or whatever you named the project).
Click Allow.
Check the email inbox of the address you configured. You should receive a test reminder.
If you don't get an email, look at the "Execution Log" at the bottom of the Apps Script window for any error messages.
Step 5: Set Up the Daily Trigger (Automation)
To make this happen automatically every day, you need to set up a Trigger.
In the Apps Script editor, look at the left-hand menu sidebar. Click on the Triggers icon (it looks like a small alarm clock).
Click the blue + Add Trigger button in the bottom right corner.
Set up the trigger with these exact settings:
Choose which function to run: checkBirthdaysAndSendReminders
Choose which deployment should run: Head
Select event source: Time-driven
Select type of time based trigger: Day timer
Select time of day: Choose a time window (e.g., 8am to 9am) when you want the email to be sent every morning.
Click Save.
That's it! Your Google Sheet is now configured to check for birthdays every morning and send an automated email alert to the IT team.
--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/google-apps-script-community/4afae2e9-4345-4730-a583-ab92414f66ean%40googlegroups.com.