Autonomous AI Deep Research and Report Generator - n8n Workflow

Create a powerful n8n workflow for autonomous AI research using OpenRouter, SerpAPI, and Jina AI. Generate comprehensive, structured reports from any user query.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

Data Scientists & Analysts: Need to quickly aggregate information from multiple web sources.
Content Creators & Journalists: Require fast, deep background research for articles or reports.
n8n Automation Experts: Looking for advanced examples of chaining LLM agents, web scraping, and custom logic using the n8n node ecosystem.
Developers: Interested in utilizing specialized AI APIs (SerpAPI, Jina AI, OpenRouter) within a unified n8n workflow.

Overview

The challenge in web research is efficiently sifting through numerous search results to find relevant context and synthesize a cohesive answer. This advanced n8n workflow solves this by leveraging specialized AI tools.

It starts with a simple query via an n8n trigger and autonomously generates optimized search terms, performs real-time searches using SerpAPI, extracts clean webpage content using Jina AI, and utilizes multiple LLM agents (via OpenRouter) to extract relevant facts and compile a final, structured research report. This robust n8n template demonstrates sophisticated use of core n8n nodes combined with powerful external APIs, creating a truly autonomous research agent.

How it Works

This powerful n8n workflow operates in several distinct phases, ensuring deep research and precise context extraction.


  1. Trigger & Query Generation: The process begins with the Chat Message Trigger, which accepts the user's research query. The Generate Search Queries using LLM Langchain n8n node then uses the LLM (OpenRouter) to transform the single query into four specialized search strings.

  2. Data Preparation: The Parse and Chunk JSON Data n8n node cleans and parses the LLM's response, preparing the queries for parallel search execution via the Split Data for SerpAPI Batching n8n node.

  3. Web Search: The Perform SerpAPI Search Request n8n node executes the batched searches, gathering organic search result links.

  4. Formatting & Content Fetching: The Format SerpAPI Organic Results n8n node cleans the results, extracting key URLs. The subsequent Split Data for Jina AI Batching n8n node prepares these URLs for bulk processing. The Perform Jina AI Analysis Request n8n node then uses the Jina AI Reader API to scrape the clean, main content of each linked webpage.

  5. Context Extraction: The Extract Relevant Context via LLM Langchain n8n node takes the full webpage text and instructs the LLM to identify and extract only the specific text relevant to the original user queries, discarding noise. This step utilizes the LLM Memory Buffer (Input Context) n8n node for conversational context if needed.

  6. Report Generation: Finally, the gathered, relevant contexts are merged. The Generate Comprehensive Research Report Langchain n8n node uses the LLM, augmented by the optional Fetch Wikipedia Information tool, to synthesize the facts into a comprehensive, well-structured Markdown report, completing this complex n8n workflow.

Installation Guide

To deploy this expert autonomous research n8n workflow, follow these steps:


  1. Import: Copy the provided JSON code and paste it into your n8n canvas via the 'New' menu > 'Import from JSON'. This provides you with the complete n8n template.

  2. SerpAPI Setup: Create a new SerpAPI credential in n8n using your API key (as noted in the Sticky Note).

  3. Jina AI Setup: Create a new HTTP Header Auth credential for Jina AI, using your API key as the token.

  4. OpenRouter Setup: Create a new OpenRouter credential in n8n using your OpenRouter API key. This credential is linked to all the core Langchain n8n node components.

  5. Activation: Once all credentials are set, activate the Chat Message Trigger n8n trigger to enable the workflow via its webhook. You can test the n8n workflow by sending a POST request to the provided webhook URL with a simple text query in the payload.

Node Details

Chat Message Trigger: The starting point or n8n trigger for the automation. It listens for an incoming HTTP request containing the user's research query.
Generate Search Queries using LLM (Langchain Chain): Function: Instructs the LLM (using the OpenRouter API connection) to generate a JSON array of specific search terms based on the user's input.
Parse and Chunk JSON Data (Code n8n node): Function: Critically cleans the text output from the LLM, parses the JSON array of queries, and structures the data items for parallel processing through n8n's internal data flow.
Perform SerpAPI Search Request (HTTP Request n8n node): Function: Executes the web search for each generated query. Key Configuration: Uses query parameters q (the search term) and api_key (SerpAPI credential).
Perform Jina AI Analysis Request (HTTP Request n8n node): Function: Fetches and cleans the full text content of the search result URLs. Key Configuration: Uses the Jina AI endpoint https://r.jina.ai/ combined with the URL input.
Extract Relevant Context via LLM (Langchain Agent n8n node): Function: Acts as an expert information extractor. It filters the verbose Jina AI content, retaining only data relevant to the original prompt. Uses LLM Memory Buffer (Input Context) to maintain continuity.


  • Generate Comprehensive Research Report (Langchain Agent n8n node): Function: The final LLM agent tasked with synthesizing all extracted contexts into a professional, structured Markdown report. It is configured with a detailed system message for formatting and optionally uses the Fetch Wikipedia Information n8n node as a fallback tool.

Related n8n Workflows

Free

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

Featured*