Quick overview
This workflow runs daily to search Hacker News via the Algolia API for a list of keywords, builds a plain-text digest of new high-scoring stories, and emails it via SMTP while tracking already-sent story IDs in workflow static data to avoid duplicates.
How it works
- Runs on a daily schedule (or manually for testing) to start the digest process.
- Splits and validates your keyword list and builds one Hacker News search query per keyword for the configured lookback window.
- Calls the Hacker News Algolia search API for each keyword to fetch recent story results.
- Merges results across keywords, filters out stories below the minimum points threshold and any story IDs that were already emailed, and formats a plain-text digest.
- Sends the digest email via SMTP only when there are new matching stories.
- Saves the sent story IDs into n8n workflow static data so future runs skip duplicates.
Setup
- Configure an SMTP Email credential in n8n and select it in the email-sending step.
- Update the Config values for keywords, lookbackHours, minPoints, maxPerKeyword, alertTo, and fromEmail.
- Activate the workflow so n8n persists the static “seen” list across executions. Manual test runs do not save static data, so they may show the same stories again; this is expected.
Requirements
- An n8n instance (tested on n8n 2.41.6) and an SMTP account for sending email. The Hacker News Algolia search API is free and needs no API key.
Customization
- Change the run time in Schedule Trigger, or raise minPoints and lower maxPerKeyword to make the digest shorter.