n8n

How to Generate Hacker News Content Insights?

Ask a question and get ranked answers from Hacker News in seconds. A chat based assistant pulls the most popular posts and points you to the exact item you need. It is built for content marketers, product teams, and founders who want fast research without manual browsing.

When you send a message, a chat trigger routes it to an AI Agent that uses an OpenAI chat model. The agent can call a custom tool that starts a sub workflow. That sub workflow uses Hacker News to fetch the top 50 posts of all time, cleans the fields for title, points, and url, and then converts the list to JSON. The Code node returns a single JSON string for the agent to read. The AI Agent is capped at ten steps to stay focused. It then replies with the correct ranked item and includes the link.

Setup is simple. You need an OpenAI API key, and the Hacker News node works without a key. Expect research time to drop from half an hour to a few minutes. Use it to pick headline ideas, build weekly roundups, or check what ranked best for a topic. You can also replace the Hacker News step with your own data source later. Test it by clicking Chat and asking for the 5th most popular post ever, then reuse the pattern for your own questions.

What are the key features?

  • Chat input starts the flow using a manual chat trigger
  • AI Agent powered by an OpenAI chat model for reasoning
  • Custom tool links the agent to a sub workflow on demand
  • Execute Workflow Trigger kicks off the data fetch when the tool is called
  • Hacker News node retrieves the top 50 posts of all time
  • Data is cleaned to title, points, and url fields for easy reading
  • Code node converts results into a single JSON string for the agent
  • Agent runs up to ten steps to stay efficient and avoid loops

What are the benefits?

  • Reduce manual research from 30 minutes to 2 minutes per query
  • Automate 90% of ranking checks for tech news topics
  • Improve answer accuracy by using source data instead of memory
  • Let teams ask questions in one simple chat interface
  • Swap in your own data source later without rebuilding the flow

How do you set it up?

  1. Import the template into n8n: Create a new workflow in n8n > Click the three dots menu > Select 'Import from File' > Choose the downloaded JSON file.
  2. You'll need accounts with OpenAI and Hacker News. See the Tools Required section above for links to create accounts with these services.
  3. In the n8n credentials manager, create a new OpenAI credential. Use your OpenAI API key from the OpenAI account dashboard and give the credential a clear name.
  4. Open the OpenAI Chat Model node and select the new OpenAI credential in the Credential to connect with dropdown. Save the node.
  5. Open the AI Agent node and confirm it is connected to the OpenAI Chat Model node. Keep Max Iterations at 10 for stable runs.
  6. Open the Custom tool node and ensure it points to the current workflow. The tool should connect to the AI Agent so the agent can call it when needed.
  7. In the sub workflow section, check the Execute Workflow Trigger node is wired to the Hacker News node.
  8. Open the Hacker News node and confirm Limit is 50 and Resource is set to all. No credential is required for this node.
  9. Open the Clean up data node and verify the fields map to title, points, and url as shown. Save your changes.
  10. Open the Code node and confirm it returns a JSON string of all items. Keep the provided code as is.
  11. Click Chat in the top bar and ask: What is the 5th most popular post ever on Hacker News? Check the Execution log to confirm the tool call and data fetch ran successfully.
  12. Troubleshoot: If the agent loops, lower Max Iterations. If you see Tool not found, confirm the Custom tool is enabled and connected. If no results return, raise or lower the Hacker News limit and try again.

Tools Required

$24 / mo or $20 / mo billed annually to use n8n in the cloud. However, the local or self-hosted n8n Community Edition is free.

Hacker News

Sign up

Free: $0 / mo, public read-only API (no auth, no stated rate limit)

OpenAI

Sign up

Pay-as-you-go: GPT-5 at $1.25 per 1M input tokens and $10 per 1M output tokens

Similar Templates

Join Futurise to access 1,200+ automation templates

Get instant access to ready-made automation workflows for n8n, Make.com, AI agents, and more. Download, customise, and deploy in minutes.