A comprehensive Reddit monitoring system that watches specific subreddits for posts containing target keywords and sends email notifications when matches are found.
- Real-time Monitoring: Uses Reddit's official API for reliable access
- Keyword Detection: Monitors posts for configurable keywords
- Email Notifications: Sends detailed email alerts when matches are found
- Duplicate Prevention: Tracks last checked timestamp to avoid duplicate notifications
- Multiple Subreddit Support: Easily configurable for different subreddits
- Automated Scheduling: Runs as a cron job for continuous monitoring
βββ reddit-api-monitor.ts # Main monitoring script (cron job) β
READY
βββ test-reddit-api.ts # API testing and setup tool (HTTP) β
READY
βββ test-main-monitor.ts # Manual testing for main monitor (HTTP) β
READY
βββ test-slack.ts # Slack webhook testing tool (HTTP) β
READY
βββ config-manager.ts # Configuration management (HTTP) β
READY
βββ reddit-rss-monitor.ts # Alternative RSS-based monitor (backup)
βββ test-rss-monitor.ts # RSS monitor testing tool (HTTP)
βββ README.md # This file
- Subreddits:
r/lovabler/AppBusinessr/appdevr/AppDevelopersr/ChatGPTCodingr/indiehackersr/microsaasr/replitr/ReplitBuildersr/vibecodingr/ViralApps
- Keywords:
- Authentication:
auth,authentication,login,user sessions - Monetization:
stripe,subscriptions,monetization,paywall,feature gating - Analytics:
analytics - Business:
how do I make money with my app
- Authentication:
- Check Frequency: Configurable via cron schedule (set in Val Town UI)
- Post Limit: 25 posts per subreddit per check
- Client ID:
151sZ8h5TaHVZGZZn0rOhA - Client Secret:
rX_YGngVjaxRA3Y0F3STl2cuEmgHkQ
The main monitor (reddit-api-monitor.ts) runs automatically as a cron job. To configure the schedule:
- Go to the Val Town web UI
- Find the
reddit-api-monitor.tsfile - Edit the cron schedule as needed (recommended: every 15-30 minutes)
GET /test-reddit-api.ts?action=help
GET /test-reddit-api.ts?action=auth&client_id=151sZ8h5TaHVZGZZn0rOhA
GET /test-reddit-api.ts?action=test&client_id=151sZ8h5TaHVZGZZn0rOhA&subreddit=lovable
GET /test-main-monitor.ts?action=run
GET /test-slack.ts?action=simple # Send simple test message
GET /test-slack.ts?action=reddit # Send mock Reddit post notification
GET /test-slack.ts?action=error # Send mock error notification
GET /test-slack.ts?action=help # Show usage information
GET /test-reddit-api.ts?action=reset
When matches are found, you'll receive a Slack message with:
- Header:
π¨ Reddit Monitor Alert: X new matching posts in Y subreddits(or specific subreddit if only one) - Rich Attachments for each matching post including:
- Post title (clickable link to Reddit)
- Matched keywords
- Author information
- Score and comment count
- Publication date
- Content preview
- Subreddit footer (shows which subreddit the post came from)
Webhook URL: https://hooks.slack.com/services/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
- Post Titles: Full text search for keywords across all subreddits
- Post Content: Self-text content of posts across all subreddits
- Frequency: Based on cron schedule (configurable)
- Scope: New posts since last check across all monitored subreddits
- Subreddits: Currently monitoring 11 subreddits simultaneously
- Case-insensitive matching
- Partial word matching (e.g., "auth" matches "authentication")
- Multiple keyword detection per post
- Configurable keyword list
Recent Test Results: System updated to monitor 11 subreddits simultaneously
Edit the CONFIG object in reddit-api-monitor.ts:
const CONFIG: MonitorConfig = {
subreddits: [
"lovable", "AppBusiness", "appdev", "AppDevelopers",
"ChatGPTCoding", "indiehackers", "microsaas", "replit",
"ReplitBuilders", "vibecoding", "ViralApps"
],
keywords: ["auth", "authentication", "login", "signin", "signup", "oauth", "jwt", "token", "YOUR_NEW_KEYWORD"],
lastChecked: 0
};
Add new subreddits to the subreddits array in the CONFIG object:
const CONFIG: MonitorConfig = {
subreddits: [
"lovable", "AppBusiness", "appdev", "AppDevelopers",
"ChatGPTCoding", "indiehackers", "microsaas", "replit",
"ReplitBuilders", "vibecoding", "ViralApps", "YOUR_NEW_SUBREDDIT"
],
keywords: ["your", "keywords", "here"],
lastChecked: 0
};
Modify the limit parameter in the fetchSubredditPosts function call:
const posts = await fetchSubredditPosts(subreddit, 50); // Check 50 posts per subreddit instead of 25
- Reddit API credentials are configured and working
- Access tokens are cached and automatically refreshed
- All API calls use proper authentication headers
- β Reddit API authentication working
- β Post fetching functional across multiple subreddits
- β Keyword matching operational
- β Slack notifications configured and tested
- β Timestamp tracking working
- β Multi-subreddit monitoring (11 subreddits)
- β All Slack webhook formats working (simple, Reddit posts, errors)
- Set Cron Schedule: Configure the automatic run frequency in Val Town UI
- Monitor Slack: Check for notification messages when matches are found across all subreddits
- Customize as Needed: Adjust keywords or add/remove subreddits based on requirements
-
Authentication Errors
- β Resolved: Credentials are properly configured
-
No Matches Found
- β Verified: System successfully finds matches (tested with 4 matches)
-
Email Not Received
- Check spam folder
- Verify Val Town email configuration
- Check monitor logs for errors
- Use
test-reddit-api.tsto verify API connectivity - Use
test-main-monitor.tsto run the monitor manually - Check Val Town logs for detailed error information
- API Connection: β Successful
- Authentication: β Working
- Post Fetching: β Retrieved 10 posts from r/lovable
- Keyword Matching: β Found matches with updated keyword list
- Full Monitor Test: β Found 2 matches out of 25 posts
- Slack Integration: β
All notification types working
- Simple messages: β Working
- Reddit post notifications: β Working
- Error notifications: β Working
The project includes an RSS-based monitor (reddit-rss-monitor.ts) as a backup option if the API approach encounters issues. The RSS monitor has similar functionality but uses Reddit's RSS feeds instead of the official API.