Skip to main content

Automated research report generation with AI, Wiki, Search & Gmail/Telegram

Workflow preview

Workflow preview
100%
Automated research report generation with AI, Wiki, Search & Gmail/Telegram preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

Automated Research Report Generation with OpenAI, Wikipedia, Google Search, Gmail/Telegram and PDF Output Description What Problem Does This Solve? ️ This workflow automates the process of genera...

Best for

  • Content Creation automation workflows
  • AI RAG automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

@n8n/n8n-nodes-langchain.lmchatopenai, @n8n/n8n-nodes-langchain.memorybufferwindow, @n8n/n8n-nodes-langchain.toolhttprequest, @n8n/n8n-nodes-langchain.agent, @n8n/n8n-nodes-langchain.outputparserstructured, n8n-nodes-base.splitout, n8n-nodes-base.code, n8n-nodes-base.googlesheets

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Immanuel.

Original n8n.io source

1.1 Workflow description

Title
Automated research report generation with AI, Wiki, Search & Gmail/Telegram
Workflow name
Automated research report generation with AI, Wiki, Search & Gmail/Telegram

Automated Research Report Generation with OpenAI, Wikipedia, Google Search, Gmail/Telegram and PDF Output


Description

What Problem Does This Solve? 🛠️

This workflow automates the process of generating professional research reports for researchers, students, and professionals. It eliminates manual research and report formatting by aggregating data, generating content with AI, and delivering the report as a PDF via Gmail or Telegram. Target audience: Researchers, students, educators, and professionals needing quick, formatted research reports.

What Does It Do? 🌟

  • Aggregates research data from Wikipedia, Google Search, and SerpApi.
  • Refines user queries and generates structured content using OpenAI.
  • Converts the content into a professional HTML report, then to PDF.
  • Sends the PDF report via Gmail or Telegram.

Key Features 📋

  • Real-time data aggregation from multiple sources.
  • AI-driven content generation with OpenAI.
  • Automated HTML-to-PDF conversion for professional reports.
  • Flexible delivery via Gmail or Telegram.
  • Error handling for robust execution.

Setup Instructions

Prerequisites ⚙️

  • n8n Instance: Self-hosted or cloud n8n instance.
  • API Credentials:
    • OpenAI API: API key with GPT model access, stored in n8n credentials.
    • SerpApi (Google Search): API key from SerpApi, stored in n8n credentials (do not hardcode in nodes).
    • Gmail API: Credentials from Google Cloud Console with Gmail scope.
    • Telegram API: Bot token from BotFather on Telegram.

Installation Steps 📦

  1. Import the Workflow:
    • Copy the workflow JSON from the "Template Code" section below.
    • Import it into n8n via "Import from File" or "Import from URL".
  2. Configure Credentials:
    • Add API credentials in n8n’s Credentials section for OpenAI, SerpApi, Gmail, and Telegram.
    • Assign credentials to respective nodes. For example:
      • In the SerpApi Google Search node, use n8n credentials for SerpApi: api_key={{ $credentials.SerpApiKey }}.
      • In the Send Research PDF on Gmail node, use Gmail credentials.
      • In the Send PDF to Telegram node, use Telegram bot credentials.
  3. Set Up Nodes:
    • OpenAI Nodes (Research AI Agent, OpenAI Chat Model, OpenAI Chat Middle Memory): Update the model (e.g., gpt-4o) and prompt as needed.
    • Input Validation (Input Validation node): Ensure your input query format matches the expected structure (e.g., topic: "AI ethics").
    • Delivery Options (Send Research PDF on Gmail, Send PDF to Telegram): Configure recipient email or Telegram chat ID.
  4. Test the Workflow:
    • Run the workflow by clicking the "Test Workflow" node.
    • Verify that the research report PDF is generated and sent via Gmail or Telegram.

How It Works

High-Level Steps 🔍

  • Query Refinement: Refines the input query for better research.
  • Aggregate Data: Fetches data from Wikipedia, Google Search, and SerpApi.
  • Generate Report: Uses OpenAI to create a structured report.
  • Convert to PDF: Converts the report to HTML, then PDF.
  • Deliver Report: Sends the PDF via Gmail or Telegram.

Detailed descriptions are available in the sticky notes within the workflow screenshot above.


