Host your own AI deep research agent with n8n, Apify and OpenAI o3
Ready for 3.0What this workflow does
This AI workflow has 64 nodes and runs when someone submits an n8n form (“ DeepResearcher”) (plus 1 other trigger). Along the way it connects OpenAI Chat Model, Notion and Google Gemini Chat Model. It also calls api.apify.com over HTTP.
How it runs
Trigger: When someone submits an n8n form (“ DeepResearcher”) (plus 1 other trigger).
- Research Request (n8n Form): shows the next form page
- Execution Data: uses Execution Data
- Set Variables (Edit Fields (Set)): sets 4 fields: request_id, prompt, depth…
- JobType Router (Switch): routes items into 3 branches
- Clarifying Questions (Basic LLM Chain): sends a prompt to an LLM, with model: OpenAI Chat Model; output parser: Structured Output Parser
- Get Existing Row (Notion): get many (database page)
- Generate SERP Queries (Basic LLM Chain): sends a prompt to an LLM, with model: OpenAI Chat Model; output parser: Structured Output Parser
- Get Existing Row (Notion): get many (database page)
- Feedback to Items (Split Out): splits a list into separate items
- Set In-Progress (Notion): update (database page)
…plus 41 more steps. See the full node list below.
Services it uses
HTTP calls to: api.apify.com
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (23)
- Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured - Edit Fields (Set)
n8n-nodes-base.set - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - n8n Form Trigger
n8n-nodes-base.formTrigger - Basic LLM Chain
@n8n/n8n-nodes-langchain.chainLlm - Split Out
n8n-nodes-base.splitOut - No Operation, do nothing
n8n-nodes-base.noOp - Loop Over Items (Split in Batches)
n8n-nodes-base.splitInBatches - n8n Form
n8n-nodes-base.form - Execute Workflow Trigger
n8n-nodes-base.executeWorkflowTrigger - Execute Sub-workflow
n8n-nodes-base.executeWorkflow - Execution Data
n8n-nodes-base.executionData - Switch
n8n-nodes-base.switch - Notion
n8n-nodes-base.notion - If
n8n-nodes-base.if - Markdown
n8n-nodes-base.markdown - Google Gemini Chat Model
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - HTTP Request
n8n-nodes-base.httpRequest - Filter
n8n-nodes-base.filter - Merge
n8n-nodes-base.merge - Code
n8n-nodes-base.code - Aggregate
n8n-nodes-base.aggregate - Stop and Error
n8n-nodes-base.stopAndError
From the author
This template attempts to replicate OpenAI's DeepResearch feature which, at time of writing, is only available to their pro subscribers. > An agent that uses reasoning to synthesize large amount of online information and complete multi-step research tasks…