A serverless automation script that sends a personal WhatsApp notification one day before a friend's birthday. This project leverages the free Google Suite (Sheets and Apps Script) to create a zero-cost, zero-maintenance solution.
- Daily Automation: The script runs once a day, automatically, without any manual intervention.
- Simple Database: Uses a Google Sheets spreadsheet as a database, making it easy to add and manage contacts.
- Zero Cost: All tools used (Google Sheets, Apps Script, CallMeBot) have free tiers that are perfectly suited for this project.
- Easy Setup: The project can be replicated in just a few minutes by following the instructions below.
| Tool | Purpose |
|---|---|
| Google Sheets | Stores the names and birth dates. |
| Google Apps Script | The "brain" of the automation. Runs the code in the Google Cloud. |
| CallMeBot API | A free API service that bridges the script with the WhatsApp messaging service. |
Follow the steps below to get your own version up and running:
- Create a new spreadsheet in Google Sheets.
- Rename the first sheet (tab) to
Amigos. - Set up the columns exactly as follows:
- Column A:
Nome - Column B:
Dia - Column C:
Mês
- Column A:
- Fill it in with your friends' data.
- Go to the CallMeBot website.
- Follow the instructions to activate the WhatsApp API for your phone number.
- You will receive an
apikey. Save it.
- In your spreadsheet, navigate to
Extensions > Apps Script. - Copy the code from the
Code.gsfile in this repository and paste it into the editor. - Go to Project Settings ⚙️ > Script Properties.
- Add two new properties:
- Property Name:
WHATSAPP_NUMBER| Value: Your WhatsApp number in+55...format. - Property Name:
CALLMEBOT_APIKEY| Value: Theapikeyyou received from CallMeBot.
- Property Name:
- Save the script properties.
- Create a new Trigger ⏰ for the
verificarAniversariosfunction. Configure it to run on aTime-drivenbasis using aDay-timer.
That's it! The system will now run automatically every day.
This section outlines potential improvements and new features for the project.
-
[ ]Age Calculation in Notifications:- Add a
Yearcolumn to the Google Sheet to store the birth year. - The script will then calculate the person's upcoming age and include it in the message (e.g., "Reminder: Tomorrow is Jane's 30th birthday! 🥳").
- Add a
-
[ ]Google Forms Integration for Easy Entry:- Create a Google Form that populates the Google Sheet. This would allow adding new birthdays from any device without directly editing the spreadsheet, making it more user-friendly.
-
[ ]Advanced Reminders (1 Month Prior):- Implement an additional check to send a second notification a month before the birthday, providing more time to plan or buy a gift.
-
[ ]Weekly/Monthly Digest:- Set up a secondary trigger (e.g., to run every Sunday) that sends a summary of all upcoming birthdays for the next week or month, providing a high-level overview.