Node Names and Actions

Research and Report Generation

  • Test Workflow: Triggers the workflow for testing.
  • Input Validation: Validates the input query.
  • Query Refiner: Refines the query for better results.
  • Research AI Agent: Coordinates research using OpenAI.
  • OpenAI Chat Model: Generates content for the report.
  • Structured Output Parser: Parses OpenAI output into structured data.
  • OpenAI Chat Middle Memory: Retains context during research.
  • Wikipedia Google Search: Fetches data from Wikipedia.
  • SerpApi Google Search: Fetches data via SerpApi.
  • Merge Split Items: Merges data from multiple sources.
  • Aggregate: Aggregates all research data.
  • Generate PDF HTML: Creates an HTML report.
  • Convert HTML to PDF: Converts HTML to PDF.
  • Download PDF: Downloads the PDF file.
  • Send PDF to Telegram: Sends the PDF via Telegram.
  • Send Research PDF on Gmail: Sends the PDF via Gmail.

Customization Tips

  • Expand Data Sources 📡: Add more sources (e.g., academic databases) by adding nodes to Merge Split Items.
  • Change Report Style ✍️: Update the Generate PDF HTML node to modify the HTML template (e.g., adjust styling or sections).
  • Alternative Delivery 📧: Add nodes to send the PDF via other platforms (e.g., Slack).
  • Adjust AI Model 🧠: Modify the OpenAI Chat Model node to use a different model (e.g., gpt-3.5-turbo).

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - OpenAI Chat Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.2

Block 2 - Simple Memory

Type / Role
@n8n/n8n-nodes-langchain.memoryBufferWindow - memoryBufferWindow
Config choices
Version 1.3

Block 3 - Search News

Type / Role
@n8n/n8n-nodes-langchain.toolHttpRequest - toolHttpRequest
Config choices
Version 1.1

Block 4 - Wikipedia

Type / Role
@n8n/n8n-nodes-langchain.toolHttpRequest - toolHttpRequest
Config choices
Version 1.1

Block 5 - OpenAI Chat Model1

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.2

Block 6 - Query Refiner

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 1.8

Block 7 - Research AI Agent

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 1.8

Block 8 - Google Search Web

Type / Role
@n8n/n8n-nodes-langchain.toolHttpRequest - toolHttpRequest
Config choices
Version 1.1

Block 9 - SerpApi

Type / Role
@n8n/n8n-nodes-langchain.toolHttpRequest - toolHttpRequest
Config choices
Version 1.1

Block 10 - Structured Output Parser

Type / Role
@n8n/n8n-nodes-langchain.outputParserStructured - outputParserStructured
Config choices
Version 1.2

Block 11 - Split Out

Type / Role
n8n-nodes-base.splitOut - splitOut
Config choices
Version 1

Block 12 - Input Validation

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 13 - Parse Research Output

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 14 - Merge Split Items

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 15 - Store Research Metadata

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.5

Block 16 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 17 - Generate PDF HTML

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 18 - Convert HTML to PDF

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 19 - Aggregate

Type / Role
n8n-nodes-base.aggregate - aggregate
Config choices
Version 1

Block 20 - Download PDF

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 21 - Send Research to Gmail

Type / Role
n8n-nodes-base.gmail - gmail
Config choices
Version 2.1

Block 22 - When clicking ‘Test workflow’

Type / Role
n8n-nodes-base.manualTrigger - manualTrigger
Config choices
Version 1

Block 23 - Send PDF

Type / Role
n8n-nodes-base.telegram - telegram
Config choices
Version 1.2

Block 24 - Executed by Main AI Agent

Type / Role
n8n-nodes-base.executeWorkflowTrigger - executeWorkflowTrigger
Config choices
Version 1.1

Showing the first 24 of 26 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Automated research report generation with AI, Wiki, Search & Gmail/Telegram
Complexity advanced
Nodes 26
Categories Content Creation, AI RAG
Author Immanuel
Published 16 Apr 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/3579/3579.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Automated research report generation with AI, Wiki, Search & Gmail/Telegram do?

Automated Research Report Generation with OpenAI, Wikipedia, Google Search, Gmail/Telegram and PDF Output Description What Problem Does This Solve? ️ This workflow automates the process of genera...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Content Creation, AI RAG use case.