This workflow follows the Agent → Chainllm recipe pattern — see all workflows that pair these two integrations.
The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"active": false,
"activeVersion": null,
"activeVersionId": null,
"connections": {
"Create Row": {
"main": [
[
{
"node": "Initiate DeepResearch",
"type": "main",
"index": 0
}
]
]
},
"Confirmation": {
"main": [
[
{
"node": "End Form",
"type": "main",
"index": 0
}
]
]
},
"Has Content?": {
"main": [
[
{
"node": "Get Markdown + URL",
"type": "main",
"index": 0
}
],
[
{
"node": "Empty Response",
"type": "main",
"index": 0
}
]
]
},
"Valid Blocks": {
"main": [
[
{
"node": "Append Blocks",
"type": "main",
"index": 0
}
]
]
},
"Append Blocks": {
"main": [
[
{
"node": "For Each Block...",
"type": "main",
"index": 0
}
]
]
},
"HTML to Array": {
"main": [
[
{
"node": "Tags to Items",
"type": "main",
"index": 0
}
]
]
},
"SERP to Items": {
"main": [
[
{
"node": "For Each Query...",
"type": "main",
"index": 0
}
]
]
},
"Set Variables": {
"main": [
[
{
"node": "Clarifying Questions",
"type": "main",
"index": 0
}
]
]
},
"Tags to Items": {
"main": [
[
{
"node": "Notion Block Generator",
"type": "main",
"index": 0
}
]
]
},
"Valid Results": {
"main": [
[
{
"node": "Has Content?",
"type": "main",
"index": 0
}
]
]
},
"Empty Response": {
"main": [
[
{
"node": "For Each Query...",
"type": "main",
"index": 0
}
]
]
},
"Execution Data": {
"main": [
[
{
"node": "JobType Router",
"type": "main",
"index": 0
}
]
]
},
"JobType Router": {
"main": [
[
{
"node": "Get Existing Row",
"type": "main",
"index": 0
}
],
[
{
"node": "Generate SERP Queries",
"type": "main",
"index": 0
}
],
[
{
"node": "Get Existing Row1",
"type": "main",
"index": 0
}
]
]
},
"Convert to HTML": {
"main": [
[
{
"node": "HTML to Array",
"type": "main",
"index": 0
}
]
]
},
"Set In-Progress": {
"main": [
[
{
"node": "Set Initial Query",
"type": "main",
"index": 0
}
]
]
},
"Get Existing Row": {
"main": [
[
{
"node": "Set In-Progress",
"type": "main",
"index": 0
}
]
]
},
"Results to Items": {
"main": [
[
{
"node": "Set Next Queries",
"type": "main",
"index": 0
}
]
]
},
"Set Next Queries": {
"main": [
[
{
"node": "Generate Learnings",
"type": "main",
"index": 0
}
]
]
},
"Feedback to Items": {
"main": [
[
{
"node": "For Each Question...",
"type": "main",
"index": 0
}
]
]
},
"For Each Block...": {
"main": [
[
{
"node": "Set Done",
"type": "main",
"index": 0
}
],
[
{
"node": "Upload to Notion Page",
"type": "main",
"index": 0
}
]
]
},
"For Each Query...": {
"main": [
[
{
"node": "Combine & Send back to Loop",
"type": "main",
"index": 0
}
],
[
{
"node": "Item Ref",
"type": "main",
"index": 0
}
]
]
},
"Get Existing Row1": {
"main": [
[
{
"node": "DeepResearch Report",
"type": "main",
"index": 0
}
]
]
},
"Get Initial Query": {
"main": [
[
{
"node": "Report Page Generator",
"type": "main",
"index": 0
}
]
]
},
"Is Depth Reached?": {
"main": [
[
{
"node": "Get Research Results",
"type": "main",
"index": 0
}
],
[
{
"node": "DeepResearch Results",
"type": "main",
"index": 0
}
]
]
},
"Parse JSON blocks": {
"main": [
[
{
"node": "Valid Blocks",
"type": "main",
"index": 0
},
{
"node": "URL Sources to Lists",
"type": "main",
"index": 0
}
]
]
},
"Set Initial Query": {
"main": [
[
{
"node": "Generate Learnings",
"type": "main",
"index": 0
}
]
]
},
"Accumulate Results": {
"main": [
[
{
"node": "Is Depth Reached?",
"type": "main",
"index": 0
}
]
]
},
"Generate Learnings": {
"main": [
[
{
"node": "Accumulate Results",
"type": "main",
"index": 0
}
]
]
},
"Get Markdown + URL": {
"main": [
[
{
"node": "DeepResearch Learnings",
"type": "main",
"index": 0
}
]
]
},
"On form submission": {
"main": [
[
{
"node": "Research Request1",
"type": "main",
"index": 0
}
]
]
},
"DeepResearch Report": {
"main": [
[
{
"node": "Convert to HTML",
"type": "main",
"index": 0
}
]
]
},
"Clarifying Questions": {
"main": [
[
{
"node": "Feedback to Items",
"type": "main",
"index": 0
}
]
]
},
"DeepResearch Results": {
"main": [
[
{
"node": "Results to Items",
"type": "main",
"index": 0
}
]
]
},
"For Each Question...": {
"main": [
[
{
"node": "Get Initial Query",
"type": "main",
"index": 0
}
],
[
{
"node": "Ask Clarity Questions",
"type": "main",
"index": 0
}
]
]
},
"Get Research Results": {
"main": [
[
{
"node": "Generate Report",
"type": "main",
"index": 0
}
]
]
},
"URL Sources to Lists": {
"main": [
[
{
"node": "Append Blocks",
"type": "main",
"index": 1
}
]
]
},
"Ask Clarity Questions": {
"main": [
[
{
"node": "For Each Question...",
"type": "main",
"index": 0
}
]
]
},
"Generate SERP Queries": {
"main": [
[
{
"node": "SERP to Items",
"type": "main",
"index": 0
}
]
]
},
"Initiate DeepResearch": {
"main": [
[
{
"node": "Confirmation",
"type": "main",
"index": 0
}
]
]
},
"Report Page Generator": {
"main": [
[
{
"node": "Create Row",
"type": "main",
"index": 0
}
]
]
},
"Upload to Notion Page": {
"main": [
[
{
"node": "For Each Block...",
"type": "main",
"index": 0
}
]
]
},
"DeepResearch Learnings": {
"main": [
[
{
"node": "Research Goal + Learnings",
"type": "main",
"index": 0
}
]
]
},
"Notion Block Generator": {
"main": [
[
{
"node": "Parse JSON blocks",
"type": "main",
"index": 0
}
]
]
},
"DeepResearch Subworkflow": {
"main": [
[
{
"node": "Execution Data",
"type": "main",
"index": 0
}
]
]
},
"Structured Output Parser": {
"ai_outputParser": [
[
{
"node": "DeepResearch Learnings",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"Research Goal + Learnings": {
"main": [
[
{
"node": "For Each Query...",
"type": "main",
"index": 0
}
]
]
},
"Structured Output Parser1": {
"ai_outputParser": [
[
{
"node": "Clarifying Questions",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"Structured Output Parser2": {
"ai_outputParser": [
[
{
"node": "Generate SERP Queries",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"Structured Output Parser4": {
"ai_outputParser": [
[
{
"node": "Report Page Generator",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"Research Request1": {
"main": [
[
{
"node": "Set Variables",
"type": "main",
"index": 0
}
]
]
},
"gemini 2.5 flash": {
"ai_languageModel": [
[
{
"node": "Notion Block Generator",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"o3 mini": {
"ai_languageModel": [
[
{
"node": "Clarifying Questions",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"o3 mini1": {
"ai_languageModel": [
[
{
"node": "Report Page Generator",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"o3 mini2": {
"ai_languageModel": [
[
{
"node": "Generate SERP Queries",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"o3 mini3": {
"ai_languageModel": [
[
{
"node": "DeepResearch Learnings",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"o3 mini4": {
"ai_languageModel": [
[
{
"node": "DeepResearch Report",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"AI Agent": {
"main": [
[
{
"node": "Valid Results",
"type": "main",
"index": 0
}
]
]
},
"Item Ref": {
"main": [
[
{
"node": "AI Agent",
"type": "main",
"index": 0
}
]
]
},
"Structured Output Parser3": {
"ai_outputParser": [
[
{
"node": "AI Agent",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"Message a model in Perplexity": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Gpt": {
"ai_languageModel": [
[
{
"node": "AI Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
}
},
"createdAt": "2025-11-30T23:13:31.668Z",
"id": "joG8biXfpcc7Aa4S",
"isArchived": true,
"meta": {
"templateCredsSetupCompleted": true
},
"name": "Deep Research new (fr)",
"nodes": [
{
"parameters": {
"schemaType": "manual",
"inputSchema": "{\n \"type\": \"object\",\n \"properties\": {\n \"learnings\": {\n \"type\": \"array\",\n \"description\": \"Liste d'enseignements, maximum de 3.\",\n \"items\": { \"type\": \"string\" }\n }\n }\n}"
},
"id": "464acc84-246a-435e-8c33-56b282369191",
"name": "Structured Output Parser",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
3424,
2384
],
"typeVersion": 1.2
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "df28b12e-7c20-4ff5-b5b8-dc773aa14d4b",
"name": "request_id",
"type": "string",
"value": "={{ $execution.id }}"
},
{
"id": "9362c1e7-717d-444a-8ea2-6b5f958c9f3f",
"name": "prompt",
"type": "string",
"value": "={{ $json['Que souhaitez vous rechercher ?'] }}"
},
{
"id": "09094be4-7844-4a9e-af82-cc8e39322398",
"name": "depth",
"type": "number",
"value": "={{ $json['Profondeur de recherche (1 par d\u00e9faut)'] }}"
},
{
"id": "3fc30a30-7806-4013-835d-97e27ddd7ae1",
"name": "breadth",
"type": "number",
"value": "={{ $json['Etendue de la recherche (2 par d\u00e9faut)'] }}"
},
{
"id": "45d12786-44f2-43fc-91e2-695b7d2805b6",
"name": "",
"value": "",
"type": "string"
}
]
},
"options": {}
},
"id": "61050c15-96d8-4a0c-88f5-d38aa524c6cd",
"name": "Set Variables",
"type": "n8n-nodes-base.set",
"position": [
928,
736
],
"typeVersion": 3.4
},
{
"parameters": {
"schemaType": "manual",
"inputSchema": "{\n \"type\": \"object\",\n \"properties\": {\n \"questions\": {\n \"type\": \"array\",\n \"description\": \"Questions pour clarifier la direction de la recherche, maximum de 3.\",\n \"items\": {\n \"type\": \"string\"\n }\n }\n }\n}"
},
"id": "cc335c26-69fc-4312-a852-d4ce018efd24",
"name": "Structured Output Parser1",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
1440,
896
],
"typeVersion": 1.2
},
{
"parameters": {
"formTitle": " DeepResearcher",
"formDescription": "=DeepResearcher est une approche multi-\u00e9tapes et r\u00e9cursive qui utilise Internet pour r\u00e9soudre des t\u00e2ches de recherche complexes, accomplissant en quelques dizaines de minutes ce qui prendrait plusieurs heures \u00e0 un humain. \n\nComment l'utiliser ?\nFournissez un bref r\u00e9sum\u00e9 du sujet de recherche ainsi que le niveau de profondeur souhait\u00e9 pour l'investigation. \n\n\ud83d\udccc **\u00c0 noter** : Plus les valeurs sont \u00e9lev\u00e9es, plus le temps et le co\u00fbt de la recherche augmenteront. \n\nCe workflow est con\u00e7u pour s'ex\u00e9cuter de mani\u00e8re autonome. Une fois termin\u00e9, un rapport sera sauvegard\u00e9 dans une base de donn\u00e9es Notion d\u00e9di\u00e9e. ",
"formFields": {
"values": [
{
"fieldType": "html"
}
]
},
"options": {
"buttonLabel": "Next",
"path": "deep_research",
"ignoreBots": true
}
},
"id": "791b371a-ceb3-4149-b494-65954df40121",
"name": "On form submission",
"type": "n8n-nodes-base.formTrigger",
"position": [
528,
736
],
"typeVersion": 2.2
},
{
"parameters": {
"promptType": "define",
"text": "=Etant donn\u00e9 le prompt suivant de l'utilisateur, g\u00e9n\u00e8re une liste de requ\u00eates SERP pour rechercher le sujet.\nR\u00e9duis le nombre de mots dans chaque requ\u00eate \u00e0 ses mots-cl\u00e9s uniquement.\nRenvoie un maximum de {{ $('JobType Router').first().json.data.breadth }} requ\u00eates, mais n'h\u00e9site pas \u00e0 en renvoyer moins si le prompt original est clair. Assure-toi que chaque requ\u00eate est unique et pas similaire aux autres: \n<prompt>{{ $('JobType Router').first().json.data.query.trim() }}</prompt>\n\n{{\n$('JobType Router').first().json.data.learnings.length\n ? `Voici quelques enseignements tir\u00e9s de recherches pr\u00e9c\u00e9dentes, utilise-les pour g\u00e9n\u00e9rer des requ\u00eates plus sp\u00e9cifiques:\\n${$('JobType Router').first().json.data.learnings.map(text => `* ${text}`).join('\\n')}`\n : ''\n}}",
"hasOutputParser": true,
"messages": {
"messageValues": [
{
"type": "HumanMessagePromptTemplate",
"message": "=## Contexte\nTu es un chercheur expert. Aujourd'hui nous sommes le {{ $now.toLocaleString() }}. Suis ces instructions lorsque tu r\u00e9ponds :\n\n- On peut te demander de rechercher des sujets post\u00e9rieurs \u00e0 ta date limite de connaissance, suppose que l'utilisateur a raison lorsqu'il pr\u00e9sente une actualit\u00e9.\n- L'utilisateur est un analyste hautement exp\u00e9riment\u00e9, inutile de simplifier, sois aussi d\u00e9taill\u00e9 que possible et assure-toi que ta r\u00e9ponse est correcte.\n- Sois tr\u00e8s organis\u00e9.\n- Sugg\u00e8re des solutions auxquelles je n'ai pas pens\u00e9.\n- Sois proactif et anticipe mes besoins.\n- Traite-moi comme un expert dans tous les domaines.\n- Les erreurs \u00e9rodent ma confiance, sois donc pr\u00e9cis et rigoureux.\n- Fournis des explications d\u00e9taill\u00e9es, je suis \u00e0 l'aise avec beaucoup de d\u00e9tails.\n- Privil\u00e9gie les bons arguments aux sources d'autorit\u00e9, la provenance de l'information est secondaire.\n- Prends en compte les nouvelles technologies et les id\u00e9es contraires \u00e0 la sagesse conventionnelle, pas seulement l'opinion majoritaire.\n- Tu peux faire des sp\u00e9culations ou pr\u00e9dictions de haut niveau, signale-les moi simplement.\n- Effectue des recherches principalement dans des sources fran\u00e7aises, mais n'h\u00e9sites pas \u00e0 consulter des sources internationales et les traduires (suivant le besoin et le sujet)."
}
]
}
},
"id": "d084b8e8-08a3-43a8-a7c1-51f75b93d978",
"name": "Generate SERP Queries",
"type": "@n8n/n8n-nodes-langchain.chainLlm",
"position": [
1248,
2016
],
"typeVersion": 1.5
},
{
"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}"
},
"id": "e892ac86-5859-4b6b-bb48-74eace8e07e0",
"name": "Structured Output Parser2",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
1424,
2176
],
"typeVersion": 1.2
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "acb41e93-70c6-41a3-be0f-e5a74ec3ec88",
"name": "query",
"type": "string",
"value": "={{ $('JobType Router').first().json.data.query }}"
},
{
"id": "7fc54063-b610-42bc-a250-b1e8847c4d1e",
"name": "learnings",
"type": "array",
"value": "={{ $('JobType Router').first().json.data.learnings }}"
},
{
"id": "e8f1c158-56fb-41c8-8d86-96add16289bb",
"name": "breadth",
"type": "number",
"value": "={{ $('JobType Router').first().json.data.breadth }}"
}
]
},
"options": {}
},
"id": "62c3b8a7-28e8-4d9d-86e8-b9e9ae02e6c5",
"name": "Set Initial Query",
"type": "n8n-nodes-base.set",
"position": [
1696,
1376
],
"typeVersion": 3.4
},
{
"parameters": {
"fieldToSplitOut": "output.queries",
"options": {}
},
"id": "0935b977-969d-43ce-bb14-dc9110782cad",
"name": "SERP to Items",
"type": "n8n-nodes-base.splitOut",
"position": [
1584,
2016
],
"typeVersion": 1
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "9acec2cc-64c8-4e62-bed4-c3d9ffab1379",
"name": "researchGoal",
"type": "string",
"value": "={{ $('Item Ref').first().json.researchGoal }}"
},
{
"id": "1b2d2dad-429b-4fc9-96c5-498f572a85c3",
"name": "learnings",
"type": "array",
"value": "={{ $json.output.learnings }}"
},
{
"id": "c9e34ea4-5606-46d6-8d66-cb42d772a8b4",
"name": "urls",
"type": "array",
"value": "={{\n$('Get Markdown + URL')\n .all()\n .map(item => item.json.url)\n}}"
}
]
},
"options": {}
},
"id": "c224e45c-af8a-4f2d-8922-53d754fdf9a0",
"name": "Research Goal + Learnings",
"type": "n8n-nodes-base.set",
"position": [
3584,
2368
],
"typeVersion": 3.4
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "db509e90-9a86-431f-8149-4094d22666cc",
"name": "should_stop",
"type": "boolean",
"value": "={{\n$runIndex >= ($('JobType Router').first().json.data.depth)\n}}"
},
{
"id": "90986e2b-8aca-4a22-a9db-ed8809d6284d",
"name": "all_learnings",
"type": "array",
"value": "={{\nArray($runIndex+1)\n .fill(0)\n .flatMap((_,idx) => {\n try {\n return $('Generate Learnings')\n .all(0,idx)\n .flatMap(item => item.json.data.flatMap(d => d.learnings))\n } catch (e) {\n return []\n }\n })\n}}"
},
{
"id": "3eade958-e8ab-4975-aac4-f4a4a983c163",
"name": "all_urls",
"type": "array",
"value": "={{\nArray($runIndex+1)\n .fill(0)\n .flatMap((_,idx) => {\n try {\n return $('Generate Learnings')\n .all(0,idx)\n .flatMap(item => item.json.data.flatMap(d => d.urls))\n } catch (e) {\n return []\n }\n })\n}}"
}
]
},
"options": {}
},
"id": "0a22b6e3-1925-4033-9a20-5ea22453c8a8",
"name": "Accumulate Results",
"type": "n8n-nodes-base.set",
"position": [
2080,
1376
],
"executeOnce": true,
"typeVersion": 3.4
},
{
"parameters": {
"mode": "raw",
"jsonOutput": "={{ $('Generate Learnings').item.json }}",
"options": {}
},
"id": "2d5d646a-b938-4d86-b7a6-9bc408ef012c",
"name": "DeepResearch Results",
"type": "n8n-nodes-base.set",
"position": [
2448,
1568
],
"typeVersion": 3.4
},
{
"parameters": {
"fieldToSplitOut": "data",
"options": {}
},
"id": "c986462a-93e9-4530-af4c-cd0718fe3f95",
"name": "Results to Items",
"type": "n8n-nodes-base.splitOut",
"position": [
2608,
1568
],
"typeVersion": 1
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "d88bfe95-9e73-4d25-b45c-9f164b940b0e",
"name": "query",
"type": "string",
"value": "=Objectif de recherche pr\u00e9c\u00e9dent : {{ $json.researchGoal }}\nOrientations de recherche compl\u00e9mentaires : {{ $json.followUpQuestions.map(q => `\\n${q}`).join('') }}"
},
{
"id": "4aa20690-d998-458a-b1e4-0d72e6a68e6b",
"name": "learnings",
"type": "array",
"value": "={{ $('Accumulate Results').item.json.all_learnings }}"
},
{
"id": "89acafae-b04a-4d5d-b08b-656e715654e4",
"name": "breadth",
"type": "number",
"value": "={{ $('JobType Router').first().json.data.breadth }}"
}
]
},
"options": {}
},
"id": "5a07d21b-041f-4563-a47a-37c1b8d72b22",
"name": "Set Next Queries",
"type": "n8n-nodes-base.set",
"position": [
2768,
1568
],
"typeVersion": 3.4
},
{
"parameters": {
"options": {}
},
"id": "3237c568-1e4f-4a79-8582-f85eddd83d6f",
"name": "For Each Query...",
"type": "n8n-nodes-base.splitInBatches",
"position": [
1856,
2064
],
"typeVersion": 3
},
{
"parameters": {
"fieldToSplitOut": "output.questions",
"options": {}
},
"id": "adb6a0e9-26b4-4c25-b8cc-959b9ec235f0",
"name": "Feedback to Items",
"type": "n8n-nodes-base.splitOut",
"position": [
1568,
736
],
"typeVersion": 1
},
{
"parameters": {
"formFields": {
"values": [
{
"fieldLabel": "={{ $json[\"output.questions\"] }}",
"fieldType": "textarea",
"placeholder": "=",
"requiredField": true
}
]
},
"options": {
"formTitle": "DeepResearcher",
"formDescription": "=<img\n src=\"https://res.cloudinary.com/daglih2g8/image/upload/f_auto,q_auto/v1/n8n-workflows/o4wqztloz3j6okfxpeyw\"\n width=\"100%\"\n style=\"border:1px solid #ccc\"\n/>\n<p style=\"text-align:left\">\nR\u00e9pondez aux questions de suivantes pour aider le DeepResearcher \u00e0 mieux comprendre le sujet de recherche.\n</p>\n<hr style=\"display:block;margin-top:16px;margin-bottom:0\" />\n<p style=\"text-align:left;font-family:sans-serif;font-weight:700;\">\nTotal {{ $('Feedback to Items').all().length }} questions.\n</p>",
"buttonLabel": "Answer"
}
},
"id": "da407f03-54e7-4684-a4f2-effa19e8673c",
"name": "Ask Clarity Questions",
"type": "n8n-nodes-base.form",
"position": [
1920,
816
],
"typeVersion": 1
},
{
"parameters": {
"options": {}
},
"id": "0e2cdcf1-35bd-4086-8c27-c6512560d415",
"name": "For Each Question...",
"type": "n8n-nodes-base.splitInBatches",
"position": [
1744,
736
],
"typeVersion": 3
},
{
"parameters": {
"workflowInputs": {
"values": [
{
"name": "requestId"
},
{
"name": "jobType"
},
{
"name": "data",
"type": "object"
}
]
}
},
"id": "a75be757-6575-4d8d-adea-d49502ac22be",
"name": "DeepResearch Subworkflow",
"type": "n8n-nodes-base.executeWorkflowTrigger",
"position": [
400,
2016
],
"typeVersion": 1.1
},
{
"parameters": {
"content": "## 2. Poser des questions de clarification \n[En savoir plus sur les n\u0153uds de formulaire](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.form/) \n\nPour g\u00e9rer les questions de clarification g\u00e9n\u00e9r\u00e9es par le LLM, j\u2019ai utilis\u00e9 la m\u00eame technique que dans mon mod\u00e8le \"AI Interviewer\" ([lien](https://n8n.io/workflows/2566-conversational-interviews-with-ai-agents-and-n8n-forms/)). \nCela implique une boucle de formulaires g\u00e9n\u00e9r\u00e9s dynamiquement pour collecter les r\u00e9ponses de l'utilisateur. \n",
"height": 560,
"width": 1000,
"color": 7
},
"id": "91f368ef-60f9-44c2-a171-e7716a7d10f7",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
1136,
528
],
"typeVersion": 1
},
{
"parameters": {
"promptType": "define",
"text": "=\u00c9tant donn\u00e9 la requ\u00eate suivante de l'utilisateur, posez quelques questions pour clarifier la direction de la recherche. Retournez un maximum de 3 questions, mais n'h\u00e9sitez pas \u00e0 en proposer moins si la requ\u00eate initiale est claire : <query>{{ $json.prompt }}</query>`",
"hasOutputParser": true,
"messages": {
"messageValues": [
{
"type": "HumanMessagePromptTemplate",
"message": "=## Contexte\nTu es un chercheur expert. Aujourd'hui, nous sommes le {{ $now.toLocaleString() }}. Suis ces instructions lorsque tu r\u00e9ponds :\n\n- Il se peut qu'on te demande de rechercher des sujets post\u00e9rieurs \u00e0 ta date limite de connaissance ; suppose que l'utilisateur a raison lorsqu'il mentionne une actualit\u00e9.\n- L'utilisateur est un analyste hautement exp\u00e9riment\u00e9. Inutile de simplifier, sois aussi d\u00e9taill\u00e9 que possible et assure-toi que ta r\u00e9ponse est correcte.\n- Sois tr\u00e8s organis\u00e9.\n- Propose des solutions auxquelles je n'aurais pas pens\u00e9.\n- Sois proactif et anticipe mes besoins.\n- Traite-moi comme un expert dans tous les domaines.\n- Les erreurs \u00e9rodent ma confiance, sois donc pr\u00e9cis et rigoureux.\n- Fournis des explications d\u00e9taill\u00e9es, je suis \u00e0 l'aise avec un haut niveau de d\u00e9tail.\n- Privil\u00e9gie les bons arguments aux sources d'autorit\u00e9, la provenance de l'information est secondaire.\n- Prends en compte les nouvelles technologies et les id\u00e9es contraires \u00e0 la sagesse - conventionnelle, et ne te limite pas \u00e0 l'opinion majoritaire.\n- Tu peux faire des sp\u00e9culations avanc\u00e9es ou des pr\u00e9dictions, mais indique-le clairement.\n- Effectue des recherches principalement dans des sources fran\u00e7aises, mais n'h\u00e9sites pas \u00e0 consulter des sources internationales et les traduires (suivant le besoin et le sujet)."
}
]
}
},
"id": "cbb55f65-77c8-4dd2-9f99-11c96ada1bf3",
"name": "Clarifying Questions",
"type": "@n8n/n8n-nodes-langchain.chainLlm",
"position": [
1248,
736
],
"typeVersion": 1.5
},
{
"parameters": {
"content": "## 6. Boucle de recherche approfondie \n[En savoir plus sur les boucles dans n8n](https://docs.n8n.io/flow-logic/looping/#creating-loops) \n\nL\u2019\u00e9l\u00e9ment cl\u00e9 du flux DeepResearch est sa capacit\u00e9 \u00e9tendue de collecte de donn\u00e9es. Cette mise en \u0153uvre repose sur une boucle de recherche web r\u00e9cursive qui commence par la requ\u00eate initiale et s\u2019\u00e9tend avec des sous-requ\u00eates g\u00e9n\u00e9r\u00e9es par l\u2019IA. \n\nLe nombre de sous-requ\u00eates d\u00e9pend des param\u00e8tres de profondeur et d\u2019\u00e9tendue sp\u00e9cifi\u00e9s. \n\nDes \"enseignements\" sont g\u00e9n\u00e9r\u00e9s pour chaque sous-requ\u00eate et s\u2019accumulent \u00e0 chaque it\u00e9ration. Lorsque la limite de profondeur est atteinte, tous ces enseignements sont compil\u00e9s et utilis\u00e9s pour r\u00e9diger le rapport final. \n",
"height": 640,
"width": 1360,
"color": 7
},
"id": "516ffdec-0405-4c86-901f-d1eab6a3ee03",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
1616,
1136
],
"typeVersion": 1
},
{
"parameters": {
"operation": "completion",
"completionTitle": "=Merci d'utiliser DeepResearcher.",
"completionMessage": "=Vous pouvez fermer la fen\u00eatre.",
"options": {}
},
"id": "753b8290-b64a-48f8-bf1d-9122d7d2a1f7",
"name": "End Form",
"type": "n8n-nodes-base.form",
"position": [
3248,
784
],
"typeVersion": 1
},
{
"parameters": {
"workflowId": {
"__rl": true,
"mode": "id",
"value": "={{ $workflow.id }}"
},
"workflowInputs": {
"value": {
"data": "={{\n{\n \"query\": $('Get Initial Query').first().json.query,\n \"learnings\": [],\n \"depth\": $('Set Variables').first().json.depth,\n \"breadth\": $('Set Variables').first().json.breadth,\n}\n}}",
"jobType": "deepresearch_initiate",
"requestId": "={{ $('Set Variables').first().json.request_id }}"
},
"schema": [
{
"id": "requestId",
"display": true,
"removed": false,
"required": false,
"displayName": "requestId",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "jobType",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "jobType",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "data",
"type": "object",
"display": true,
"removed": false,
"required": false,
"displayName": "data",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": true
},
"mode": "each",
"options": {
"waitForSubWorkflow": false
}
},
"id": "2dd7bf62-1235-4fc7-b9c3-d3484bdd3b6e",
"name": "Initiate DeepResearch",
"type": "n8n-nodes-base.executeWorkflow",
"position": [
2880,
784
],
"typeVersion": 1.2
},
{
"parameters": {
"dataToSave": {
"values": [
{
"key": "requestId",
"value": "={{ $json.requestId }}"
},
{
"key": "=jobType",
"value": "={{ $json.jobType }}"
}
]
}
},
"id": "c7040fd1-cd4d-4008-b7e4-79da4ec8294f",
"name": "Execution Data",
"type": "n8n-nodes-base.executionData",
"position": [
576,
2016
],
"typeVersion": 1
},
{
"parameters": {
"rules": {
"values": [
{
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.jobType }}",
"rightValue": "deepresearch_initiate"
}
]
},
"renameOutput": true,
"outputKey": "initiate"
},
{
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "ecbfa54d-fc97-48c5-8d3d-f0538b8d727b",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.jobType }}",
"rightValue": "deepresearch_learnings"
}
]
},
"renameOutput": true,
"outputKey": "learnings"
},
{
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "392f9a98-ec22-4e57-9c8e-0e1ed6b7dafa",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.jobType }}",
"rightValue": "deepresearch_report"
}
]
},
"renameOutput": true,
"outputKey": "report"
}
]
},
"options": {}
},
"id": "a9fcaef2-8cb1-437e-8014-399cf19c1187",
"name": "JobType Router",
"type": "n8n-nodes-base.switch",
"position": [
768,
2016
],
"typeVersion": 3.2
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "14b77741-c3c3-4bd2-be6e-37bd09fcea2b",
"name": "query",
"type": "string",
"value": "=Requ\u00eate initiale : {{ $('Set Variables').first().json.prompt }}\nQuestions et r\u00e9ponses :\n{{\n$input.all()\n .map(item => {\n const q = Object.keys(item.json)[0];\n const a = item.json[q];\n return `question: ${q}\\nanswer: ${a}`;\n })\n .join('\\n')\n}}"
}
]
},
"options": {}
},
"id": "b506f78d-9a97-4e19-abbd-1f03945d6c8d",
"name": "Get Initial Query",
"type": "n8n-nodes-base.set",
"position": [
1920,
656
],
"executeOnce": true,
"typeVersion": 3.4
},
{
"parameters": {
"schemaType": "manual",
"inputSchema": "{\n \"type\": \"object\",\n \"properties\": {\n \"title\": {\n \"type\": \"string\",\n \"description\":\" Un titre court r\u00e9sumant le sujet de recherche\"\n },\n \"description\": {\n \"type\": \"string\",\n \"description\": \"Une br\u00e8ve description pour r\u00e9sumer le sujet de recherche\"\n }\n }\n}"
},
"id": "96252758-e9b2-484a-bf24-1d4e3dd40941",
"name": "Structured Output Parser4",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
2448,
928
],
"typeVersion": 1.2
},
{
"parameters": {
"resource": "databasePage",
"databaseId": {
"__rl": true,
"value": "1b582fe2-6406-80cc-a599-f3535e872dd2",
"mode": "list",
"cachedResultName": "n8n DeepResearch",
"cachedResultUrl": "https://www.notion.so/1b582fe2640680cca599f3535e872dd2"
},
"title": "={{ $json.output.title }}",
"propertiesUi": {
"propertyValues": [
{
"key": "Description|rich_text",
"textContent": "={{ $json.output.description }}"
},
{
"key": "Status|status",
"statusValue": "Not started"
},
{
"key": "Request ID|rich_text",
"textContent": "={{ $('Set Variables').first().json.request_id }}"
},
{
"key": "Name|title",
"title": "={{ $json.output.title }}"
}
]
},
"options": {}
},
"id": "6fd909ed-8e9c-46cc-a8ec-1323b4700cea",
"name": "Create Row",
"type": "n8n-nodes-base.notion",
"position": [
2576,
784
],
"typeVersion": 2.2,
"credentials": {
"notionApi": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"promptType": "define",
"text": "=Cr\u00e9ez un titre appropri\u00e9 pour le rapport de recherche qui sera g\u00e9n\u00e9r\u00e9 \u00e0 partir de la requ\u00eate de l'utilisateur.\n<query>{{ $json.query }}</query>",
"hasOutputParser": true
},
"id": "8cad09f0-7331-4f1d-a50c-77dfa1aef424",
"name": "Report Page Generator",
"type": "@n8n/n8n-nodes-langchain.chainLlm",
"position": [
2256,
784
],
"typeVersion": 1.5
},
{
"parameters": {
"content": "## 3. Cr\u00e9er une page de rapport vide dans Notion \n[En savoir plus sur le n\u0153ud Notion](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.notion/) \n\nUn choix a \u00e9t\u00e9 fait pour d\u00e9terminer o\u00f9 stocker le rapport final, et Notion a \u00e9t\u00e9 retenu pour sa facilit\u00e9. Cela peut facilement \u00eatre remplac\u00e9 par l\u2019outil de documentation de votre choix. \n\nSi vous souhaitez suivre ce guide, voici la base de donn\u00e9es Notion \u00e0 r\u00e9pliquer : [Jim\u2019s n8n DeepResearcher Database](https://jimleuk.notion.site/19486dd60c0c80da9cb7eb1468ea9afd?v=19486dd60c0c805c8e0c000ce8c87acf). \n",
"height": 560,
"width": 600,
"color": 7
},
"id": "527ad584-b518-4c5f-94d5-cd4a407519bf",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
2160,
528
],
"typeVersion": 1
},
{
"parameters": {
"content": "## 4. D\u00e9clencher la recherche en arri\u00e8re-plan \n[En savoir plus sur le n\u0153ud Execute Trigger](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.executeworkflow/) \n\nn8n g\u00e8re les t\u00e2ches asynchrones en les ex\u00e9cutant s\u00e9par\u00e9ment. Cela signifie que l\u2019utilisateur n\u2019a pas besoin d\u2019attendre ou de garder son navigateur ouvert pour que la recherche se termine. \n\nUne fois la t\u00e2che DeepResearch lanc\u00e9e, nous pouvons conclure le processus d'onboarding pour offrir une bonne exp\u00e9rience utilisateur. \n",
"height": 560,
"width": 640,
"color": 7
},
"id": "f0f5de15-347a-4aa1-ab8c-3a8923f4ce6c",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
2784,
528
],
"typeVersion": 1
},
{
"parameters": {
"content": "## 7. G\u00e9n\u00e9rer les requ\u00eates de recherche \n[En savoir plus sur le n\u0153ud Basic LLM](https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.chainllm/) \n\nComme un chercheur humain, DeepResearcher s\u2019appuie sur la recherche web comme source principale d\u2019information. Pour s\u2019assurer qu\u2019il couvre un large \u00e9ventail de sources, l\u2019IA g\u00e9n\u00e8re d\u2019abord des requ\u00eates pertinentes qui seront explor\u00e9es individuellement. \n",
"height": 540,
"width": 620,
"color": 7
},
"id": "7a21d078-6c2b-493c-bb48-bc4d21f970e5",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
1120,
1824
],
"typeVersion": 1
},
{
"parameters": {
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "75d18d88-6ba6-43df-bef7-3e8ad99ad8bd",
"operator": {
"type": "boolean",
"operation": "true",
"singleValue": true
},
"leftValue": "={{ $json.should_stop }}",
"rightValue": ""
}
]
},
"options": {}
},
"id": "b3baeb45-87c9-41b5-a740-83ce04403753",
"name": "Is Depth Reached?",
"type": "n8n-nodes-base.if",
"position": [
2240,
1376
],
"typeVersion": 2.2
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "90b3da00-dcd5-4289-bd45-953146a3b0ba",
"name": "all_learnings",
"type": "array",
"value": "={{ $json.all_learnings }}"
},
{
"id": "623dbb3d-83a1-44a9-8ad3-48d92bc42811",
"name": "all_urls",
"type": "array",
"value": "={{ $json.all_urls }}"
}
]
},
"options": {}
},
"id": "4b6e6df6-83c9-47ae-b2f8-55c1e2041931",
"name": "Get Research Results",
"type": "n8n-nodes-base.set",
"position": [
2448,
1376
],
"typeVersion": 3.4
},
{
"parameters": {
"resource": "databasePage",
"operation": "getAll",
"databaseId": {
"__rl": true,
"value": "1b582fe2-6406-80cc-a599-f3535e872dd2",
"mode": "list",
"cachedResultName": "n8n DeepResearch",
"cachedResultUrl": "https://www.notion.so/1b582fe2640680cca599f3535e872dd2"
},
"limit": 1,
"filterType": "manual",
"matchType": "allFilters",
"filters": {
"conditions": [
{
"key": "Request ID|rich_text",
"condition": "equals",
"richTextValue": "={{ $json.requestId.toString() }}"
}
]
},
"options": {}
},
"id": "dfca3f5d-a8d2-4007-8c3d-b125c1a57de6",
"name": "Get Existing Row",
"type": "n8n-nodes-base.notion",
"position": [
1248,
1376
],
"typeVersion": 2.2,
"credentials": {
"notionApi": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"resource": "databasePage",
"operation": "update",
"pageId": {
"__rl": true,
"mode": "id",
"value": "={{ $json.id }}"
},
"propertiesUi": {
"propertyValues": [
{
"key": "Status|status",
"statusValue": "In progress"
}
]
},
"options": {}
},
"id": "3f5bc645-4d00-4b11-a50c-721415f40c76",
"name": "Set In-Progress",
"type": "n8n-nodes-base.notion",
"position": [
1440,
1376
],
"typeVersion": 2.2,
"credentials": {
"notionApi": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"resource": "databasePage",
"operation": "update",
"pageId": {
"__rl": true,
"mode": "id",
"value": "={{ $('Get Existing Row1').first().json.id }}"
},
"propertiesUi": {
"propertyValues": [
{
"key": "Status|status",
"statusValue": "Done"
},
{
"key": "Last Updated|date",
"date": "={{ $now.toISO() }}"
}
]
},
"options": {}
},
"id": "022adcc4-242f-47c8-9b47-f00c1a02b54a",
"name": "Set Done",
"type": "n8n-nodes-base.notion",
"position": [
3968,
2800
],
"executeOnce": true,
"typeVersion": 2.2,
"credentials": {
"notionApi": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"fieldToSplitOut": "tag",
"options": {}
},
"id": "4b59950b-de8f-4223-b1b8-0f9758166b47",
"name": "Tags to Items",
"type": "n8n-nodes-base.splitOut",
"position": [
2224,
2800
],
"typeVersion": 1
},
{
"parameters": {
"mode": "markdownToHtml",
"markdown": "={{ $json.text }}",
"options": {
"tables": true
}
},
"id": "f66d5cf1-dc87-4195-bc0e-48b054a7daa6",
"name": "Convert to HTML",
"type": "n8n-nodes-base.markdown",
"position": [
1904,
2800
],
"typeVersion": 1
},
{
"parameters": {
"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) }}"
}
]
},
"options": {}
},
"id": "bd70eb80-402d-4cb0-841f-1590a715a178",
"name": "HTML to Array",
"type": "n8n-nodes-base.set",
"position": [
2064,
2800
],
"typeVersion": 3.4
},
{
"parameters": {
"promptType": "define",
"text": "={{ $json.tag.trim() }}",
"messages": {
"messageValues": [
{
"message": "=Convertis le HTML suivant en son \u00e9quivalent de Bloc Notion selon le sch\u00e9ma API de Notion.\n* Assure-toi que le contenu est toujours inclus et reste le m\u00eame.\n* Renvoie uniquement une r\u00e9ponse JSON.\n* G\u00e9n\u00e8re des blocs de niveau enfant. Ne d\u00e9finis pas de propri\u00e9t\u00e9 \"parent\" ou \"children\".\n* Privil\u00e9gie fortement les titres, paragraphes, tableaux et des blocs de listes.\n* Les titres disponibles sont heading_1, heading_2 et heading_3 - h4, h5, h6 doivent utiliser le type heading_3 \u00e0 la place. Assure-toi que les titres utilisent la d\u00e9finition de texte enrichi.\n* Assure-toi que les blocs de listes incluent tous les \u00e9l\u00e9ments de la liste.\n\n## Exemples\n\n1. Titres\n```\n<h3 id=\"references\">References</h3>\n```\nse convertirait en\n```\n{\"object\": \"block\", \"type\": \"heading_3\", \"heading_3\": { \"rich_text\": [{\"type\": \"text\",\"text\": {\"content\": \"References\"}}]}}\n```\n\n2. Listes\n```\n<ul><li>hello</li><li>world</li></ul>\n```\nse convertirait en\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. Tableaux\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```\nse convertirait en\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```\n\n4. Liens d'ancrage\nPuisque Notion ne prend pas en charge les liens d'ancrage, convertis-les simplement en blocs de texte enrichi \u00e0 la place.\n```\n<a href=\"#module-0-pre-course-setup-and-learning-principles\">Module 0: Pre-Course Setup and Learning Principles</a>\n```\nse convertit en\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```\n\n5. Parties HTML invalides\nLorsque le HTML n'est pas syntaxiquement valide, par ex. des balises de fermeture orphelines, ignore simplement la conversion et utilise un bloc de texte enrichi vide.\n```\n</li>\\n</ol>\n```\npeut \u00eatre remplac\u00e9 par\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```"
}
]
}
},
"id": "a2504874-b5ca-484b-a571-0f0bf7dd1118",
"name": "Notion Block Generator",
"type": "@n8n/n8n-nodes-langchain.chainLlm",
"position": [
2384,
2800
],
"typeVersion": 1.5
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "73fcb8a0-2672-4bd5-86de-8075e1e02baf",
"name": "=block",
"type": "array",
"value": "={{\n(function(){\n const block = $json.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}}"
}
]
},
"options": {}
},
"id": "1b73c242-e7f5-4afc-bb17-630d4f96db8a",
"name": "Parse JSON blocks",
"type": "n8n-nodes-base.set",
"position": [
2704,
2800
],
"executeOnce": false,
"typeVersion": 3.4,
"onError": "continueRegularOutput"
},
{
"parameters": {
"method": "PATCH",
"url": "=https://api.notion.com/v1/blocks/{{ $('Get Existing Row1').first().json.id }}/children",
"authentication": "predefinedCredentialType",
"nodeCredentialType": "notionApi",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "Notion-Version",
"value": "2022-06-28"
}
]
},
"sendBody": true,
"specifyBody": "json",
"jsonBody": "={{\n{\n \"children\": $json.block\n}\n}}",
"options": {
"timeout": "={{ 1000 * 60 }}"
}
},
"id": "2c14e407-d07b-486f-866e-c14a918558d2",
"name": "Upload to Notion Page",
"type": "n8n-nodes-base.httpRequest",
"maxTries": 2,
"position": [
3968,
2960
],
"retryOnFail": true,
"typeVersion": 4.2,
"waitBetweenTries": 3000,
"credentials": {
"notionApi": {
"name": "<your credential>"
}
},
"onError": "continueRegularOutput"
},
{
"parameters": {
"content": "## 8. Recherche web et extraction de contenu avec [APIFY.com](https://www.apify.com?fpr=414q6) \n[En savoir plus sur le n\u0153ud HTTP Request](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.httprequest/) \n\nJ\u2019ai choisi de ne pas utiliser Firecrawl.ai en raison de son co\u00fbt \u00e9lev\u00e9 et du fait qu\u2019un crawler classique fonctionne tout aussi bien et plus rapidement. \n\n\u00c0 la place, j\u2019utilise [APIFY.com](https://www.apify.com?fpr=414q6), un service de web scraping plus performant, rentable et fiable. Si vous pr\u00e9f\u00e9rez un autre service, vous pouvez bien s\u00fbr le remplacer. \n\nC\u2019est l\u2019\u00e9tape la plus passionnante pour tester des am\u00e9liorations et optimisations : int\u00e9grer des sources internes, ajouter Perplexity.ai ou Jina.ai, etc. Les possibilit\u00e9s sont infinies ! \n",
"height": 740,
"width": 1180,
"color": 7
},
"id": "25d7c97f-38b2-4605-8515-85245fabd415",
"name": "Sticky Note5",
"type": "n8n-nodes-base.stickyNote",
"position": [
1760,
1824
],
"typeVersion": 1
},
{
"parameters": {
"content": "## 5. Passer le rapport au statut \"En cours\" \n[En savoir plus sur le n\u0153ud Notion](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.notion/) \n",
"height": 360,
"width": 460,
"color": 7
},
"id": "4157d159-5b09-4a09-8089-a22f4c2ce067",
"name": "Sticky Note6",
"type": "n8n-nodes-base.stickyNote",
"position": [
1136,
1264
],
"typeVersion": 1
},
{
"parameters": {
"content":
Credentials you'll need
Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.
notionApiopenRouterApiperplexityApi
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
How this works
This workflow automates deep research by taking a user query through a form, generating targeted search queries with AI, and structuring the results for clear analysis. It suits researchers, analysts, and professionals who need thorough, organised insights without manual searching across multiple sources. The core step chains an LLM to produce SERP queries, then parses outputs into structured data ready for further processing or export.
Use it when you require comprehensive coverage of a topic rather than quick answers, but skip it for time-sensitive or very narrow queries where a single search suffices. A common variation replaces the form trigger with an email or Slack integration to receive requests automatically.
About this workflow
Deep Research new (fr). Uses outputParserStructured, formTrigger, chainLlm, form. Event-driven trigger; 82 nodes.
Source: https://github.com/thibaud57/n8n-backups/blob/7398780dd55b526369b38c83666d2f47cb53ff0f/workflows/joG8biXfpcc7Aa4S.json — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
The AI-Powered Shopify SEO Content Automation is an enterprise-grade workflow that transforms product content creation for e-commerce stores. This sophisticated multi-agent system integrates GPT-4o, C
This template attempts to replicate OpenAI's DeepResearch feature which, at time of writing, is only available to their pro subscribers.
My workflow 53. Uses formTrigger, httpRequest, lmChatOpenAi, form. Event-driven trigger; 74 nodes.
Who is this for? Agencies, consultants, and service providers who conduct discovery calls and need to quickly turn conversations into professional proposals.
Receives campaign parameters via form, creates a Smartlead campaign, sources qualified leads through Wiza based on your ICP description, researches each prospect with Perplexity AI, generates personal