https://github.com/vivekbargude/leetcode-daily-mailer
๐ฌ 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.
https://github.com/vivekbargude/leetcode-daily-mailer
automation cron-jobs email-bot-python github-actions leetcode leetcode-automation
Last synced: 4 months ago
JSON representation
๐ฌ 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.
- Host: GitHub
- URL: https://github.com/vivekbargude/leetcode-daily-mailer
- Owner: vivekbargude
- Created: 2025-06-24T12:51:45.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2025-06-24T13:20:36.000Z (5 months ago)
- Last Synced: 2025-06-24T14:27:26.006Z (5 months ago)
- Topics: automation, cron-jobs, email-bot-python, github-actions, leetcode, leetcode-automation
- Language: Python
- Homepage:
- Size: 3.91 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
````markdown
# ๐ฌ 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](mailto:you@gmail.com)) |
| `RECEIVER_EMAIL` | Where you want the daily question sent |
| `EMAIL_PASSWORD` | Your [App Password](https://myaccount.google.com/apppasswords) for Gmail |
---
### 3. **Check the Cron Schedule (optional)**
In `.github/workflows/daily.yml`, the job is scheduled like this:
```yaml
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](https://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/
```
---