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

๐Ÿš€ 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)

ToolPurpose
Node.js + ExpressBackend server to serve the API
MongoDB AtlasTracks which content was already sent
Brevo (Sendinblue)Sends emails (free 300 mails/day)
RenderFree-tier hosting for your Node.js app
cron-job.orgSchedules 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 files

  • Selects 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)

  1. Push your code to GitHub

  2. Connect your repo to Render

  3. Choose โ€œWeb Serviceโ€

  4. Set:

    • Build command: npm install

    • Start command: node index.js

  5. Add your .env variables to Renderโ€™s dashboard

  6. Deploy! ๐ŸŽ‰


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 API

  • Schedule 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!


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 ๐Ÿ˜„



0
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.