AI Research Scraper and Structured Summary Generator - n8n Workflow

Leverage this powerful n8n workflow to automate web research. Scrape articles using Decodo, utilize Google Gemini AI for structured summaries, and save indexed insights directly to Google Sheets.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

-
Researchers and Analysts who need to quickly process large lists of articles.
Content Creators seeking structured insights and content ideas from external resources.
Technical users looking for advanced n8n templates integrating web scraping and AI.
Knowledge Managers building indexed research databases using n8n and Google Sheets.

Overview

Managing high volumes of web research often involves tedious copy-pasting and manual structuring. This specialized n8n workflow solves this by providing end-to-end automation for knowledge extraction. The core value of this n8n template lies in its ability to standardize unstructured web content. It reads URLs from a Google Sheet, efficiently scrapes the full text using the Decodo n8n node, cleans the HTML into readable text via a custom script, and then submits this content to an AI agent (powered by Google Gemini) for intelligent analysis. The AI is meticulously prompted to return a fixed JSON schema containing critical metadata like topic, summary, key insights, resource type, and publication date. This makes the resulting data immediately useful for dashboards, internal reports, or content generation, making this n8n workflow an essential tool for automated intelligence gathering.

How it Works

This comprehensive n8n workflow begins with a simple execution n8n trigger. Once activated:


  1. The Google Sheets n8n node (Get row(s) in sheet) initiates the process by extracting all URLs listed in a designated 'input' spreadsheet.

  2. The Loop Over Items n8n node takes the list and processes each URL individually, ensuring robust handling.

  3. The dedicated Decodo n8n node is executed for the current URL, performing deep web scraping to retrieve the raw webpage content and metadata.

  4. A specialized Code n8n node (Code in JavaScript) cleans the raw HTML. It strips away unnecessary elements (scripts, styles) and converts the body into clean, plain article text, while also extracting the URL, title, and source domain.

  5. The cleaned text is passed to the AI Agent n8n node, which utilizes the connected Google Gemini Chat Model to perform analysis. The agent follows strict instructions to output a complex, structured JSON object containing fields like summary, key insights, main topic, and publication date.

  6. A subsequent Code n8n node (Code in JavaScript1) is used to parse the raw AI output (which is often returned as a string) back into a fully structured JSON object that n8n can process.

  7. Finally, the Google Sheets n8n node (Append row in sheet) commits the complete, structured summary, including all metadata and insights, to a designated 'output' sheet. This sequence ensures every item processed by this n8n workflow is indexed correctly.

Installation Guide

To deploy this powerful n8n template, follow these steps:


  1. Import the n8n workflow JSON: In your n8n instance, go to the Workflows section and use the 'Import from JSON' option to load the provided code.

  2. Google Sheets Setup: You will need to create a new spreadsheet (or use an existing one) and configure two sheets: an input sheet (containing a column named url with the links you wish to scrape) and an output sheet (where results will be saved).

  3. Google Sheets Credential Configuration: Edit both Google Sheets n8n node instances and authenticate your Google Sheets connection. Ensure the correct Document ID and Sheet Names (input for reading, output for writing) are selected.

  4. Decodo Setup: Edit the Decodo n8n node and provide your Decodo API key to enable the web scraping functionality.

  5. AI Model Setup: Configure the Google Gemini Chat Model n8n node by providing the necessary credentials (e.g., your Google AI Studio API key). This link must be connected to the AI Agent n8n node.

  6. Testing the n8n workflow: Run the n8n trigger manually to process the URLs in your input sheet and verify the structured output in the designated Google Sheet.

Node Details

This n8n workflow relies on several specialized n8n node types:

When clicking ‘Execute workflow’ (Manual Trigger n8n trigger):
Function: Starts the n8n workflow manually for batch processing.
Key Configuration: Simple manual start for quick testing and research runs.

Get row(s) in sheet (Google Sheets n8n node):
Function: Retrieves the list of URLs from the input spreadsheet.
Key Configuration: Reads all rows from the specified 'input' sheet using a linked Google Sheets credential.

Decodo (Decodo n8n node):
Function: Performs robust, universal web scraping to bypass common anti-bot measures and extract high-quality raw content.
Key Configuration: Operation set to universal to get the maximum content from the URL supplied by the loop.

Code in JavaScript (n8n node):
Function: Cleans the raw Decodo HTML output. Contains functions to strip HTML, scripts, and styles, converting the article body into clean text suitable for LLM analysis.
Key Configuration: Custom JavaScript code extracts url, fuente (source domain), titulo (extracted title), and articletext (cleaned text).

AI Agent (Langchain n8n node):
Function: Orchestrates the LLM to execute a specific task: structured data extraction and summarization based on a detailed system prompt.
Key Configuration: Uses a highly detailed prompt instructing the AI to return ONLY a JSON object with specific mandatory keys (shortsummary, threekeyinsights, maintopic, etc.).

Google Gemini Chat Model (Langchain n8n node):
Function: Provides the underlying large language model capability for the AI Agent.
Key Configuration: Connected as the chat model service for the AI Agent n8n node.

Code in JavaScript1 (n8n node):
Function: Parses the raw JSON string output generated by the AI agent into a usable structured object within the n8n workflow.
Key Configuration: Attempts JSON parsing and maps the resulting data fields (title, summary, topic) back into the main n8n item structure.

Append row in sheet (Google Sheets n8n node):
Function: Writes the final, summarized, and structured data into the designated output sheet.
Key Configuration: Mapping defines which structured fields (e.g., {{ $json.title }}, {{ $json.short
summary }}) map to which columns in the output sheet.

Related n8n Workflows

Free

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

CRM consultant and content creator helping businesses streamline customer management, automate workflows, and boost growth through smart integration

Featured*