# π¬ 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
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 |
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.
Go to the Actions tab of your repo β Select "LeetCode Daily Mailer" β Click "Run workflow" to test it now.
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/