Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

πŸ“¬ Automatically get the LeetCode Daily Challenge delivered to your inbox every day at 8:00 AM IST using GitHub Actions and Python β€” no servers or subscriptions required.

vivekbargude/leetcode-daily-mailer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

4 Commits

Repository files navigation

# πŸ“¬ LeetCode Daily Challenge Email Bot
Automatically receive the **LeetCode Daily Coding Challenge** in your email inbox every day at **8:00 AM IST** using **GitHub Actions**.
No servers or paid services required β€” just GitHub + Gmail!
---
## πŸš€ Features
- πŸ“Œ Automatically fetches LeetCode's Daily Challenge using their GraphQL API
- πŸ“§ Sends a nicely formatted email to your inbox
- ⏰ Fully automated using GitHub Actions (`cron`) β€” runs **daily**
- πŸ” Keeps your credentials secure using GitHub Secrets
---
## πŸ› οΈ How It Works
This project uses:
- A Python script (`daily_leetcode.py`) to:
 - Fetch the daily question from LeetCode
 - Send it to your email
- GitHub Actions (`.github/workflows/daily.yml`) to:
 - Schedule the script to run every day at 8:00 AM IST (2:30 AM UTC)
 - Run it without your intervention
---
## πŸ“¦ Requirements
- A [GitHub](https://github.com) account
- A Gmail account with [2FA enabled](https://myaccount.google.com/security)
- A [Gmail App Password](https://myaccount.google.com/apppasswords)
---
## πŸ”§ Setup Instructions
### 1. **Fork or Clone this Repository**
You can either fork this repo or clone it and push it to your own GitHub repo.
```bash
git clone https://github.com/yourusername/leetcode-daily-mailer.git
cd leetcode-daily-mailer

2. Add Your Secrets to GitHub

Go to your repo β†’ Settings β†’ Secrets and variables β†’ Actions β†’ New repository secret

Add the following:

Name Value
SENDER_EMAIL Your Gmail address (e.g. you@gmail.com)
RECEIVER_EMAIL Where you want the daily question sent
EMAIL_PASSWORD Your App Password for Gmail

3. Check the Cron Schedule (optional)

In .github/workflows/daily.yml, the job is scheduled like this:

schedule:
 - cron: '30 2 * * *' # This is 8:00 AM IST (2:30 AM UTC)

You can change the time by modifying the cron expression. Use crontab.guru for help.


4. Test it Manually (optional)

Go to the Actions tab of your repo β†’ Select "LeetCode Daily Mailer" β†’ Click "Run workflow" to test it now.


πŸ§ͺ Output Example

You'll receive an email like:

LeetCode Daily Question:
Title: Maximum Depth of Binary Tree
Difficulty: Easy
Tags: Depth-First Search, Tree
Link: https://leetcode.com/problems/maximum-depth-of-binary-tree/

About

πŸ“¬ Automatically get the LeetCode Daily Challenge delivered to your inbox every day at 8:00 AM IST using GitHub Actions and Python β€” no servers or subscriptions required.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /