深度研究智能体
高级
这是一个Market Research, Multimodal AI领域的自动化工作流,包含 43 个节点。主要使用 Set, Code, Filter, Notion, Switch 等节点。 深度研究智能体 - 自动化研究与 Notion 报告生成器
前置要求
- •Notion API Key
- •HTTP Webhook 端点(n8n 会自动生成)
- •可能需要目标 API 的认证凭证
- •OpenAI API Key
- •Google Gemini API Key
使用的节点 (43)
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"id": "nKxX4LgQ12KWv18t",
"meta": {
"instanceId": "ade7e20aad77e0a552d206f839739da695af286a3148c41c951c915d6af91ebc"
},
"name": "深度研究智能体",
"tags": [],
"nodes": [
{
"id": "6043ae3c-caaf-464e-8883-329b8ebbe188",
"name": "简单记忆",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"position": [
-496,
464
],
"parameters": {
"sessionKey": "={{ $json?.message?.chat?.id || $json?.body?.session_id }}",
"sessionIdType": "customKey",
"contextWindowLength": 10
},
"typeVersion": 1.3
},
{
"id": "fe701b28-b35c-475c-ac3f-8d640e5fe7c5",
"name": "结构化输出解析器",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
-352,
464
],
"parameters": {
"schemaType": "manual",
"inputSchema": "{\n \"is_pass_next\" : \"boolean\",\n \"message\" : \"string\"\n}"
},
"typeVersion": 1.2
},
{
"id": "c8c06a2e-6386-44b2-acbf-a8006f07302f",
"name": "切换",
"type": "n8n-nodes-base.switch",
"position": [
-240,
240
],
"parameters": {
"rules": {
"values": [
{
"outputKey": "Feedback",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "9e5f68a3-6af4-48ce-9bf6-6c6e06236301",
"operator": {
"type": "boolean",
"operation": "false",
"singleValue": true
},
"leftValue": "={{ $json.output.is_pass_next }}",
"rightValue": ""
}
]
},
"renameOutput": true
},
{
"outputKey": "Pass",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "ac64b26c-d9e6-48a1-9fff-8b85156725b2",
"operator": {
"type": "boolean",
"operation": "true",
"singleValue": true
},
"leftValue": "={{ $json.output.is_pass_next }}",
"rightValue": ""
}
]
},
"renameOutput": true
}
]
},
"options": {}
},
"typeVersion": 3.2
},
{
"id": "d7c2c361-1be6-42ce-8738-cdd82c8f0edc",
"name": "策略智能体",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
-576,
240
],
"parameters": {
"text": "=You are the research and planning agent. Your role is to help users plan high-quality research content — quickly, clearly, and efficiently.\n\nUser input: {{ $json?.message?.text || $json?.body?.message}}\n\n🌟 Your Mission:\nAfter greeting message ask what user want to research about. Just ask What would you like to research?\n\nGiven the following research topic from the user, ask some follow up questions to clarify the research direction. Return a maximum of 3 questions, but feel free to return less if the original query is clear. Ask all questions one by one.\n\nAfter clarity questions send draft for user to confirm. \n\n🧠 OUTPUT FORMAT (Always use this JSON output structure):\n\nIf needs feedback or clarity from user: \n\n{\n \"is_pass_next\": false,\n \"message\": \"message\"\n}\n\nIf strategy is ready for confirmation:\n{\n \"is_pass_next\": false,\n \"message\": \"Here’s your research plan draft:\"\n}\n\n🚀 If user confirms:\n{\n \"is_pass_next\": true,\n \"message\": \"The research plan is as follow:\",\n}\n\nToday's date : {{ $now }}",
"options": {},
"promptType": "define",
"hasOutputParser": true
},
"typeVersion": 1.8
},
{
"id": "31a933c3-f158-4d67-afdd-e5cdcdae400c",
"name": "搜索查询智能体",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
864,
336
],
"parameters": {
"text": "=Given the following prompt from the user, generate a list of SERP queries to research the topic.\nReduce the number of words in each query to its keywords only.\nReturn a maximum of 3 queries, but feel free to return less if the original prompt is clear. Make sure each query is unique and not similar to each other: <prompt>{{ $('Switch').item.json.output.message }}</prompt>",
"options": {},
"promptType": "define",
"hasOutputParser": true
},
"typeVersion": 1.8
},
{
"id": "f45ffc9d-d0a7-4911-9941-2c91b7afb040",
"name": "结构化输出解析器1",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
1056,
528
],
"parameters": {
"schemaType": "manual",
"inputSchema": "{\n \"type\": \"object\",\n \"properties\": {\n \"queries\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"query\": {\n \"type\": \"string\",\n \"description\": \"The SERP query\"\n },\n \"researchGoal\": {\n \"type\": \"string\",\n \"description\": \"First talk about the goal of the research that this query is meant to accomplish, then go deeper into how to advance the research once the results are found, mention additional research directions. Be as specific as possible, especially for additional research directions.\"\n }\n }\n }\n }\n }\n}"
},
"typeVersion": 1.2
},
{
"id": "54f2196a-8a6f-4ccf-9065-f55124e13bd8",
"name": "拆分输出",
"type": "n8n-nodes-base.splitOut",
"position": [
1232,
448
],
"parameters": {
"options": {},
"fieldToSplitOut": "output.queries"
},
"typeVersion": 1
},
{
"id": "b393662d-b263-4f50-84d9-5ffe151de982",
"name": "循环遍历查询",
"type": "n8n-nodes-base.splitInBatches",
"position": [
1408,
448
],
"parameters": {
"options": {}
},
"typeVersion": 3
},
{
"id": "52aafb1c-f41f-4c4d-a219-a8454359f2e9",
"name": "HTTP请求",
"type": "n8n-nodes-base.httpRequest",
"position": [
1632,
544
],
"parameters": {
"url": "https://api.tavily.com/search",
"method": "POST",
"options": {},
"sendBody": true,
"authentication": "genericCredentialType",
"bodyParameters": {
"parameters": [
{
"name": "query",
"value": "={{ $json.query }}"
}
]
},
"genericAuthType": "httpCustomAuth"
},
"typeVersion": 4.2
},
{
"id": "b8c9f466-cac6-4208-bfa1-5bba645bb345",
"name": "编辑字段",
"type": "n8n-nodes-base.set",
"position": [
1856,
544
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "00d1543a-0036-43a3-8034-14bc29317218",
"name": "tavily_results",
"type": "string",
"value": "={{ $json.results }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "1ab76c27-4a42-44f1-93fc-d543bac471d0",
"name": "OpenAI",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
2048,
544
],
"parameters": {
"modelId": {
"__rl": true,
"mode": "list",
"value": "gpt-4.1-mini",
"cachedResultName": "GPT-4.1-MINI"
},
"options": {},
"messages": {
"values": [
{
"content": "=You are an intelligent assistant. A user has asked the following query:\n\n[Search Query]: {{ $('HTTP Request').item.json.query }}\n\nBelow is the draft for research that user has passed: {{ $('Switch').item.json.output.message }}\n\nBelow are the search results retrieved from the internet (from Tavily):\n\n{{ $json.tavily_results }}\n\nEach result includes a title, URL, and content. From these, choose the **single most relevant URL** that best matches the user's query. Focus on accuracy, relevance, and depth of the content. Only return the URL — do not include any explanation or extra text.\n\nreturn it like below JSON format: \n{\n final_url: \"url\"\n}\n"
}
]
},
"jsonOutput": true
},
"typeVersion": 1.8
},
{
"id": "0c0878e5-380a-4a42-a813-fca117493835",
"name": "HTTP 请求1",
"type": "n8n-nodes-base.httpRequest",
"position": [
2416,
544
],
"parameters": {
"url": "https://api.tavily.com/extract",
"method": "POST",
"options": {},
"sendBody": true,
"authentication": "genericCredentialType",
"bodyParameters": {
"parameters": [
{
"name": "urls",
"value": "={{ $json.message.content.final_url }}"
},
{
"name": "extract_depth",
"value": "advanced"
}
]
},
"genericAuthType": "httpCustomAuth"
},
"typeVersion": 4.2
},
{
"id": "ca0172ea-53a1-4de0-b494-395a30bf9bbe",
"name": "Aggregate",
"type": "n8n-nodes-base.aggregate",
"position": [
1616,
144
],
"parameters": {
"options": {},
"aggregate": "aggregateAllItemData"
},
"typeVersion": 1
},
{
"id": "9b08f0c7-1516-429e-ab33-69dfa9ee967f",
"name": "OpenAI1",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
336,
368
],
"parameters": {
"modelId": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini",
"cachedResultName": "GPT-4O-MINI"
},
"options": {},
"messages": {
"values": [
{
"content": "=You will be given research draft that user asked to you need to create title and description using this draft. \n\ndraft: {{ $('Switch').item.json.output.message }}\n\noutput using below json format: \n{\n \"title\": string,\n \"description\": string\n}"
}
]
},
"jsonOutput": true
},
"typeVersion": 1.8
},
{
"id": "cd496279-c0b7-43e3-83b0-8f9f09bd3662",
"name": "Notion",
"type": "n8n-nodes-base.notion",
"position": [
656,
384
],
"parameters": {
"title": "={{ $json.message.content.title }}",
"options": {},
"resource": "databasePage",
"databaseId": {
"__rl": true,
"mode": "list",
"value": "1f536e90-e9d0-805c-a1c1-f2fab42a8a7b",
"cachedResultUrl": "https://www.notion.so/1f536e90e9d0805ca1c1f2fab42a8a7b",
"cachedResultName": "n8n DeepResearch"
},
"propertiesUi": {
"propertyValues": [
{
"key": "Request ID|rich_text",
"textContent": "={{ $('Code').item.json.randomId.toString() }}"
},
{
"key": "Name|title",
"title": "={{ $json.message.content.title }}"
},
{
"key": "Description|rich_text",
"textContent": "={{ $json.message.content.description }}"
},
{
"key": "Created time|date",
"date": "={{ $now.toISO() }}"
},
{
"key": "Status|status",
"statusValue": "In progress"
}
]
}
},
"typeVersion": 2.2
},
{
"id": "1106292a-d120-42ef-83fa-f4bb21ad5d78",
"name": "Notion1",
"type": "n8n-nodes-base.notion",
"position": [
4128,
192
],
"parameters": {
"pageId": {
"__rl": true,
"mode": "id",
"value": "={{ $('Convert to HTML').item.json.id }}"
},
"options": {},
"resource": "databasePage",
"operation": "update",
"propertiesUi": {
"propertyValues": [
{
"key": "Status|status",
"statusValue": "Done"
},
{
"key": "Last Updated|date",
"date": "={{ $now.toISO() }}"
}
]
}
},
"typeVersion": 2.2
},
{
"id": "db6c3631-ca97-440f-96d2-8dee9db7524f",
"name": "HTTP 请求2",
"type": "n8n-nodes-base.httpRequest",
"position": [
3952,
352
],
"parameters": {
"url": "=https://api.notion.com/v1/blocks/{{ $('Convert to HTML').item.json.id }}/children",
"method": "PATCH",
"options": {
"timeout": "={{ 1000 * 60 }}"
},
"jsonBody": "={{\n{\n \"children\": $json.block\n}\n}}",
"sendBody": true,
"sendHeaders": true,
"specifyBody": "json",
"authentication": "predefinedCredentialType",
"headerParameters": {
"parameters": [
{
"name": "Notion-Version",
"value": "2022-06-28"
}
]
},
"nodeCredentialType": "notionApi"
},
"typeVersion": 4.2
},
{
"id": "1993f8af-a0c3-456c-bbce-60c2b681befa",
"name": "转换为 HTML",
"type": "n8n-nodes-base.markdown",
"position": [
2352,
160
],
"parameters": {
"mode": "markdownToHtml",
"options": {
"tables": true
},
"markdown": "={{ $('Report Agent').item.json.output }}"
},
"typeVersion": 1
},
{
"id": "1c80381d-c67c-4d57-999d-85e7fdc8e5b1",
"name": "HTML 转数组",
"type": "n8n-nodes-base.set",
"position": [
2576,
192
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "851b8a3f-c2d3-41ad-bf60-4e0e667f6c58",
"name": "tag",
"type": "array",
"value": "={{ $json.data.match(/<table[\\s\\S]*?<\\/table>|<ul[\\s\\S]*?<\\/ul>|<[^>]+>[^<]*<\\/[^>]+>/g) }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "a440531f-b5bf-4523-b43b-2d5211861be4",
"name": "标签转项目",
"type": "n8n-nodes-base.splitOut",
"position": [
2784,
192
],
"parameters": {
"options": {},
"fieldToSplitOut": "tag"
},
"typeVersion": 1
},
{
"id": "b615171d-56f1-4184-b9f0-23008728b89c",
"name": "Notion 块生成器",
"type": "@n8n/n8n-nodes-langchain.chainLlm",
"position": [
2960,
176
],
"parameters": {
"text": "={{ $json.tag.trim() }}",
"messages": {
"messageValues": [
{
"message": "=Convert the following html into its equivalent Notion Block as per Notion's API schema.\n* Ensure the content is always included and remains the same.\n* Return only a json response.\n* Generate child-level blocks. Should not define \"parent\" or \"children\" property.\n* Strongly prefer headings, paragraphs, tables and lists type blocks.\n* available headings are heading_1, heading_2 and heading_3 - h4,h5,h6 should use heading_3 type instead. ensure headings use the rich text definition.\n* ensure lists blocks include all list items.\n\n## Examples\n\n1. headings\n```\n<h3 id=\"references\">References</h3>\n```\nwould convert to \n```\n{\"object\": \"block\", \"type\": \"heading_3\", \"heading_3\": { \"rich_text\": [{\"type\": \"text\",\"text\": {\"content\": \"References\"}}]}}\n```\n\n2. lists\n```\n<ul><li>hello</li><li>world</li></ul>\n```\nwould convert to\n```\n[\n{\n \"object\": \"block\",\n \"type\": \"bulleted_list_item\",\n \"bulleted_list_item\": {\"rich_text\": [{\"type\": \"text\",\"text\": {\"content\": \"hello\"}}]}\n},\n{\n \"object\": \"block\",\n \"type\": \"bulleted_list_item\",\n \"bulleted_list_item\": {\"rich_text\": [{\"type\": \"text\",\"text\": {\"content\": \"world\"}}]}\n}\n]\n```\n\n3. tables\n```\n<table>\n <thead>\n <tr><th>Technology</th><th>Potential Impact</th></tr>\n </thead>\n <tbody>\n <tr>\n <td>5G Connectivity</td><td>Enables faster data speeds and advanced apps</td>\n </tr>\n </tbody>\n</table>\n```\nwould convert to\n```\n{\n \"object\": \"block\",\n \"type\": \"table\",\n \"table\": {\n \"table_width\": 2,\n \"has_column_header\": true,\n \"has_row_header\": false,\n \"children\": [\n {\n \"object\": \"block\",\n \"type\": \"table_row\",\n \"table_row\": {\n \"cells\": [\n [\n {\n \"type\": \"text\",\n \"text\": {\n \"content\": \"Technology\",\n \"link\": null\n }\n },\n {\n \"type\": \"text\",\n \"text\": {\n \"content\": \"Potential Impact\",\n \"link\": null\n }\n }\n ],\n [\n {\n \"type\": \"text\",\n \"text\": {\n \"content\": \"5G Connectivity\",\n \"link\": null\n }\n },\n {\n \"type\": \"text\",\n \"text\": {\n \"content\": \"Enables faster data speeds and advanced apps\",\n \"link\": null\n }\n }\n ]\n ]\n }\n }\n ]\n }\n}\n```\n4. anchor links\nSince Notion doesn't support anchor links, just convert them to rich text blocks instead.\n```\n<a href=\"#module-0-pre-course-setup-and-learning-principles\">Module 0: Pre-Course Setup and Learning Principles</a>\n```\nconverts to\n```\n{\n \"object\": \"block\",\n \"type\": \"paragraph\",\n \"paragraph\": {\n \"rich_text\": [\n {\n \"type\": \"text\",\n \"text\": {\n \"content\": \"Module 0: Pre-Course Setup and Learning Principles\"\n }\n }\n ]\n }\n}\n```\n5. Invalid html parts\nWhen the html is not syntax valid eg. orphaned closing tags, then just skip the conversion and use an empty rich text block.\n```\n</li>\\n</ol>\n```\ncan be substituted with\n```\n{\n \"object\": \"block\",\n \"type\": \"paragraph\",\n \"paragraph\": {\n \"rich_text\": [\n {\n \"type\": \"text\",\n \"text\": {\n \"content\": \" \"\n }\n }\n ]\n }\n}\n```"
}
]
},
"promptType": "define"
},
"typeVersion": 1.5
},
{
"id": "8bc449e8-93ed-493c-a716-ba263bfa4f51",
"name": "Google Gemini 聊天模型",
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
"position": [
2992,
320
],
"parameters": {
"options": {},
"modelName": "models/gemini-2.0-flash"
},
"typeVersion": 1
},
{
"id": "b10f665f-c433-4e73-9c4c-dfb0d72c1d70",
"name": "解析 JSON 块",
"type": "n8n-nodes-base.set",
"onError": "continueRegularOutput",
"position": [
3312,
224
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "73fcb8a0-2672-4bd5-86de-8075e1e02baf",
"name": "=block",
"type": "array",
"value": "={{\n(function(){\n const block = $json.response.text\n .replace('```json', '')\n .replace('```', '')\n .trim()\n .parseJson();\n if (Array.isArray(block)) return block;\n if (block.type.startsWith('heading_')) {\n const prev = Number(block.type.split('_')[1]);\n const next = Math.max(1, prev - 1);\n if (next !== prev) {\n block.type = `heading_${next}`;\n block[`heading_${next}`] = Object.assign({}, block[`heading_${prev}`]);\n block[`heading_${prev}`] = undefined;\n }\n }\n return [block];\n})()\n}}"
}
]
}
},
"executeOnce": false,
"typeVersion": 3.4
},
{
"id": "111fb999-e768-4a54-b654-b4c764ec01c6",
"name": "有效块",
"type": "n8n-nodes-base.filter",
"position": [
3488,
240
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "f68cefe0-e109-4d41-9aa3-043f3bc6c449",
"operator": {
"type": "string",
"operation": "notExists",
"singleValue": true
},
"leftValue": "={{ $json.error }}",
"rightValue": ""
}
]
}
},
"typeVersion": 2.2
},
{
"id": "2a22fe91-8594-47be-963d-5163537d72c4",
"name": "遍历每个块...",
"type": "n8n-nodes-base.splitInBatches",
"position": [
3744,
240
],
"parameters": {
"options": {}
},
"typeVersion": 3
},
{
"id": "24e0ec98-3ac2-432a-a743-c4c5f6e38bfc",
"name": "获取现有行",
"type": "n8n-nodes-base.notion",
"position": [
2160,
144
],
"parameters": {
"limit": 1,
"filters": {
"conditions": [
{
"key": "Request ID|rich_text",
"condition": "equals",
"richTextValue": "={{ $('Code').item.json.randomId.toString() }}"
}
]
},
"options": {},
"resource": "databasePage",
"matchType": "allFilters",
"operation": "getAll",
"databaseId": {
"__rl": true,
"mode": "list",
"value": "1f536e90-e9d0-805c-a1c1-f2fab42a8a7b",
"cachedResultUrl": "https://www.notion.so/1f536e90e9d0805ca1c1f2fab42a8a7b",
"cachedResultName": "n8n DeepResearch"
},
"filterType": "manual"
},
"typeVersion": 2.2
},
{
"id": "08e46831-969d-4f29-8c85-16cc3551e0c5",
"name": "代码",
"type": "n8n-nodes-base.code",
"position": [
160,
368
],
"parameters": {
"jsCode": "const randomId = Math.floor(100000 + Math.random() * 900000);\nreturn { randomId };\n"
},
"typeVersion": 2
},
{
"id": "826965b5-2c22-43d9-9802-419c8cb4d55d",
"name": "聚合1",
"type": "n8n-nodes-base.aggregate",
"position": [
3920,
176
],
"parameters": {
"options": {},
"aggregate": "aggregateAllItemData"
},
"typeVersion": 1
},
{
"id": "0be97ae1-09cf-444e-9bf0-2fd9edeeb72b",
"name": "OpenRouter聊天模型",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
"position": [
-624,
464
],
"parameters": {
"model": "anthropic/claude-3.5-sonnet",
"options": {}
},
"typeVersion": 1
},
{
"id": "396d20c8-adbc-4357-bfde-f15d63ee250d",
"name": "OpenRouter聊天模型1",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
"position": [
848,
528
],
"parameters": {
"model": "anthropic/claude-3.5-sonnet",
"options": {}
},
"typeVersion": 1
},
{
"id": "1209861a-0b12-488d-9888-7d2e00ca177f",
"name": "OpenRouter 聊天模型2",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
"position": [
1808,
304
],
"parameters": {
"model": "anthropic/claude-3.5-sonnet",
"options": {}
},
"typeVersion": 1
},
{
"id": "d12593f1-028a-4033-8519-2ce283e07793",
"name": "Webhook",
"type": "n8n-nodes-base.webhook",
"position": [
-880,
304
],
"webhookId": "1c86c408-aeed-40c5-b4ba-aad5f4cdf0ad",
"parameters": {
"path": "1c86c408-aeed-40c5-b4ba-aad5f4cdf0ad",
"options": {},
"httpMethod": "POST",
"responseMode": "responseNode"
},
"typeVersion": 2
},
{
"id": "a33171cd-487f-4d82-97b6-c17933ea498f",
"name": "响应 Webhook",
"type": "n8n-nodes-base.respondToWebhook",
"position": [
-64,
144
],
"parameters": {
"options": {},
"respondWith": "text",
"responseBody": "={{ $json.output.message }}"
},
"typeVersion": 1.1
},
{
"id": "aa54d1b3-1f8c-4942-9a7b-7f26e1aa376b",
"name": "响应 Webhook1",
"type": "n8n-nodes-base.respondToWebhook",
"position": [
-48,
368
],
"parameters": {
"options": {},
"respondWith": "text",
"responseBody": "Thank you for your response. We are preparing your report. Once it is finished we will send report link to you."
},
"typeVersion": 1.1
},
{
"id": "1bf4266f-e2e6-4491-9138-5237a89ae520",
"name": "HTTP 请求3",
"type": "n8n-nodes-base.httpRequest",
"position": [
4320,
224
],
"parameters": {
"method": "POST",
"options": {},
"sendBody": true,
"bodyParameters": {
"parameters": [
{
"name": "report_title",
"value": "={{ $json.name || '' }}"
},
{
"name": "report_url",
"value": "={{ $json.url || \"\" }}"
},
{
"name": "status",
"value": "={{ $json.property_status || \"\" }}"
},
{
"name": "session_id",
"value": "={{ $('Webhook').item.json.body.session_id || \"\" }}"
}
]
}
},
"typeVersion": 4.2
},
{
"id": "215cb1cf-0798-4a72-8ae7-fb065a90ed05",
"name": "便签",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1872,
-48
],
"parameters": {
"width": 832,
"height": 1264,
"content": "## 深度研究智能体 – 自动化研究与 Notion 报告构建器"
},
"typeVersion": 1
},
{
"id": "805c58a6-9fcf-413f-9fd9-7bcb54943fce",
"name": "便签1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-672,
-16
],
"parameters": {
"color": 7,
"width": 800,
"height": 640,
"content": "**策略智能体与澄清阶段**"
},
"typeVersion": 1
},
{
"id": "1d00461a-936f-442d-8cc6-dfebfb2956ff",
"name": "便签2",
"type": "n8n-nodes-base.stickyNote",
"position": [
288,
128
],
"parameters": {
"color": 7,
"width": 896,
"height": 592,
"content": "**Notion 页面创建与搜索查询生成**"
},
"typeVersion": 1
},
{
"id": "d8d8a162-90fc-4c2b-bf47-99d334e980e7",
"name": "便签3",
"type": "n8n-nodes-base.stickyNote",
"position": [
1584,
496
],
"parameters": {
"color": 7,
"width": 1008,
"height": 496,
"content": "**搜索与内容提取**"
},
"typeVersion": 1
},
{
"id": "d6808baf-5e90-4c70-95aa-bfde2e5fcdbf",
"name": "报告智能体",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
1808,
128
],
"parameters": {
"text": "=You are a research and writing assistant.\n\nYour task is to generate a comprehensive and well-structured blog-style report based on the following research topic and raw extracted content. Use professional, clear language suitable for a wide audience. Organize the report using headings and subheadings. Avoid repetition. At the end of the report, include a \"Sources\" section with a list of the URLs used. \n\nThis is the final draft on which you need to create report from given topic and draft: \n{{ $('Switch').item.json.output.message }}. Try to create final report from this outline and draft.\n\n---\n**Extracted Content**:\n\n1. Source: {{ $json.data[0].results[0].url }}\nContent:{{ $json.data[0].results[0].raw_content }}\n\n\n2. Source: {{ $json.data[1].results[0].url }}\nContent: {{ $json.data[1].results[0].raw_content }}\n\n3. Source: {{ $json.data[2].results[0].url }}\nContent:{{ $json.data[2].results[0].raw_content }}\n\n---\n\n**Instructions**:\n- Make as detailed report as possible. Include all the useful information.\n- Analyze and synthesize the information from all sources.\n- Structure the report into meaningful sections with headings and subheadings (e.g., Introduction, Key Insights, Challenges, Opportunities, Conclusion, etc.).\n- Do not copy the content verbatim — rewrite and consolidate it into an original, cohesive narrative.\n- Maintain factual accuracy.\n- Make it as as detailed as possible, aim for 3 or more pages, include ALL the learnings from research.\n- Format the report in markdown. Use headings, lists and tables only and where appropriate.\n- At the end of **each paragraph**, insert a superscript source reference in markdown format like this: `[1]`, `[2]`, `[3]`, based on which source(s) the paragraph is derived from.\n- Do not mention the source URL in the paragraph body.\n- Do not include content that cannot be mapped to one of the sources.\n- At the end include sources link with correct url.\n",
"options": {},
"promptType": "define"
},
"typeVersion": 1.8
},
{
"id": "ca0d4afd-4ee3-4f43-b41a-444661451a8d",
"name": "便签4",
"type": "n8n-nodes-base.stickyNote",
"position": [
1584,
-48
],
"parameters": {
"color": 7,
"width": 944,
"height": 496,
"content": "**报告汇编与格式化**"
},
"typeVersion": 1
},
{
"id": "381e1216-db41-4d0c-b47a-cc10c70a5fdf",
"name": "便签5",
"type": "n8n-nodes-base.stickyNote",
"position": [
2560,
-48
],
"parameters": {
"color": 7,
"width": 1088,
"height": 496,
"content": "**HTML 到 Notion 块转换**"
},
"typeVersion": 1
},
{
"id": "bed2bbfc-c2a2-49f4-983b-a36c37178aae",
"name": "### 需要帮助?",
"type": "n8n-nodes-base.stickyNote",
"position": [
3680,
-48
],
"parameters": {
"color": 7,
"width": 864,
"height": 688,
"content": "**最终存储与响应**"
},
"typeVersion": 1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "732c71a1-d47f-45c1-8e49-8045ff54fb72",
"connections": {
"Code": {
"main": [
[
{
"node": "OpenAI1",
"type": "main",
"index": 0
}
]
]
},
"Notion": {
"main": [
[
{
"node": "Search Query Agent",
"type": "main",
"index": 0
}
]
]
},
"OpenAI": {
"main": [
[
{
"node": "HTTP Request1",
"type": "main",
"index": 0
}
]
]
},
"Switch": {
"main": [
[
{
"node": "Respond to Webhook",
"type": "main",
"index": 0
}
],
[
{
"node": "Respond to Webhook1",
"type": "main",
"index": 0
}
]
]
},
"Notion1": {
"main": [
[
{
"node": "HTTP Request3",
"type": "main",
"index": 0
}
]
]
},
"OpenAI1": {
"main": [
[
{
"node": "Notion",
"type": "main",
"index": 0
}
]
]
},
"Webhook": {
"main": [
[
{
"node": "Strategy Agent",
"type": "main",
"index": 0
}
]
]
},
"Aggregate": {
"main": [
[
{
"node": "Report Agent",
"type": "main",
"index": 0
}
]
]
},
"Split Out": {
"main": [
[
{
"node": "Loop Over Queries",
"type": "main",
"index": 0
}
]
]
},
"Aggregate1": {
"main": [
[
{
"node": "Notion1",
"type": "main",
"index": 0
}
]
]
},
"Edit Fields": {
"main": [
[
{
"node": "OpenAI",
"type": "main",
"index": 0
}
]
]
},
"HTTP Request": {
"main": [
[
{
"node": "Edit Fields",
"type": "main",
"index": 0
}
]
]
},
"Report Agent": {
"main": [
[
{
"node": "Get Existing Row",
"type": "main",
"index": 0
}
]
]
},
"Valid Blocks": {
"main": [
[
{
"node": "For Each Block...",
"type": "main",
"index": 0
}
]
]
},
"HTML to Array": {
"main": [
[
{
"node": "Tags to Items",
"type": "main",
"index": 0
}
]
]
},
"HTTP Request1": {
"main": [
[
{
"node": "Loop Over Queries",
"type": "main",
"index": 0
}
]
]
},
"HTTP Request2": {
"main": [
[
{
"node": "For Each Block...",
"type": "main",
"index": 0
}
]
]
},
"Simple Memory": {
"ai_memory": [
[
{
"node": "Strategy Agent",
"type": "ai_memory",
"index": 0
}
]
]
},
"Tags to Items": {
"main": [
[
{
"node": "Notion Block Generator",
"type": "main",
"index": 0
}
]
]
},
"Strategy Agent": {
"main": [
[
{
"node": "Switch",
"type": "main",
"index": 0
}
]
]
},
"Convert to HTML": {
"main": [
[
{
"node": "HTML to Array",
"type": "main",
"index": 0
}
]
]
},
"Get Existing Row": {
"main": [
[
{
"node": "Convert to HTML",
"type": "main",
"index": 0
}
]
]
},
"For Each Block...": {
"main": [
[
{
"node": "Aggregate1",
"type": "main",
"index": 0
}
],
[
{
"node": "HTTP Request2",
"type": "main",
"index": 0
}
]
]
},
"Loop Over Queries": {
"main": [
[
{
"node": "Aggregate",
"type": "main",
"index": 0
}
],
[
{
"node": "HTTP Request",
"type": "main",
"index": 0
}
]
]
},
"Parse JSON blocks": {
"main": [
[
{
"node": "Valid Blocks",
"type": "main",
"index": 0
}
]
]
},
"Search Query Agent": {
"main": [
[
{
"node": "Split Out",
"type": "main",
"index": 0
}
]
]
},
"Respond to Webhook1": {
"main": [
[
{
"node": "Code",
"type": "main",
"index": 0
}
]
]
},
"OpenRouter Chat Model": {
"ai_languageModel": [
[
{
"node": "Strategy Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Notion Block Generator": {
"main": [
[
{
"node": "Parse JSON blocks",
"type": "main",
"index": 0
}
]
]
},
"OpenRouter Chat Model1": {
"ai_languageModel": [
[
{
"node": "Search Query Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"OpenRouter Chat Model2": {
"ai_languageModel": [
[
{
"node": "Report Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Google Gemini Chat Model": {
"ai_languageModel": [
[
{
"node": "Notion Block Generator",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Structured Output Parser": {
"ai_outputParser": [
[
{
"node": "Strategy Agent",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"Structured Output Parser1": {
"ai_outputParser": [
[
{
"node": "Search Query Agent",
"type": "ai_outputParser",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
高级 - 市场调研, 多模态 AI
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
在可视化参考库中探索n8n节点
在可视化参考库中探索n8n节点
If
Ftp
Set
+93
113 节点I versus AI
其他
每日 WhatsApp 群组智能分析:GPT-4.1 分析与语音消息转录
每日 WhatsApp 群组智能分析:GPT-4.1 分析与语音消息转录
If
Set
Code
+20
52 节点Daniel Lianes
杂项
[模板] AI宠物店 v8
🐶 AI宠物店助手 - 集成GPT-4o、Google日历和WhatsApp/Instagram/Facebook
If
N8n
Set
+38
244 节点Amanda Benks
销售
AI 代理餐厅 [模板]
🤖 WhatsApp、Instagram 和 Messenger 的 AI 餐厅助手
If
N8n
Set
+37
239 节点Amanda Benks
其他
使用GPT-5和fal.ai图像从关键词到WordPress自动化SEO博客流程
使用GPT-5和fal.ai图像从关键词到WordPress自动化SEO博客流程
Set
Code
Wait
+20
96 节点Paul
内容创作
WordPress博客自动化专业版(深度研究)v2.1市场
使用GPT-4o、Perplexity AI和多语言支持自动化SEO优化的博客创建
If
Set
Xml
+27
125 节点Daniel Ng
内容创作