An automated Node.js service that checks your Gmail inbox for placement emails (from your college’s placement cell), scans them for your name/registration number, and instantly notifies you on Telegram whether you are ✅ Shortlisted or ❌ Not Shortlisted.
-
🔍 Monitors unread emails from a specific placement cell email ID.
-
📑 Supports both:
- Names in the email body
- Names/roll numbers inside Excel attachments (
.xls,.xlsx).
-
🤖 Sends instant Telegram alerts with:
- Email subject
- Shortlist status (
✅/❌).
-
♻️ Runs automatically every 5 minutes (configurable).
-
⚡ Lightweight Express server included for health checks.
placement-notifier/
│── index.js # Main app logic
│── package.json # Dependencies & scripts
│── .env # Environment variables (not committed)
│── README.md # Project documentation
git clone https://github.com/yourusername/placement-notifier.git
cd placement-notifiernpm installCreate a .env file in the project root:
# Gmail
EMAIL_USER=yourgmail@gmail.com
EMAIL_PASS=your-16-digit-app-password
WATCH_EMAIL=placement@college.edu
# Student Info
YOUR_NAME=Deep Chakraborty
YOUR_REG_NO=123456
# Telegram Bot
TELEGRAM_TOKEN=1234567890:AAHkjsfh23ksdf...
TELEGRAM_CHAT_ID=987654321
⚠️ Use a Google App Password instead of your normal Gmail password.
npm run startDeploy to cloud platforms like Render, Railway, Heroku, or DigitalOcean.
Make sure to add all .env values in the platform’s environment variables section.
-
Open @BotFather in Telegram.
-
Run
/newbot→ get your bot token. -
Add the bot to your Telegram account or group.
-
Get your chat ID using:
https://api.telegram.org/bot<TELEGRAM_TOKEN>/getUpdatesSend a message to your bot, then check the response JSON for
"chat":{"id": ...}.
-
Mail check interval: default = 5 minutes → change in code:
setInterval(checkMails, 5 * 60 * 1000); // 5 mins
-
Health check: visit
http://localhost:3000/→ returns📢 Placement Notifier (Telegram) is running!
- express → lightweight web server
- imap-simple → IMAP client for Gmail
- mailparser → parses email content
- xlsx → reads Excel attachments
- node-fetch → sends messages to Telegram API
- dotenv → loads
.envconfigs
📢 Placement Alert
📌 Subject: Shortlist for TCS Digital
✅ You are shortlisted!
or
📢 Placement Alert
📌 Subject: Infosys Final Round Results
❌ You are NOT shortlisted.
Deep Chakraborty 📫 [Your Email] 💼 [LinkedIn/GitHub Profile]
This project is licensed under the MIT License.