Automate Trending Show HN Alerts Using n8n Workflow

Stay updated with trending posts from Hacker News’ Show HN section effortlessly. This n8n workflow scrapes data every day, filters for Show HN posts, formats and sends concise email alerts — saving you hours of manual tracking.
cron
httpRequest
htmlExtract
+4
Learn how to Build this Workflow with AI:
Workflow Identifier: 1519
NODES in Use: Cron, HTTP Request, HTML Extract Items, HTML Extract Data, IF, Function, Email Send

Press CTRL+F5 if the workflow didn't load.

Visit through Desktop for Best experience

Opening Problem Statement

Meet Alex, an independent developer and tech enthusiast who loves exploring innovative projects on Hacker News, especially the ‘Show HN’ posts where makers showcase their latest creations. Every day at 1 PM, Alex manually visits the Hacker News homepage, browses through dozens of entries, filters ‘Show HN’ posts, copies interesting titles and URLs, and compiles this into an email to share with colleagues and friends.

This routine wastes upwards of 20 minutes each day just on data gathering and formatting. With so much manual work, Alex often misses some trending posts or sends incomplete updates. Worse, on busy days, Alex’s inbox and those of friends flood with hundreds of irrelevant notifications.

Clearly, Alex needs an automated, precise way to track and notify only trending Show HN posts without sifting through the entire site manually, saving time and avoiding errors. This is exactly what our n8n workflow solves.

What This Automation Does ⚙️

This tailored n8n workflow runs every day at 1 PM, fetching the Hacker News frontpage, extracting and filtering posts to find those that are trending with the title containing “Show HN:”. Here’s what happens specifically:

  • Automatically triggers at 1 PM daily (using the Cron node) to ensure timely updates.
  • Fetches the Hacker News homepage HTML (via HTTP Request node) — no APIs needed.
  • Parses the HTML to extract all frontpage posts and their associated details (HTML Extract Items node and HTML Extract Data node).
  • Filters extracted posts to include only those with titles containing “Show HN:” (using the IF node).
  • Formats the filtered list into a clean, readable email body with ranks, titles, and URLs (Function node with custom JavaScript).
  • Sends the formatted email alert to designated recipients (Email Send node) — fully automated daily newsletter.

This automation can save Alex 20+ minutes every day, eliminate manual copy-pasting errors, and ensure all trending Show HN posts are consistently shared without delay.

Prerequisites ⚙️

  • n8n Account or self-hosted n8n instance 🔑 (to run the workflow)
  • Internet access to fetch Hacker News homepage HTML 🔌
  • Email sending setup configured in n8n (for Email Send node) 📧

Step-by-Step Guide to Build This Workflow ✏️

  1. Create Cron Trigger for Daily Schedule
    Navigate to Trigger nodes → Cron, drag it to the canvas. Set the trigger time to 13:00 (1 PM). This ensures the workflow runs automatically every day at this time.
    You should see the cron node configured with the daily hour set.
    Common mistake: forgetting to adjust timezone in n8n if your server timezone differs.
  2. Fetch Hacker News Homepage HTML
    Add an HTTP Request node connected to Cron.
    Set method to GET (default), URL to https://news.ycombinator.com/.
    Leave other options as defaults.
    Visual confirmation: the node returns raw HTML in response.
    Common mistake: accidentally enabling JSON parsing which breaks this HTML extraction.
  3. Extract Top-Level Posts HTML
    Insert an HTML Extract Items node linked to HTTP Request.
    Under Extraction values, add a new value with key item and CSS selector tr.athing. Set it to return HTML array.
    This selects each post row on Hacker News frontpage for further parsing.
    Expected outcome: an array of HTML snippets representing each story row.
    Common mistake: incorrect CSS selector causing empty results.
  4. Parse Individual Posts Data
    Add an HTML Extract Data node connected to the previous node.
    Under extraction values, add keys:
    title: select a element inside the item
    url: select a.storylink attribute href
    rank: select element with CSS class .rank
    Set dataPropertyName to item.
    Result: structured objects with rank, title, and URL.
    Common mistake: mismatched selectors leading to missing fields.
  5. Filter for “Show HN:” Titles Using IF Node
    Place the IF node after data extraction.
    Set condition: string operation contains.
    Expression: {{$node["HTML Extract Data"].data["title"]}}
    Value: Show HN:
    This filters only posts with ‘Show HN:’ in titles.
    Expected behavior: only relevant posts proceed.
    Common mistake: case sensitivity – ensure matching exact phrase.
  6. Format Email Content with Function Node
    Connect the IF node to a Function node.
    Paste this code to format email text:

    let emailText = 'Currently trending "Show HN":nn';
    
    for (let item of items) {
      emailText += `${item.json.rank} ${item.json.title}n${item.json.url}nn`;
    }
    
    return [{json: {emailText}}];
    

    This aggregates all filtered posts into a neat email body.
    Visual check: the output field emailText contains the list.
    Common mistake: forgetting to reference correct property names.

  7. Send the Email Alert
    Add the Email Send node connected to the Function node.
    Set subject to “Trending Show HN”.
    Use the expression editor in the body to add {{$node["Function"].data["emailText"]}}.
    Configure recipient emails in node parameters or globally.
    Execution result: recipients receive a clean, formatted email daily.
    Common mistake: email sending setup not configured properly in n8n.

