Automate Hacker News Headlines Analysis with n8n and Google Gemini

Discover how this unique n8n workflow automates the extraction, analysis, and Markdown-formatting of Hacker News front-page headlines across multiple years using Google Gemini. It saves hours of manual research by categorizing tech trends historically for specific calendar days.
scheduleTrigger
chainLlm
lmChatGoogleGemini
+9
Workflow Identifier: 1546
NODES in Use: scheduleTrigger, code, set, splitOut, httpRequest, html, set, merge, aggregate, chainLlm, lmChatGoogleGemini, telegram
Automate headlines with n8n and Google

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

Learn how to Build this Workflow with AI:

What This Workflow Does

This workflow fetches top Hacker News headlines from the same calendar day across past years.

It solves the problem of manually searching old headlines by automating the process from fetching to sharing.

After running, it gives a summary message categorized by tech themes sent to Telegram.


Who Should Use This Workflow

This workflow is for anyone who wants to share or analyze historical tech headlines easily.

It fits well for content creators, bloggers, or social media managers focused on tech trends.


Tools and Services Used

  • n8n Automation Platform: runs the workflow jobs.
  • Hacker News Archive: source for front page HTML data.
  • Google Gemini Chat Model: analyzes and summarizes headlines intelligently.
  • LangChain LLM Chain node: runs custom prompts to categorize and format summaries.
  • Telegram Bot API: delivers summary messages.

Inputs, Processing, and Outputs

Inputs

  • Current day timestamp from schedule trigger.
  • HTML pages of Hacker News front pages for that day across years.

Processing Steps

  • Generate a list of target dates from current year back to 2007.
  • Split the dates array into single date items.
  • Fetch front page HTML for each date.
  • Extract headlines and date text using CSS selectors.
  • Separate headlines and dates for clear data handling.
  • Merge headlines with their respective dates.
  • Aggregate all combined items into one JSON for LLM input.
  • Use Google Gemini-backed LangChain LLM to analyze, categorize, and format headlines in Markdown.
  • Send the final Markdown summary message to Telegram channel.

Outputs

  • Markdown formatted headline summary grouped by tech themes.
  • Automated daily Telegram posts with historical tech insights.

Beginner Step-by-Step: How to Use This Workflow in n8n

Step 1: Import the Workflow

  1. Download the provided workflow file from this page.
  2. Open the n8n editor where the workflow will run.
  3. Use the Import from File option to load the workflow.

Step 2: Configure Credentials and IDs

  1. Add required API Keys for Google Gemini and Telegram in the credential settings.
  2. Update Telegram channel ID to your target chat.
  3. Check any other IDs like user emails or folder names, and update as needed.
  4. Paste the prompt code into the Basic LLM Chain if not already included.

Step 3: Test the Workflow

  1. Run the workflow manually once to verify steps work as expected.
  2. Check Telegram channel for the summary message.

Step 4: Activate for Production

  1. Turn the workflow toggle ON to enable scheduled daily runs.
  2. Verify the schedule trigger runs each day at designed hour.
  3. Adjust batch sizes or delays if needed based on API limits.

Optionally, explore self-host n8n to run this workflow on your own server for greater control and cost savings.


Customization Ideas

  • Modify years range by editing the CreateYearsList code node.
  • Switch Telegram node to other platforms like Slack or Email.
  • Tweak prompt in Basic LLM Chain for different categorization focuses.
  • Change HTTP request batch size or delay for better rate limit handling.
  • Add custom emoji or Markdown formatting for more visual style.

Troubleshooting Common Problems

  • Empty or error HTTP responses: Check date parameter validity and respect Hacker News archive limits.
  • Incorrect HTML extraction: Update CSS selectors in ExtractDetails node to match current site structure.
  • Google Gemini API errors: Confirm API key validity and usage quotas.

Pre-Production Checklist

  • Verify Schedule Trigger runs at correct time.
  • Test output of CreateYearsList code node with a sample date.
  • Check GetFrontPage fetches valid HTML per date.
  • Ensure ExtractDetails pulls correct headlines and date.
  • Confirm Basic LLM Chain returns proper Markdown outputs.
  • Test Telegram bot posting in a private channel.

Deployment Guide

Enable the workflow switch in n8n to start daily runs.

Use execution logs to monitor success and errors.

Adjust batch delays to avoid rate limits.

For more workload, consider splitting date ranges or load balancing.

Check self-host n8n if interested in hosting on own server.


Summary of Benefits and Outcome

✓ Saves hours by automatically fetching historical tech headlines.

✓ Provides clear, categorized summaries ready to share.

✓ Sends daily posts directly on Telegram for audience engagement.

→ Produces reliable historical insights without manual work.

Automate headlines with n8n and Google

Visit through Desktop to Interact with the Workflow.

Author
Written By
Vikash Kumar
Building AI agents, n8n workflows and end-to-end automation for 30+ Brands across India, the US, Europe, Dubai & Australia. 7+ years of Experience saving founders real hours every week - no code required.
Author
Written By
Vikash Kumar
Building AI agents, n8n workflows and end-to-end automation for 30+ Brands across India, the US, Europe, Dubai & Australia. 7+ years of Experience saving founders real hours every week - no code required.

Frequently Asked Questions

Yes, replace the Google Gemini Chat Model node with other LLM provider nodes and adjust the prompt accordingly.
Adjust the HTTP request batch size and delay settings to control API call rate and prevent quota limits.
No, the HTML structure may change, so CSS selectors in the ExtractDetails node must be updated accordingly.
Yes, by splitting workload into multiple workflows or using load balancing, the workflow can handle larger ranges.

Related Workflows

Automate Twist Channel Creation and Messaging with n8n

This workflow automates creating and updating a channel in Twist and sending a personalized message to specific users. It eliminates manual setup errors and saves time managing Twist communications.

Automate Ideogram Image Generation with Google Sheets & Gmail

This workflow automates graphic design image generation via Ideogram AI, storing image data in Google Sheets and Google Drive, with email alerts via Gmail. It saves designers hours by automating image creation, remixing, review, and record-keeping.

Automate IT Support with Slack and OpenAI in n8n

Streamline IT support by automating Slack message handling using n8n and OpenAI. This workflow handles Slack DMs, filters bots, queries a Confluence knowledge base, and delivers AI-generated responses, improving support efficiency and response time.

Automate Crypto Analysis with CoinMarketCap & n8n AI Agent

Discover how this unique n8n workflow leverages CoinMarketCap’s multi-agent AI to deliver precise, real-time cryptocurrency insights directly via Telegram. Manage crypto data analysis efficiently with automated multi-source API integration.

Automate Gumroad to Beehiiv Subscriber Sync with n8n

Learn how to automatically add new Gumroad sales customers as Beehiiv newsletter subscribers using n8n automation. This workflow saves time by syncing sales data to Google Sheets CRM and notifying your Telegram channel instantly.

Generate On-Brand Blog Articles Using n8n and OpenAI

This workflow automates the creation of on-brand blog articles by analyzing existing company content using n8n and OpenAI. It extracts article structures and brand voice to produce consistent draft articles, saving significant content creation time.
1:1 Free Strategy Session
Your competitors are already automating. Are you still paying for it manually?

Do you want to adopt AI Automation?

Every hour your team does repetitive work, you're burning real money.
While you wait, faster businesses are cutting costs and moving quicker.
AI and automations aren't the future anymore — they're the present.

Book a live 1-on-1 session where we show you exactly which of your daily tasks can be automated — and what it’s costing you not to.