Automate Business Idea Generation from HackerNews using GPT and Google Sheets - n8n Workflow

This n8n workflow scrapes Hacker News, utilizes an advanced AI Agent for business viability analysis via OpenRouter, and automatically logs structured results into Google Sheets. Start leveraging this powerful n8n template for market research.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

Market Researchers and Trend Analysts looking for rapid, structured data extraction.
Startup Founders and Solopreneurs seeking validated business ideas based on current trends.
n8n Users who want to implement sophisticated AI reasoning within their data pipelines.
Developers needing an automated way to monitor relevant topics from high-traffic news sources.

Overview

Sifting through large volumes of content, such as Hacker News, to find viable business opportunities is time-consuming and prone to human bias. This specialized n8n workflow solves this problem by automating the entire research and analysis process.

The automation starts by fetching popular posts. Crucially, each potential idea is fed into an AI Agent powered by a high-end model (like GPT-4 via OpenRouter). This AI agent not only summarizes the post but, thanks to a structured output parser n8n node, reliably extracts specific data points—such as the target audience, potential monetization strategy, and overall viability score—into a clean JSON format. Only posts matching pre-defined criteria (checked by an If n8n node) are processed further. Finally, the structured data is instantly recorded in Google Sheets, creating a clean, actionable database of business ideas. This powerful n8n template dramatically accelerates market research and idea validation.

How it Works

This n8n workflow is initiated manually using the 'When clicking ‘Test workflow’ n8n trigger, although it can easily be converted to a scheduled trigger.


  1. Data Ingestion: The Hacker News n8n node fetches a list of current top posts.

  2. Initial Filtering: The 'Filter Posts By Features' If n8n node checks posts against defined criteria (e.g., minimum comment count or score) to reduce noise.

  3. Data Preprocessing: The 'Select Key Fields' n8n node cleans up the data, keeping only essential attributes like the title, URL, and score.

  4. Batch Processing: The 'Loop Over Items' n8n node (Split In Batches) ensures that each filtered post is processed individually by the AI agent, preventing rate limits and mixing of context.

  5. AI Analysis (The Core n8n Node): The AI Agent runs, leveraging the OpenRouter Chat Model for its reasoning capabilities. It utilizes a dedicated Structured Output Parser n8n node to force the output into a predictable format (e.g., JSON schema for 'Idea', 'Viability Score', etc.).

  6. Topic Evaluation: The 'If Topic1' If n8n node evaluates the output from the AI. If the AI confirms the topic is relevant and contains a high-potential business idea, the workflow continues down the 'True' path.

  7. Data Mapping and Merging: The 'Assign Sheet Headers' n8n node maps the structured AI analysis fields. The 'Merge Input' n8n node combines the original Hacker News data with the newly generated AI analysis data.

  8. Final Output: The final, comprehensive data set is appended as new rows into the designated Google Sheets spreadsheet using the Google Sheets n8n node.

Installation Guide

To deploy and run this sophisticated n8n workflow template, follow these steps:


  1. Import: Copy the provided JSON and import it directly into your n8n instance as a new n8n workflow.

  2. Credentials Setup:

Google Sheets: Create a new credential for the Google Sheets n8n node, granting it access to the specific spreadsheet you wish to write to.
OpenRouter: Set up an OpenRouter credential. This service requires an API key for access to models like GPT-4 or similar high-performance large language models.

  1. Configuration:

Google Sheets Node: Update the spreadsheet ID and Sheet Name in the 'Output The Results' n8n node.
AI Agent Node: Review the system prompt and tool configurations (like the HTTP Request Tool) in the 'AI Agent' n8n node to ensure the analysis criteria match your business needs.

  1. Testing: Click 'Test workflow' on the 'When clicking ‘Test workflow’ n8n trigger to execute a test run and verify data is correctly written to your Google Sheet.

Node Details

When clicking ‘Test workflow’ (Manual Trigger n8n trigger): Initiates the execution of the entire n8n workflow upon manual request.
Hacker News (n8n node): Fetches recent posts and their metadata, serving as the raw data source for the n8n workflow.
Filter Posts By Features (If n8n node): Applies initial logic to filter posts based on quantifiable metrics (e.g., minimum score or number of comments) before processing by the AI, saving LLM tokens.
Loop Over Items (Split In Batches n8n node): Manages the flow by separating incoming items, ensuring that the heavy AI processing is executed sequentially for each individual post item.
AI Agent (Langchain n8n node): The core intelligence of the n8n workflow. It orchestrates the analysis, using the attached OpenRouter Chat Model to determine the business potential of the post content.
OpenRouter Chat Model (Langchain n8n node): Provides access to powerful, cost-effective LLMs (like GPT-4) necessary for complex reasoning and structured analysis within the AI Agent n8n node.
Structured Output Parser (Langchain n8n node): Guarantees that the AI's complex analysis is returned in a strict, predictable JSON structure, which is vital for reliable data processing downstream.
If Topic1 (If n8n node): A conditional gate that verifies if the structured output from the AI meets specific topic or viability thresholds before the idea is logged.


  • Output The Results (Google Sheets n8n node): The final action n8n node, responsible for appending the combined, analyzed, and structured data into the designated Google Sheets spreadsheet.

Related n8n Workflows

Paid

Nodes: 12 Nodes
Updated: December 26 2025
View all
Created by

Love SEO & AI

Featured*