Customizations ✏️

  • Change Trigger Time
    In Cron node, alter the hour to your preferred daily time.
    This modifies when your email alerts are sent.
  • Include Additional Filters
    Add more conditions in IF node to filter by keywords other than “Show HN” or add minimum rank.
    This narrows notifications further.
  • Send to Multiple Recipients
    Modify Email Send node with multiple addresses separated by commas.
    Scale alerts to teams or friends.
  • Format Email with HTML
    Change Function node output to include HTML tags for better email styling.
    Improve readability with bold titles and clickable links.
  • Save Data for History
    Add Google Sheets or Airtable nodes to log extracted post data for tracking trending topics over time.

Troubleshooting 🔧

  • Problem: “No data passed to IF node”
    Cause: Data extraction nodes not returning expected results.
    Solution: Check CSS selectors in HTML Extract nodes; confirm HTTP Request returns full HTML.
  • Problem: “Email not sent”
    Cause: Email Send node not configured or credentials invalid.
    Solution: Verify SMTP/email provider credentials, test email outside workflow.
  • Problem: Incorrect email formatting
    Cause: Function node JavaScript errors or missing template variables.
    Solution: Review Function code for syntax and property access.

Pre-Production Checklist ✅

  • Test Cron trigger manually in n8n editor to ensure scheduled runs.
  • Verify HTTP Request returns the latest Hacker News homepage HTML.
  • Ensure HTML Extract selectors retrieve expected data structures.
  • Confirm IF node only passes relevant Show HN posts.
  • Send test emails to verify email setup and content formatting.
  • Backup workflow configuration and email templates.

Deployment Guide

Once tested, activate the Cron node to start daily automation. Monitor initial runs via n8n’s execution logs to catch any errors. Adjust nodes as required based on feedback or site layout changes.

This workflow requires no complex infrastructure and works reliably on both n8n cloud or self-hosted environments.

FAQs

  • Can I use an alternative website besides Hacker News?
    Yes, but you will need to update the HTTP Request URL and CSS selectors in HTML Extract nodes to match the new site’s structure.
  • Does this consume lots of API credits?
    No API credits are used since the workflow scrapes public HTML pages.
  • Is my email data secure?
    Emails are sent through your configured SMTP provider; ensure you use secure credentials and encrypted connections.
  • Can I handle more frequent updates?
    Yes, adjust the Cron trigger for shorter intervals but be mindful of email fatigue among recipients.

Conclusion

You’ve now built a powerful n8n workflow that automatically fetches and sends daily email alerts for trending Show HN posts on Hacker News. This saves you over 20 minutes daily, reduces errors, and ensures you never miss a hot new project.

Next automation ideas: automate Slack notifications for the same posts, archive daily trends to Google Sheets for analysis, or extend filters to other Hacker News categories.

With this workflow, you’re empowered to keep your community informed with minimal effort — a perfect example of smart automation.

Related Workflows

Automate Viral UGC Video Creation Using n8n + Degaus (Beginner-Friendly Guide)

Learn how to automate viral UGC video creation using n8n, AI prompts, and Degaus. This beginner-friendly guide shows how to import, configure, and run the workflow without technical complexity.
Form Trigger
Google Sheets
Gmail
+37
Free

AI SEO Blog Writer Automation in n8n (Beginner Guide)

A complete beginner guide to building an AI-powered SEO blog writer automation using n8n.
AI Agent
Google Sheets
httpRequest
+5
Free

Automate CrowdStrike Alerts with VirusTotal, Jira & Slack

This workflow automates processing of CrowdStrike detections by enriching threat data via VirusTotal, creating Jira tickets for incident tracking, and notifying teams on Slack for quick response. Save hours daily by transforming complex threat data into actionable alerts effortlessly.
scheduleTrigger
httpRequest
jira
+5
Free

Automate Telegram Invoices to Notion with AI Summaries & Reports

Save hours on financial tracking by automating invoice extraction from Telegram photos to Notion using Google Gemini AI. This workflow extracts data, records transactions, and generates detailed spending reports with charts sent on schedule via Telegram.
lmChatGoogleGemini
telegramTrigger
notion
+9
Free

Automate Email Replies with n8n and AI-Powered Summarization

Save hours managing your inbox with this n8n workflow that uses IMAP email triggers, AI summarization, and vector search to draft concise replies requiring minimal review. Automate business email processing efficiently with AI guidance and Gmail integration.
emailReadImap
vectorStoreQdrant
emailSend
+12
Free

Automate Email Campaigns Using n8n with Gmail & Google Sheets

This n8n workflow automates personalized email outreach campaigns by integrating Gmail and Google Sheets, saving hours of manual follow-up work and reducing errors in email sequences. It ensures timely follow-ups based on previous email interactions, optimizing communication efficiency.
googleSheets
gmail
code
+5
Free