AI · Automation 2025 Completed

AI Deep Research Agent — Automated Research Report Generator

A multi-agent n8n workflow that turns any topic into a cited, multi-chapter research report using Tavily web search and OpenAI models, then delivers it as a PDF by email.

Built by Redoan Uzzaman, Full-Stack Developer & AI Engineer.

AI Deep Research Agent — Automated Research Report Generator

Overview

This project automates the process of producing a structured research report on any topic. A user submits a subject through a web form, and the workflow returns a professionally formatted, fully cited PDF to their inbox.

How it works

After the form submission, an AI agent refines the topic into a focused research scope and a row is created in Google Sheets, which acts as the working store for every intermediate result. Another agent writes the report title and introduction.

The workflow then runs a Tavily search at advanced depth and takes the top five sources. Each source is numbered and handed to a chapter-writing agent that produces a chapter with in-text citations; the chapters are aggregated and merged with their sources. Further AI steps extract section titles, generate an HTML source list with clickable references and build a hierarchical table of contents, with each stage saved back to the sheet.

Finally, the complete report is read back from Google Sheets, assembled into styled HTML, converted to PDF through the APITemplate.io API, downloaded and emailed via Gmail as an attachment. The agents use OpenAI's o3-mini and GPT-4.1-mini with structured output parsers to keep each step's results consistent.

Key Features

  • Simple web form for topic submission
  • AI topic refinement and scoping
  • Tavily web research across top five sources
  • Multi-agent chapter writing with in-text citations
  • Auto-generated table of contents and clickable source list
  • Google Sheets as a stage-by-stage progress store
  • PDF generation via APITemplate.io and Gmail delivery

Tech Stack

  • n8n
  • OpenAI o3-mini
  • OpenAI GPT-4.1-mini
  • Tavily
  • Google Sheets API
  • Gmail API
  • APITemplate.io
  • HTML/CSS

Want something like this built?

Redoan Uzzaman takes on AI, automation and full-stack projects for clients worldwide.