Host Your Own AI Deep Research Agent with n8n, Apify and OpenAI o3

2. Ask Clarifying Questions [Read more about form nodes](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.form/) To handle the clarification questions generated by the LLM, I used the same technique found in my "AI Interviewer" template ([link](https://n8n.io/workflows/2566-conversational-interviews-with-ai-agents-and-n8n-forms/)). This involves a looping of dynamically generated forms to collect answers from the user.

Workflow Structure (66 nodes)
100%
Form Trigger
On form submission
Form
Research Request
Set
Set Variables
Langchain.lm Chat Open Ai
OpenAI Chat Model2
Langchain.chain Llm
Clarifying Questions
Notion
Get Existing Row
Langchain.output Parser Structured
Structured Output Parser1
Notion
Set In-Progress
Split Out
Feedback to Items
Set
Set Initial Query
Split In Batches
For Each Question...
Execute Workflow
Generate Learnings
Form
Ask Clarity Questions
Set
Get Initial Query
Set
Accumulate Results
If
Is Depth Reached?
Langchain.lm Chat Open Ai
OpenAI Chat Model4
Langchain.chain Llm
Report Page Generator
Langchain.output Parser Structured
Structured Output Parser4
Set
Get Research Results
Notion
Create Row
Execute Workflow
Generate Report
Execute Workflow
Initiate DeepResearch
Form
Confirmation
Form
End Form
Execute Workflow Trigger
DeepResearch Subworkflow
Execution Data
Execution Data
Switch
JobType Router
Langchain.chain Llm
Generate SERP Queries
Langchain.lm Chat Open Ai
OpenAI Chat Model3
Notion
Get Existing Row1
Langchain.lm Chat Open Ai
OpenAI Chat Model1
Langchain.output Parser Structured
Structured Output Parser2
Langchain.chain Llm
DeepResearch Report
Split Out
SERP to Items
Split In Batches
For Each Query...
Markdown
Convert to HTML
No Op
Item Ref
Aggregate
Combine & Send back to Loop
Set
HTML to Array
Http Request
Web Search
Split Out
Tags to Items
Set
Top 5 Organic Results
Langchain.lm Chat Google Gemini
Google Gemini Chat Model
Langchain.chain Llm
Notion Block Generator
Set
DeepResearch Results
If
Has Results?
Split Out
Results to Items
Split Out
URLs to Items
Set
Parse JSON blocks
Set
Set Next Queries
Http Request
Page Contents
Filter
Valid Pages
Filter
Valid Blocks
Code
URL Sources to Lists
If
Has Content?
Merge
Append Blocks
Set
Empty Response
Markdown
Convert to Markdown
Split In Batches
For Each Block...
Langchain.lm Chat Open Ai
OpenAI Chat Model
Langchain.chain Llm
DeepResearch Learnings
Langchain.output Parser Structured
Structured Output Parser
Notion
Set Done
Http Request
Upload to Notion Page
Set
Research Goal + Learnings
Node Types:
default
transform
trigger
logic
http
action
code
Requires credentials

Prerequisites

Required Credentials (5)

Google Palm

Used by: Google Gemini Chat Model

Docs

HTTP Header Auth

Used by: Web Search

Docs

Http Query Auth

Used by: Web Search, Page Contents

Docs

Notion

Used by: Create Row, Get Existing Row +4 more

Docs

OpenAI

Used by: OpenAI Chat Model, OpenAI Chat Model1 +3 more

Docs

Multiple services required

This workflow needs 5 different credentials. Make sure you have accounts for all services before importing.

Complexity

Advanced

Expert level. Custom code, complex logic, many integrations.

Setup time: ~1 hour
Score: 100/100
Custom Code
Conditional Logic
Loops
11 Integrations

When to Use This Workflow

AI-Powered Content Creation

Automate content generation, summarization, or analysis using AI capabilities.

Save hours of manual work while maintaining quality and consistency.

Real-time Response

React instantly when events happen - new orders, form submissions, or API calls.

Zero delay between trigger and action for time-sensitive workflows.

Error Reduction

Eliminate human error from routine processes with consistent automation.

Improve accuracy and reliability across your workflows.

workflow.json
{
  "meta": {
    "instanceId": "408f9fb9940c3cb18ffdef0e0150fe342d6e655c3a9fac21f0f644e8bedabcd9",
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "645ae2b1-799e-49be-8bdf-12cd1bb739e6",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        1680,
        1140
      ],
      "parameters": {
        "schemaType": "manual",
        "inputSchema": "{\n \"type\": \"object\",\n \"properties\": {\n \"learnings\": {\n \"type\": \"array\",\n \"description\": \"List of learnings, max of 3.\",\n \"items\": { \"type\": \"string\" }\n },\n \"followUpQuestions\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\",\n \"description\": \"List of follow-up questions to research the topic further, max of 3.\"\n }\n }\n }\n}"
      },
      "typeVersion": 1.2
    },
...

Workflow Details

Nodes
87
Trigger
Event
Source
awesome
Added
Dec 4, 2025

Need Help?

Check out the official n8n documentation for detailed guides.

Related Workflows

πŸ€–πŸ§‘β€πŸ’» AI Agent for Top n8n Creators Leaderboard Reporting

AI Agent for n8n Creator Leaderboard Stats https://github.com/teds-tech-talks/n8n-community-leaderboard

Http-request
Lmchatopenai
Executeworkflow
Toolworkflow
49 nodesEvent
Curated

Intelligent Web Query and Semantic Re-Ranking Flow

Step 1. Set Up a Free Brave Web Search Query API Key To attain the free web search API tier from Brave, follow these ste...

Webhook
Outputparserautofixing
Outputparserstructured
Chainllm
20 nodesWebhook
Curated

πŸ”πŸ› οΈPerplexity Researcher to HTML Web Page

Create Article from Perplexity Research

Lmchatopenai
Outputparserstructured
Webhook
Telegram
47 nodesWebhook
Curated

Enrich Property Inventory Survey with Image Recognition and AI Agent

1. Use Airtable to Capture Survey Photos [Read more about AirTable](https://docs.n8n.io/integrations/builtin/app-nodes/n...

Lmchatopenai
Airtable
Executeworkflow
Http-request
29 nodesEvent
Curated

HR-focused automation pipeline with AI

HR Expert This workflow automates the process of handling job applications by extracting relevant information from submi...

Form
Informationextractor
Chainsummarization
Google-sheets
18 nodesEvent
Curated

Actioning Your Meeting Next Steps using Transcripts and AI

4. This Tool Creates Calendar Events This tool, given event details and a list of attendees, will create a new Google ca...

Lmchatopenai
Http-request
Google-drive
Google-calendar
28 nodesEvent
Curated