Structured Data Extraction from HackerNews to Google Docs via Gemini AI - n8n Workflow

Automate structured data extraction from HackerNews URLs, transform complex text into human-readable summaries using the Gemini 2.0 Flash AI model, and export the results instantly to a Google Doc using this powerful n8n workflow.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

Researchers and analysts needing automated summarization of trending articles.
Users looking for advanced n8n templates demonstrating AI and web scraping integration.
Technical writers who need to quickly document external article summaries.
Anyone interested in building complex data pipelines using the n8n node library.

Overview

This automation solves the demanding challenge of transforming large volumes of raw web data (like detailed articles linked from Hacker News) into concise, clean, and structured summaries. The n8n workflow begins by fetching recent posts. It then uses an HTTP Request n8n node to retrieve the full content of the article linked in each post. The core value lies in the integration with the Google Gemini 2.0 Flash AI model, which processes the raw data, applies a defined prompt, and extracts only the essential, human-readable information. This robust n8n workflow ensures that only high-quality, consumable data is output. Finally, the process uses the Google Docs n8n node to create and populate a new document for archival. This is a perfect example of efficient, serverless data processing using an advanced n8n setup.

How it Works

The entire process begins with the Manual n8n trigger, initiating the n8n workflow execution.


  1. Define Count: The initial Set n8n node, Set the Input Fields, defines how many Hacker News stories (e.g., 5) should be fetched.

  2. Data Fetching: The Hacker News n8n node pulls the latest top stories based on the input count.

  3. Iteration: The Loop Over Items n8n node (Split In Batches) ensures that each story is processed sequentially.

  4. Data Preparation: The Set the url, author n8n node extracts the author name and the source URL for the current article.

  5. Content Retrieval: The Create an HTTP Request n8n node performs a GET request on the extracted URL to obtain the full web page content, which serves as the context for the AI.

  6. AI Transformation: The n8n workflow utilizes the LangChain Extract Human Readable Data n8n node, which is configured to communicate with the Google Gemini Chat Model (specifically, gemini-2.0-flash-exp). The prompt instructs the AI to summarize and extract clean, human-readable content from the raw input data.

  7. Documentation: The Create a Google Doc n8n node generates a new Google Document, dynamically titled with the author's name.

  8. Final Output: The Update Google Docs n8n node inserts the refined, AI-generated summary text directly into the newly created document. This complete n8n workflow provides a seamless automation solution.

Installation Guide

To deploy this powerful n8n workflow template, follow these steps:


  1. Import: Copy the provided JSON data and import it into your n8n instance via the 'Workflows' menu.

  2. Google Gemini Credentials: Locate the Google Gemini Chat Model n8n node and set up or select your Google Gemini (PaLM) API credentials.

  3. Google Docs Credentials: Locate the Create a Google Doc and Update Google Docs n8n nodes and set up or select your Google Docs OAuth2 API credentials. Ensure these credentials have the necessary permissions to create and edit documents.

  4. Configuration: Review the Set the Input Fields n8n node to adjust the Count parameter if you wish to fetch more or fewer articles.

  5. Execution: Click 'Execute Workflow' to test the full operation of this n8n automation.

Node Details

When clicking ‘Execute workflow’ (Manual Trigger): Serves as the starting n8n trigger for testing and manual initiation of the n8n workflow.
Hacker News (HackerNews n8n node): Fetches the top stories. Key configuration: Uses an expression ={{ $json.Count }} to dynamically set the limit based on the preceding Set n8n node.
Loop Over Items (SplitInBatches n8n node): Essential for processing multiple fetched items one by one, ensuring the HTTP request and AI processing steps execute correctly for every article in the n8n workflow.
Create an HTTP Request (n8n node): Performs the web scraping action, fetching the raw HTML content from the article URL to provide context to the AI model.
Google Gemini Chat Model (LLMChatGoogleGemini n8n node): Configured to use models/gemini-2.0-flash-exp. This n8n node serves as the large language model backend for the data transformation step.
Extract Human Readable Data (ChainLLM n8n node): This is the core transformation n8n node. It uses the input context (raw article data) and the defined prompt ("Extract a human readable content...") to generate the summarized output using the connected Gemini model.
Create a Google Doc (GoogleDocs n8n node): Creates the target document. The title is dynamically generated using data from the Set the url, author n8n node output.
Update Google Docs (GoogleDocs n8n node): Inserts the clean, AI-processed text generated by the Extract Human Readable Data n8n node into the newly created document, completing the final action of this n8n workflow.

Related n8n Workflows

Free

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

A Professional based out of India specialized in handling AI-powered automations. Contact me at [email protected]

Featured*