Skip to content

sudharsangs/reddit-job-notify-telegram-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Reddit Job Notifier

A Go application that monitors Reddit for freelance opportunities and sends notifications via Telegram. This tool automatically scans multiple subreddits for relevant job posts and filters them based on your criteria.

Features

  • Monitors multiple Reddit subreddits for freelance opportunities
  • Intelligent filtering based on keywords, technologies, and quality indicators
  • Categorizes opportunities by type (Full-Stack, Frontend, Backend, etc.)
  • Sends rich notifications to Telegram with priority levels
  • Tracks statistics and seen posts to avoid duplicates
  • Optional Google Sheets integration to log opportunities
  • Configurable filtering and notification settings

Prerequisites

Before running this application, you'll need:

  1. Reddit API Credentials:

  2. Telegram Bot Token:

    • Create a Telegram bot by messaging @BotFather
    • Get your bot token and the chat ID where you want to receive notifications
  3. (Optional) Google Sheets Credentials:

    • Set up Google Sheets API and create service account credentials
    • Share the target spreadsheet with your service account email

Installation

Using Go

# Clone the repository
git clone <repository-url>
cd reddit-job-notifier

# Install dependencies
go mod tidy

# Build the application
go build -o reddit-monitor cmd/reddit-monitor/main.go

Using Docker

# Build the Docker image
docker build -t reddit-monitor .

# Run the container
docker run -d --env-file .env reddit-monitor

Configuration

Copy the example environment file and update with your credentials:

cp .env.example .env

Configure the following environment variables in your .env file:

Reddit API Configuration

  • REDDIT_CLIENT_ID: Your Reddit app client ID
  • REDDIT_CLIENT_SECRET: Your Reddit app client secret
  • REDDIT_USER_AGENT: User agent string for API requests

Telegram Configuration

  • TELEGRAM_BOT_TOKEN: Your Telegram bot token
  • TELEGRAM_CHAT_ID: Chat ID where notifications should be sent

Google Sheets Configuration (Optional)

  • GOOGLE_SHEETS_ENABLED: Set to true to enable Google Sheets integration
  • GOOGLE_SHEET_ID: ID of the Google Sheet to use
  • GOOGLE_SERVICE_ACCOUNT_EMAIL: Service account email
  • GOOGLE_SERVICE_ACCOUNT_PRIVATE_KEY: Service account private key

Monitoring Configuration

  • MONITORING_INTERVAL: Interval between checks in seconds (default: 900 = 15 minutes)
  • MIN_POST_SCORE: Minimum post score to consider (default: 1)
  • MAX_POSTS_PER_CHECK: Maximum posts to check per subreddit (default: 50)
  • POST_AGE_LIMIT_HOURS: Maximum age of posts to consider in hours (default: 24)

Application Settings

  • LOG_LEVEL: Logging level (DEBUG, INFO, WARN, ERROR) (default: INFO)
  • ENABLE_NOTIFICATIONS: Whether to send notifications (default: true)

Notification Settings

  • NOTIFICATION_FRESHNESS_MINUTES: Only notify for posts within this time window (default: 15)
  • MAX_COMMENTS_FOR_NOTIFICATION: Only notify for posts with fewer than this many comments (default: 5)

Usage

Run continuously (default):

./reddit-monitor

Run once and exit:

./reddit-monitor --once

How It Works

  1. The application periodically checks configured subreddits for new posts
  2. Posts are filtered based on:
    • Explicit hiring language ("hiring", "looking for", etc.)
    • Development-related keywords
    • Work type indicators ("freelance", "contract", etc.)
    • Quality indicators and negative keywords
  3. Relevant opportunities are categorized and assigned priority scores
  4. Notifications are sent to Telegram with detailed information
  5. Posts are tracked to prevent duplicate notifications
  6. (Optional) Opportunities are logged to Google Sheets

Development

This project follows standard Go project structure:

reddit-job-notifier/
├── cmd/
│   └── reddit-monitor/
│       └── main.go
├── internal/
│   ├── config/         # Configuration management
│   ├── models/         # Data models
│   ├── reddit/         # Reddit API client
│   ├── filter/         # Post filtering logic
│   ├── telegram/       # Telegram notification client
│   ├── templates/      # Response templates
│   ├── persistence/    # Data persistence
│   ├── sheets/         # Google Sheets integration
│   └── monitor/        # Main application orchestrator
└── data/              # Local data storage (gitignored)

Running in development:

go run cmd/reddit-monitor/main.go

Running tests:

go test ./...

Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Make your changes
  4. Add tests if applicable
  5. Run go fmt to format code
  6. Commit your changes (git commit -m 'Add amazing feature')
  7. Push to the branch (git push origin feature/amazing-feature)
  8. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • Reddit API for providing access to job opportunities
  • Telegram for messaging platform
  • Google Sheets for optional data logging

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors