Free Automated Emails for Reminder Using Node.js, Render & Brevo (No Server Costs!) | by S. Hariharan Reddy

Table of contents
๐ Introduction
Letโs be honest โ staying consistent with daily practice or habit-building is tough.
For me, the problem wasnโt learning DSA.
It was revising consistently, every single day.
Iโd forget. Iโd skip. Iโd procrastinate.
So I built a solution that fixes that automatically โ a system that sends me 3 Java DSA questions to my inbox every morning, without fail.
And hereโs the best part:
โ
It runs entirely on free-tier services
โ
No manual triggers needed
โ
I donโt have to remember โ it remembers for me
This guide will walk you through building your own automated daily email reminder app. Whether itโs:
Quotes
Goals
Journaling prompts
Revision content
Dev tips
You can fully customize the content. No paid tools. No servers.
๐ฆ Tools & Services Used (All Free)
Tool | Purpose |
Node.js + Express | Backend server to serve the API |
MongoDB Atlas | Tracks which content was already sent |
Brevo (Sendinblue) | Sends emails (free 300 mails/day) |
Render | Free-tier hosting for your Node.js app |
cron-job.org | Schedules daily HTTP requests |
๐ What This App Does (Use Case: DSA Mailer)
Recursively reads
.java
files from a nested folder (/java-output
)Sends 3 unsent questions to your email daily
Logs every sent question in MongoDB to avoid repeats
Keeps your Render instance awake to avoid cold starts
Operates entirely on autopilot at โน0/month
๐ ๏ธ How to Build It โ Step by Step
1. โ Set Up Your Node.js Project
mkdir dsa-mailer && cd dsa-mailer
npm init -y
npm install express mongoose dotenv sib-api-v3-sdk
2. โ
Create a .env
File
PORT=3000
MONGODB_URI=your_mongodb_uri
YOUR_EMAIL=your_verified_email@domain.com
BREVO_API_KEY=your_brevo_api_key
3. โ
Core Code (index.js
)
This file does the heavy lifting:
Connects to MongoDB
Recursively reads
.java
filesSelects 3 new, unsent ones daily
Sends the email via Brevo
Logs file paths in the DB
๐ View the full code here (Replace with actual GitHub repo link)
4. โ Deploy to Render (Free Tier)
Push your code to GitHub
Connect your repo to Render
Choose โWeb Serviceโ
Set:
Build command:
npm install
Start command:
node index.js
Add your
.env
variables to Renderโs dashboardDeploy! ๐
5. โ Schedule Cron Jobs via cron-job.org
๐ Wake-Up Cron Job (Every 5 Minutes)
Prevents cold-start issues on Render
*/5 * * * *
URL: https://your-app.onrender.com/
๐จ Daily Email Cron Job (2 AM IST)
Sends 3 new DSA questions
30 20 * * *
2 AM IST = 8:30 PM UTC
URL: https://your-app.onrender.com/send-dsa
๐ง Challenges Faced & How I Solved Them
๐ค 1. Cold Start Delay on Render
Problem:
Render free tier sleeps after 15 mins of inactivity โ long email delays
Fix:
Ping the base /
route every 5 mins using a wake-up cron job. Keeps instance warm.
๐ฅ 2. Cron-job.org โResponse Too Bigโ Error
Problem:
If the /send-dsa
route returned a big HTML response, cron-job.org failed to parse it.
Fix:
Send a quick 202 Accepted
response immediately. Run the actual mail logic in the background.
โป๏ธ 3. Preventing Repeated Emails
Problem:
I was getting the same questions again and again.
Fix:
Track sent file paths in a MongoDB collection and skip them during selection.
๐ Reuse Ideas: Turn This Into Anything
Want to build a habit or learning bot that reminds you daily? Just swap the content:
Replace
.java
files with.txt
,.md
, or even quotes from an APISchedule to email goals, affirmations, or daily journaling prompts
Add personalization using templates
Examples:
โ
Daily quote email
โ
Daily blog snippet delivery
โ
Morning journal prompts
โ
Custom workout plans
โ
Language learning flashcards
โจ Final Thoughts
This small project taught me more than I expected:
Real-world constraints (timeouts, cold starts, rate limits)
Cron logic in cloud environments
Email API workflows
Persistence via database logging
But most importantly โ it helped me stay consistent with revision ๐ช
I now wake up to fresh Java DSA questions in my inbox.
No excuses. Just progress.
๐ Grab the Code
๐ GitHub Repo (Full Code) (Replace with your actual GitHub link)
โญ Star the repo if it helps you!
๐ Related Keywords (for SEO)
daily email reminder
, free email automation
, node.js email app
, brevo transactional email
, habit builder automation
, cron-job.org examples
, mongodb daily log
, cold start fix render
, DSA email bot
, productivity side project
, self-discipline coding tool
โ Want to Build Your Own?
Feel free to clone, tweak, or repurpose.
Let your apps work for you.
Let me know in comments what you plan to send daily to yourself ๐
Subscribe to my newsletter
Read articles from S. Hariharan Reddy directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by

S. Hariharan Reddy
S. Hariharan Reddy
Hi, Iโm Hariharan Reddy โ a Btech graduate passionate about building scalable web applications, managing enterprise databases, and automating real-world workflows. From full-stack development to Oracle DBA and cloud infrastructure, I document my mistakes and learnings here in blogs.