π Send keyword-based Hacker News Slack alerts with Groq and Google Sheets
β‘ 7 views Β· π Market Research & Insights
Description
Quick overview
This workflow polls Hacker News search results every two hours for a list of keywords, filters out posts already logged in Google Sheets, generates a one-sentence explanation with Groq, and sends a Slack webhook alert for each new match.
How it works
- Runs every two hours on a schedule.
- Splits your comma-separated keywords into individual Hacker News Algolia search-by-date API queries for the last seven days.
- Fetches results from the Hacker News Algolia API and flattens each hit into a normalized list of posts with the matched keyword.
- Reads previously seen post URLs from a Google Sheets tab and filters out any candidates that have already been logged (capped to 20 new posts per run).
- Sends each new postβs keyword, title, and snippet to Groq Chat Completions to generate a single-sentence explanation of the match.
- Posts a formatted alert to Slack via an incoming webhook and then upserts the post URL and metadata into Google Sheets to prevent repeat alerts.
Setup
- Add Groq API credentials in n8n (used to call Groq Chat Completions).
- Create a Google Sheet with a tab named βSeenPostsβ and columns for at least post_url, title, matched_keyword, and seen_at, then connect Google Sheets credentials in n8n.
- Create a Slack incoming webhook for your target channel and paste the webhook URL into the workflowβs configuration values.
- Update the workflow configuration values for your keywords (comma-separated) and your Google Sheet ID before activating the workflow.
π Nodes Used
Google Sheets, HTTP Request, Schedule Trigger
π₯ Import
Download workflow.json and import into n8n:
Workflow menu β Import from File