Quick overview
This workflow monitors Reddit hourly via Apify, filters and scores new posts (with OpenAI/OpenRouter or keyword rules), logs them to an n8n Data Table (optionally Google Sheets), sends high-relevance alerts to Slack, and posts a daily 24-hour digest to Slack every morning.
How it works
- Runs on a schedule every hour to fetch newly published Reddit posts from configured subreddits and keyword searches using Apify.
- Cleans the results by excluding NSFW content, blocked words, low-score posts, and (optionally) search hits that don’t strictly match your keywords.
- Skips posts that have already been processed in previous executions.
- Scores each post for relevance and intent and generates a short summary and suggested reply using OpenAI/OpenRouter (or applies a keyword-based scoring fallback when AI is disabled).
- Logs each scored post to an n8n Data Table and optionally appends the same data to a Google Sheets tab.
- Sends an immediate Slack alert for posts whose relevance meets or exceeds the configured alert threshold.
- Runs every morning to compile the last 24 hours of logged posts, optionally uses OpenAI/OpenRouter to write a brief Slack-formatted briefing, and posts the digest to Slack.
Setup
- Add an Apify API token credential and ensure the Apify actor run limit (
maxSpendUsdPerRun) matches your budget.
- Add a Slack OAuth credential, invite the bot to your target channel, and set the channel in both Slack messages (alert and digest).
- Add an OpenAI credential (or an OpenRouter key via the same credential by setting the Base URL to
https://openrouter.ai/api/v1) if useAI is enabled.
- Update the Config values for subreddits, keywords, excluded words, and your “about you” description, plus thresholds like
alertScore and digestTopN.
- (Optional) Enable the Google Sheets step, connect Google Sheets OAuth, and replace the placeholder document URL and sheet name to log posts to a spreadsheet.