Automated Research Report Generation with OpenAI, Wikipedia, Google Search, and Gmail/Telegram
Configured with Agent, Aggregate, Execute Workflow Trigger, Gmail, and additional nodes. Review the connections and setup before adapting this template.
Node categories in this workflow
- AI & models
- Data store
- Web / API
- Transform
- Code
- Messaging
- Trigger
- Files / media
- Routing
Icons describe general node roles, inferred from node types. Inspect the parameters for the configured action.
Drag to pan; use + and − to zoom. Reconstructed from the exported node positions; nothing runs here. Dashed lines represent non-main connections. Full node names and notes appear below.
How it works
The exported workflow contains the following configured nodes. Their connections are shown above; inspect the JSON for the complete logic, expressions, and external actions.
| Node | Category | Type | Operation |
|---|---|---|---|
| OpenAI Chat Model | AI & models | OpenAI Chat Model | See node parameters |
| Simple Memory | Data store | Memory Buffer Window | See node parameters |
| Search News | Web / API | Tool Http Request | See node parameters |
| Wikipedia | Web / API | Tool Http Request | See node parameters |
| OpenAI Chat Model1 | AI & models | OpenAI Chat Model | See node parameters |
| Query Refiner | AI & models | Agent | See node parameters |
| Research AI Agent | AI & models | Agent | See node parameters |
| Google Search Web | Web / API | Tool Http Request | See node parameters |
| SerpApi | Web / API | Tool Http Request | See node parameters |
| Structured Output Parser | Transform | Output Parser Structured | See node parameters |
| Split Out | Transform | Split Out | See node parameters |
| Input Validation | Code | Code | See node parameters |
| Parse Research Output | Code | Code | See node parameters |
| Merge Split Items | Code | Code | See node parameters |
| Store Research Metadata | Data store | Google Sheets | append |
| Generate PDF HTML | Code | Code | See node parameters |
| Convert HTML to PDF | Web / API | HTTP Request | POST |
| Aggregate | Transform | Aggregate | See node parameters |
| Download PDF | Web / API | HTTP Request | See node parameters |
| Send Research to Gmail | Messaging | Gmail | See node parameters |
| When clicking ‘Test workflow’ | Trigger | Manual Trigger | See node parameters |
| Send PDF | Messaging | Telegram | sendDocument |
| Executed by Main AI Agent | Trigger | Execute Workflow Trigger | See node parameters |
| Search Folder | Files / media | Google Drive | fileFolder |
| If | Routing | If | See node parameters |
Setup
- Download the JSON and import it into an isolated n8n instance. Leave the workflow inactive.
- Connect your own credentials through n8n’s credential store. Replace
REPLACE_WITH_*values with your resource identifiers. - Inspect API destinations, Code nodes, database queries, file paths, and outbound actions.
- Run with synthetic data and harmless destinations. Enable triggers only after checking the actual outputs.
Requirements
An n8n instance with the listed node types and compatible versions. Service-connected workflows may require accounts, credentials, or paid APIs.
Credential types declared in the source
gmailOAuth2googleDriveOAuth2ApigoogleSheetsOAuth2ApiopenAiApiserpApitelegramApi
Workflow notes
📋 Research Report Workflow 🧠💻
📋 Research Report Workflow 🧠💻
This workflow generates a professional PDF research report on a given topic, sends it via Telegram, and emails🚀
🔍 Query Refiner
- What it does: Refines the input topic for better readability. 🧹
- Input: Topic from the HTTP Request (e.g., "the best ai models 2025").
- Output: Formatted topic (e.g., "The Best AI Models 2025").
- ✨ Detail: Capitalizes words and ensures "AI" is uppercase.
📊 Aggregate Research Data
- What it does: Collects research data for the topic. 📚
- Input: Refined topic.
- Output: Research data (introduction, summary, key findings, etc.) with a timestamp.
- ⏰ Note: The timestamp is used to date the report.
🔗 Merge Split Items
- What it does: Combines and organizes research data into sections. 🗂️
- Input: Data from Aggregate Research Data.
- Output: Structured JSON with sections like
introduction,key_findings,sources. - 📑 Purpose: Prepares data for the PDF report.
📝 Generate PDF HTML
- What it does: Creates an HTML template for the PDF report. 🖥️
- Input: Refined topic and research data.
- Output: HTML content, file name (e.g.,
research-report-the-best-ai-models-2025-2025-04-09.pdf), and formatted date. - 🎨 Features:
- Professional styling (Helvetica, Georgia fonts, deep blue accents).
- Sections: Cover page, introduction, summary, key findings, etc.
- Escapes special characters to prevent HTML errors.
- ⏳ Timestamp Fix: Stores
rawTimestampandformattedDate(e.g., "April 9, 2025").
📄 Convert HTML to PDF (PDFShift)
- What it does: Converts the HTML to a PDF using the PDFShift API. 🖨️
- Input: HTML content from the previous node.
- Output: JSON response with a URL to the generated PDF.
- 🔑 Requirement: Needs a valid PDFShift API key.
- ⚠️ Note: Outputs a URL, not the PDF binary data.
⬇️ Download PDF
- What it does: Downloads the PDF from the URL provided by PDFShift. 📥
- Input: PDF URL from the Convert HTML to PDF node.
- Output: Binary PDF data (MIME type:
application/pdf, ~98 KB). - 📛 File Name: Uses the file name from the previous node (e.g.,
research-report-the-best-ai-models-2025-2025-04-09.pdf).
📱 Gmail/Telegram
- What it does: Sends the PDF to a Gmail/Telegram chat. 💬
- Input: PDF binary data and metadata (topic, formatted date).
- Output: Sends the PDF as a document to the specified chat.
- 📝 Caption:
Automated Research Report Generation with OpenAI, Wikipedia, Google Search, and Gmail/Telegram
Automated Research Report Generation with OpenAI, Wikipedia, Google Search, and Gmail/Telegram
Purpose and structure
This folder contains the Automated Research Report Generation with OpenAI, Wikipedia, Google Search, and Gmail/Telegram workflow. Its executable nodes use agent, aggregate, code, executeWorkflowTrigger, gmail, googleDrive, googleSheets, httpRequest, if, lmChatOpenAi, manualTrigger, memoryBufferWindow, outputParserStructured, splitOut, telegram, toolHttpRequest. The table and connection map below are derived from the JSON, not an inferred guarantee of behavior.
Setup
Import inactive. Configure your own credentials and replace REPLACE_WITH_* values. Review external destinations and Code nodes before running.
Entry points
When clicking ‘Test workflow’, Executed by Main AI Agent
Verification
Sanitized source candidate; not runtime-tested. This overview is generated from node metadata. Read the folder README for the connection map, credential types, and license.
Attribution
https://github.com/Zie619/n8n-workflows/blob/94007c1445d9258a7da116646b79473e7c7c3282/workflows/Telegram/1341_Telegram_Splitout_Automate_Webhook.json MIT; preserve source notices.