This workflow corresponds to n8n.io template #12504 — we link there as the canonical source.
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 →
{
"id": "OwMONonmVWTLe9hS",
"name": "Research topics using AI agents with web search, verification, and report generation",
"tags": [],
"nodes": [
{
"id": "0332ce76-4af7-42a3-b49b-588a792f3aec",
"name": "Read URL content in Jina AI",
"type": "n8n-nodes-base.jinaAiTool",
"position": [
3264,
4000
],
"parameters": {
"url": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('URL', ``, 'string') }}",
"options": {},
"requestOptions": {},
"descriptionType": "manual",
"toolDescription": "**Web Content Extraction Tool**\n\nExtracts clean, readable text content from any web URL, removing ads, navigation, and formatting clutter.\n\n**Input:** Any valid web URL\n**Output:** Clean, structured text content from the page\n\n**Use When:** \n- Need full content from URLs found via Serper searches\n- Want to read articles, blog posts, or web pages thoroughly\n- Research requires detailed content analysis beyond search snippets\n\n**Best Practice:** Always use after Serper to get complete information from promising URLs."
},
"credentials": {
"jinaAiApi": {
"name": "<your credential>"
}
},
"retryOnFail": true,
"typeVersion": 1
},
{
"id": "77aa28be-5c93-4023-8e19-4dc87e8e2c06",
"name": "Think1",
"type": "@n8n/n8n-nodes-langchain.toolThink",
"position": [
3392,
4000
],
"parameters": {
"description": "=**Strategic Reasoning Engine**\n\nProvides structured thinking space for complex analysis, planning, and decision-making. Maintains thought log across agent calls.\n\n**Use When:**\n- Breaking down complex multi-step tasks\n- Analyzing trade-offs between strategic options\n- Connecting insights from multiple sources\n- Planning next steps in agent workflow\n- Need to \"think out loud\" through problems\n\n**Best Practice:** Use at start of complex tasks and between major agent calls for continuity."
},
"typeVersion": 1
},
{
"id": "718b8f17-c7fb-4136-8105-a5b8a7f5d773",
"name": "OpenRouter Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
"position": [
3136,
4000
],
"parameters": {
"model": "openrouter/auto",
"options": {}
},
"credentials": {
"openRouterApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "5e168b52-84bd-4bce-bdea-b6063f3d4f31",
"name": "Think Tool Analysis",
"type": "@n8n/n8n-nodes-langchain.toolThink",
"position": [
4848,
3488
],
"parameters": {
"description": "=**Analysis Phase - Synthesize All Retrieved Texts**\n\nYour job: Analyze retrieved content to create strategic insights.\n\nRequired Analysis:\n1. Map findings to user query:\n \"User asked about Prop 12 challenges\"\n \n2. Identify patterns:\n \"Pattern: All constitutional challenges have failed\"\n \"Pattern: Enforcement increasing in 2024\"\n \n3. Note contradictions:\n \"9th Circuit upheld, but 6th Circuit questioning\"\n \n4. Identify gaps:\n \"No enforcement data after July 2024\"\n \n5. Develop insights:\n \"Legal challenges exhausted, focus shifting to compliance\"\n \n6. Form recommendations:\n \"Monitor state-level adoption rather than federal challenges\"\n\nFocus on:\n- Connecting dots between sources\n- Finding non-obvious patterns\n- Creating actionable intelligence\n\nThis shapes the final strategic report - think deeply!"
},
"typeVersion": 1
},
{
"id": "a7363f76-c780-4901-b2e8-834e5d8e3d2f",
"name": "Retry if Tools Not Used",
"type": "n8n-nodes-base.if",
"position": [
4368,
3264
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "9bc6faa2-c596-4d24-8e2f-6f7888987d29",
"operator": {
"type": "object",
"operation": "empty",
"singleValue": true
},
"leftValue": "={{ $json.intermediateSteps[0] }}",
"rightValue": ""
},
{
"id": "2aa597be-e115-4022-8abc-99909f29fd83",
"operator": {
"type": "number",
"operation": "lt"
},
"leftValue": "={{ $runIndex }}",
"rightValue": 4
}
]
}
},
"typeVersion": 2.2
},
{
"id": "28ee2ca2-a438-4572-b7f1-84bbe4e6863c",
"name": "Retry if Response Empty1",
"type": "n8n-nodes-base.if",
"position": [
5056,
3264
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "9bc6faa2-c596-4d24-8e2f-6f7888987d29",
"operator": {
"type": "string",
"operation": "empty",
"singleValue": true
},
"leftValue": "={{ $json.output }}",
"rightValue": ""
},
{
"id": "2aa597be-e115-4022-8abc-99909f29fd83",
"operator": {
"type": "number",
"operation": "lt"
},
"leftValue": "={{ $runIndex }}",
"rightValue": 4
}
]
}
},
"typeVersion": 2.2
},
{
"id": "e701b64e-9a56-466e-abc4-28fedb9cd02d",
"name": "Auto Fallback3",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
"position": [
4720,
3488
],
"parameters": {
"model": "openrouter/auto",
"options": {
"temperature": 0.6
}
},
"credentials": {
"openRouterApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "d6903e54-39cc-496f-9c38-40a457c74f2d",
"name": "Serper API 2",
"type": "n8n-nodes-base.httpRequestTool",
"position": [
3520,
4000
],
"parameters": {
"url": "https://google.serper.dev/search",
"method": "POST",
"options": {
"batching": {
"batch": {
"batchSize": 1
}
},
"redirect": {
"redirect": {}
},
"response": {
"response": {
"neverError": true,
"fullResponse": true
}
}
},
"sendBody": true,
"authentication": "genericCredentialType",
"bodyParameters": {
"parameters": [
{
"name": "q",
"value": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('parameters0_Value', `Plain text search query`, 'string') }}"
}
]
},
"genericAuthType": "httpHeaderAuth",
"toolDescription": "=Performs live Google searches and returns featured snippets, organic results, FAQs, maps, and more. Best for up-to-date information and broad query coverage."
},
"credentials": {
"httpHeaderAuth": {
"name": "<your credential>"
}
},
"typeVersion": 4.3
},
{
"id": "a0cc6087-161c-487f-ba2d-4cc3ab00eac3",
"name": "Semantic Scholar 2",
"type": "n8n-nodes-base.httpRequestTool",
"position": [
3648,
4000
],
"parameters": {
"url": "https://api.semanticscholar.org/graph/v1/paper/search",
"options": {
"batching": {
"batch": {
"batchSize": 1
}
},
"response": {
"response": {
"neverError": true,
"fullResponse": true
}
}
},
"sendQuery": true,
"queryParameters": {
"parameters": [
{
"name": "query",
"value": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('parameters0_Value', `A plain-text search query string.\n\nMANDATORY FIELD - ALWAYS MAKE SURE THIS FIELD IS FILLED OUT OR THE TOOL CALL WILL FAIL`, 'string') }}"
},
{
"name": "limit",
"value": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('parameters1_Value', `integer\nDefault: 100\n\nThe maximum number of results to return.\nMust be <= 100`, 'string') }}"
}
]
},
"toolDescription": "=# Semantic Scholar\n\n**Use when query contains:**\nacademic, paper, research, study, journal, peer-reviewed, citation, published, scientific evidence, literature review, author publications\n\n**Returns:**\nPapers, citations, abstracts, authors, references\n\n**NOT for:**\nNews, blogs, books, patents, websites"
},
"typeVersion": 4.3
},
{
"id": "94e6408f-c247-4e98-b339-c22dcb40a643",
"name": "LinkedinScraper 2",
"type": "n8n-nodes-base.httpRequestTool",
"position": [
3776,
4000
],
"parameters": {
"url": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('URL', `The complete ScrapingDog LinkedIn API URL in format https://api.scrapingdog.com/linkedin?type=profile&linkId={linkedinID}&private=false where {linkedinID} is the profile identifier extracted from the LinkedIn URL - for example, from linkedin.com/in/john-smith-123abc use john-smith-123abc, or from linkedin.com/in/sarah-jones-456 use sarah-jones-456.\n\nMANDATORY FIELD - ALWAYS MAKE SURE THIS FIELD IS FILLED OUT OR THE TOOL CALL WILL FAIL`, 'string') }}",
"options": {
"batching": {
"batch": {
"batchSize": 1
}
},
"response": {
"response": {
"neverError": true,
"fullResponse": true
}
}
},
"authentication": "genericCredentialType",
"genericAuthType": "httpQueryAuth",
"toolDescription": "**LinkedIn Profile Intelligence**\n\nExtracts professional information from LinkedIn profiles including job history, connections, and public posts.\n\n**Input:** `linkedinID` - The profile identifier from LinkedIn URL (e.g., \"john-smith-123\" from linkedin.com/in/john-smith-123)\n\nFormat the URL as follows: https://api.scrapingdog.com/linkedin?type=profile&linkId={linkedinID}&private=false\n\n**Use When:** Need professional background, career progression, or business connections for outreach planning."
},
"credentials": {
"httpQueryAuth": {
"name": "<your credential>"
}
},
"typeVersion": 4.3
},
{
"id": "3d234641-9eeb-46b3-a22a-329901925b5f",
"name": "InstagramScraper 2",
"type": "n8n-nodes-base.httpRequestTool",
"position": [
3904,
4000
],
"parameters": {
"url": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('URL', `The complete ScrapingDog Instagram API URL in format https://api.scrapingdog.com/instagram/profile?username={username} where {username} is the Instagram handle without the @ symbol - for example, for @veganactivist use veganactivist, or for @earthlings_official use earthlings_official.\n\nMANDATORY FIELD - ALWAYS MAKE SURE THIS FIELD IS FILLED OUT OR THE TOOL CALL WILL FAIL`, 'string') }}",
"options": {
"batching": {
"batch": {
"batchSize": 1
}
},
"response": {
"response": {
"neverError": true,
"fullResponse": true
}
}
},
"authentication": "genericCredentialType",
"genericAuthType": "httpQueryAuth",
"toolDescription": "**Instagram Content & Profile Analysis**\n\nExtracts profile information, recent posts, captions, and hashtags from public Instagram accounts.\n\n**Input:** `username` - Instagram username without @ symbol\n\nFormat as a URL like this: https://api.scrapingdog.com/instagram/profile?username={username}\n\n**Use When:** Understanding visual content strategy, audience engagement, or lifestyle/values presentation."
},
"credentials": {
"httpQueryAuth": {
"name": "<your credential>"
}
},
"typeVersion": 4.3
},
{
"id": "e3638b39-b10f-49db-a2ab-c7722e0b1555",
"name": "XPostScraper 2",
"type": "n8n-nodes-base.httpRequestTool",
"position": [
4032,
4000
],
"parameters": {
"url": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('URL', `The complete ScrapingDog X/Twitter post API URL in format http://api.scrapingdog.com/x/post?tweetId={tweetId}&parsed=true where {tweetId} is the numerical tweet ID extracted from the status URL - for example, from x.com/user/status/1234567890123456789 use 1234567890123456789, or from twitter.com/user/status/9876543210987654321 use 9876543210987654321.\n\nMANDATORY FIELD - ALWAYS MAKE SURE THIS FIELD IS FILLED OUT OR THE TOOL CALL WILL FAIL`, 'string') }}",
"options": {
"batching": {
"batch": {
"batchSize": 1
}
},
"response": {
"response": {
"neverError": true,
"fullResponse": true
}
}
},
"authentication": "genericCredentialType",
"genericAuthType": "httpQueryAuth",
"toolDescription": "**Individual Tweet Content Extraction**\n\nRetrieves detailed information about a specific tweet including text, engagement metrics, and replies.\n\n**Input:** `tweetId` - The tweet ID from the URL (e.g., \"1234567890\" from x.com/user/status/1234567890)\n\nFormat URL as follows: http://api.scrapingdog.com/x/post?tweetId={tweetId}&parsed=true\n\n**Use When:** Analyzing specific statements, reactions, or viral content for strategic response."
},
"credentials": {
"httpQueryAuth": {
"name": "<your credential>"
}
},
"typeVersion": 4.3
},
{
"id": "a17c2c6b-786f-4c03-b5ad-63190baa9788",
"name": "XProfileScraper 2",
"type": "n8n-nodes-base.httpRequestTool",
"position": [
4160,
4000
],
"parameters": {
"url": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('URL', `The complete ScrapingDog X/Twitter profile API URL in format http://api.scrapingdog.com/x/profile?profileId={profileId}&parsed=true where {profileId} is the Twitter username from the profile URL - for example, from x.com/elonmusk use elonmusk, or from twitter.com/POTUS use POTUS (username only, no @ symbol).\n\nMANDATORY FIELD - ALWAYS MAKE SURE THIS FIELD IS FILLED OUT OR THE TOOL CALL WILL FAIL`, 'string') }}",
"options": {
"batching": {
"batch": {
"batchSize": 1
}
},
"response": {
"response": {
"neverError": true,
"fullResponse": true
}
}
},
"authentication": "genericCredentialType",
"genericAuthType": "httpQueryAuth",
"toolDescription": "**Twitter Profile & Content Analysis**\n\nRetrieves profile information and recent posts from Twitter/X accounts.\n\n**Input:** `profileId` - Twitter username (e.g., \"username\" from x.com/username)\n\nFormat URL as follows: http://api.scrapingdog.com/x/profile?profileId={profileId}&parsed=true\n\n**Use When:** Understanding someone's public positions, communication style, or recent activity on Twitter."
},
"credentials": {
"httpQueryAuth": {
"name": "<your credential>"
}
},
"typeVersion": 4.3
},
{
"id": "8fbf5f8f-f562-48e6-a780-60d735e938d9",
"name": "Qwen3",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
"position": [
3008,
4000
],
"parameters": {
"model": "qwen/qwen3-235b-a22b",
"options": {}
},
"credentials": {
"openRouterApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "60319d4d-dd9c-4895-a4cf-7be5990c715b",
"name": "Opus",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
"position": [
4592,
3488
],
"parameters": {
"model": "anthropic/claude-opus-4.5",
"options": {
"temperature": 0.6
}
},
"credentials": {
"openRouterApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "14b6a030-0d52-4ffa-97b9-3d711b0a2c81",
"name": "Set Prompt",
"type": "n8n-nodes-base.set",
"position": [
2784,
3264
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "f0e944ba-d653-4410-89fb-4443da70f982",
"name": "prompt",
"type": "string",
"value": "={{ $json.prompt || ($json.body && $json.body.prompt) || '' }}"
},
{
"id": "96615b23-6fbe-4a14-95f2-ac6159fd3495",
"name": "source",
"type": "string",
"value": "={{ $json.webhookUrl ? 'webhook' : 'workflow' }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "b39dc72a-88d5-4021-8332-621c351928bb",
"name": "Searching For Information",
"type": "@n8n/n8n-nodes-langchain.agent",
"onError": "continueRegularOutput",
"position": [
3520,
3264
],
"parameters": {
"text": "={{ $json.prompt }}",
"options": {
"systemMessage": "=# \ud83d\udd0d Intelligence & Research Agent\n\nYou are an adaptive intelligence analyst conducting comprehensive multi-domain research. Focus on finding actionable intelligence with verifiable sources.\n\n**IMPORTANT:** This agent operates in a single one-shot run. It cannot ask questions, request clarifications, or wait for further input. You must produce a full, comprehensive, final answer addressing the query completely and accurately based on the tools and data collected. No partial answers or deferrals allowed.\n\nCurrent date/time: {{ $now }}\n\n---\n\n## \ud83d\udea8 Critical Execution Law\n\n1. **Mandatory Parallel Tool Execution**\n * Upon start, immediately execute **all tools listed below** simultaneously on the research topic or entity.\n * No skipping, no filtering, no early conclusions until **every** tool returns results or a failure log.\n\n2. **Verification & Completeness**\n * Cross-check controversial or critical claims via multiple tools.\n\n---\n\n## \ud83d\udcdc Toolset \u2014 Mandatory Every Time\n\n### Start Here (Always)\n* **Serper API** \u2014 Web and news search, multiple query variations\n* **Open Paws Database** \u2014 Historical campaigns, proven strategies\n\n### For Scientific Claims\n* **Semantic Scholar** \u2014 Academic papers, expert consensus\n\n### For Deep Analysis\n* **Read URL (Jina)** \u2014 Extract full text and metadata from all collected URLs\n\n---\n\n## \u2705 Quality Enforcement Checklist\n\n* All tools run on every query without fail\n* Every tool call used complete URL with all required parameters\n* 100% URLs passed to Jina Reader and processed\n* Every fact linked to an exact URL or `[Source: Tool Name]` if no URL\n* Contradictory evidence is included and cross-checked\n* Confidence levels stated for all critical findings\n\n---\n\n## Remember\n\nYour highest value is in **complete, actionable, verifiable intelligence.** Do not skip any tool or step. When in doubt, run additional queries or widen search terms.",
"enableStreaming": true,
"returnIntermediateSteps": true
},
"promptType": "define",
"needsFallback": true
},
"retryOnFail": true,
"typeVersion": 3
},
{
"id": "33d2f515-af48-4ce0-a5b3-86e687621cc3",
"name": "Writing Report",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
4656,
3264
],
"parameters": {
"text": "=Current Date & Time: {{ $now }}\n\n# RETRIEVED DATA FROM PREVIOUS AGENT\n{{\n (() => {\n const steps = $json.intermediateSteps;\n if (!steps || !Array.isArray(steps)) return 'No data retrieved';\n \n // First pass: extract essential info\n const cleanedData = steps.map((step, index) => {\n const observation = step.observation || 'No response';\n return {\n step: index + 1,\n tool: step.action?.tool || 'Unknown Tool',\n input: step.action?.toolInput || {},\n response: observation\n };\n }).filter(step => step.response && step.response !== 'No response');\n \n // Calculate per-response limit based on number of responses\n const totalMaxLength = 2400000; // Total character budget (~600K tokens)\n const responseCount = cleanedData.length;\n const overheadPerResponse = 200; // Estimate for step, tool, input fields\n const totalOverhead = responseCount * overheadPerResponse;\n const availableForResponses = totalMaxLength - totalOverhead;\n \n // Dynamic per-response limit (min 5000 chars, max 400000 chars per response)\n const perResponseLimit = Math.min(\n 400000, \n Math.max(5000, Math.floor(availableForResponses / responseCount))\n );\n \n // Truncate individual responses if needed\n const truncatedData = cleanedData.map(step => {\n let response = step.response;\n \n // Convert to string if needed\n if (typeof response !== 'string') {\n response = JSON.stringify(response, null, 1);\n }\n \n // Truncate if too long\n if (response.length > perResponseLimit) {\n response = response.substring(0, perResponseLimit) + \n `\\n... [TRUNCATED from ${response.length} to ${perResponseLimit} chars]`;\n }\n \n return {\n ...step,\n response: response.trim()\n };\n });\n \n // Final safety check on total size\n const finalStr = JSON.stringify(truncatedData, null, 1);\n if (finalStr.length > totalMaxLength) {\n // If still too big, be more aggressive with largest responses\n const sorted = truncatedData.sort((a, b) => \n b.response.length - a.response.length\n );\n \n // Truncate the largest responses more aggressively\n for (let i = 0; i < Math.min(5, sorted.length); i++) {\n const newLimit = Math.floor(perResponseLimit * 0.5);\n if (sorted[i].response.length > newLimit) {\n sorted[i].response = sorted[i].response.substring(0, newLimit) + \n `\\n... [TRUNCATED to ${newLimit} chars]`;\n }\n }\n \n // Re-sort by original order\n truncatedData.sort((a, b) => a.step - b.step);\n }\n \n return JSON.stringify(truncatedData, null, 1);\n })()\n}}\n\n# INSTRUCTIONS\n\nThink hard about this task. Set reasoning to high and verbosity to high. Write a comprehensive intelligence report for the above organization that directly addresses the report goal using all available intelligence.\n\n# REPORT GOAL\n\n{{ $('Set Prompt').item.json.prompt }}",
"options": {
"maxIterations": 10,
"systemMessage": "=# \ud83d\udcdd COMPREHENSIVE REPORT WRITING AGENT\n\n## Your Mission\nCreate a highly responsive report about the target subject that **directly answers what the user is asking for**. Focus on being immediately useful - lead with what matters most for their specific goal, whether that's technical analysis, research findings, strategic assessment, comparative evaluation, or synthesis of complex information.\n\n## CRITICAL: Automated System Instructions\n\n**YOU ARE PART OF AN AUTOMATED PIPELINE. This is a ONE-SHOT report generation with NO follow-up possible.**\n\n### Absolute Requirements:\n- You CANNOT interact with the user after this report\n- You CANNOT ask questions or request clarification \n- You CANNOT offer to do additional research or analysis\n- You MUST produce a complete, final report right now\n- You MUST work with whatever information you have\n\n### NEVER write phrases like:\n- \"Would you like me to...\"\n- \"I can also look into...\"\n- \"Let me know if you need...\"\n- \"Feel free to ask for...\"\n- \"I could further analyze...\"\n- \"If you want more detail on...\"\n- \"Should you need additional...\"\n- \"I'm happy to explore...\"\n- \"Would you prefer...\"\n- \"Shall I continue with...\"\n\n### INSTEAD:\n- Write a complete, self-contained report\n- Include all relevant analysis in THIS response\n- Make definitive statements and recommendations\n- Provide all insights you can generate NOW\n- Present findings as final deliverables\n\n### CITATION REQUIREMENTS:\n- **EVERY factual claim must include its source**\n- **ALWAYS include the full URL** when available\n- **Use inline citations** with [Source: URL] AND footnotes\n- **Never make unsourced claims** about verifiable facts\n- **If multiple sources support a claim**, cite all relevant ones\n\n### COMPREHENSIVENESS PRINCIPLE:\n**Create a LONG, DETAILED report with MOST IMPORTANT findings at the top**\n- **Executive Summary first** with key findings and recommendations\n- **Include ALL relevant information** from retrieved documents\n- **Don't summarize or condense** - be exhaustive with details\n- **Use extensive quotes** from source materials\n- **Provide complete analysis** of every relevant aspect\n- **Length is NOT a concern** - thoroughness is paramount\n- **Organize by importance** - critical findings first, supporting details follow\n- **Extract maximum value** from every document retrieved\n\n**This is your ONLY opportunity to provide value to the user. Make the report comprehensive, detailed, and complete. The user would rather have too much information than too little.**\n\n## CORE PRINCIPLES\n\n### 1. BE RESPONSIVE, NOT FORMULAIC\n- **Read the user's query carefully** - What do they actually want to know?\n- **Lead with the answer** - Put the most relevant findings first\n- **Adapt your structure** - Don't force information into rigid sections\n- **Match their needs** - Technical documentation needs different focus than strategic analysis\n\n### 2. MAXIMIZE VALUE FROM AVAILABLE DATA\n- **Use everything you found** - Every relevant piece of information\n- **Synthesize across sources** - Connect dots between different findings\n- **Create insight from patterns** - Analysis and assessment are valuable\n- **Don't apologize for gaps** - Focus on what you DO have\n\n### 3. INTELLIGENT ANALYSIS IS EXPECTED\n- **Draw conclusions** from the data\n- **Identify patterns** even if not explicit\n- **Assess implications** based on evidence\n- **Recommend approaches** tailored to their goal\n- **Connect findings** across different domains\n\n## WRITING APPROACH\n\n### Start with Impact\n- Begin with an executive summary that **directly answers their question**\n- Lead with the most important findings for their specific goal\n- Make the first paragraph count - it should give them immediate value\n\n### Organize by Relevance, Not Template\nInstead of forcing a rigid structure, organize based on:\n- **What matters most for their goal**\n- **What you found the most information about**\n- **Natural connections between findings**\n- **Logical flow for their use case**\n\n### Examples of Adaptive Structure:\n\n**For Technical Analysis:**\n1. Core findings and recommendations (first!)\n2. Technical details and specifications\n3. Performance analysis and benchmarks\n4. Implementation considerations\n5. Risk assessment and mitigation\n\n**For Research Synthesis:**\n1. Key conclusions from evidence (first!)\n2. Methodology and data quality\n3. Detailed findings by theme\n4. Contradictions and uncertainties\n5. Implications and future directions\n\n**For Comparative Evaluation:**\n1. Bottom-line recommendation (first!)\n2. Comparative matrix of key criteria\n3. Detailed analysis of each option\n4. Trade-offs and considerations\n5. Implementation roadmap\n\n**For Problem Analysis:**\n1. Root causes identified (first!)\n2. Evidence and pattern analysis\n3. Impact assessment\n4. Solution pathways\n5. Recommended approach\n\n## CONTENT GUIDELINES\n\n### What to Emphasize:\n- **Actionable insights** - What can they DO with this?\n- **Pattern recognition** - What themes emerge across sources?\n- **Strategic implications** - What does this mean for their goals?\n- **Concrete evidence** - Specific examples with sources\n- **Clear assessments** - Your analysis of what it means\n\n### What to Minimize:\n- Generic background (unless relevant)\n- Obvious information\n- Extensive preambles\n- Discussions of missing information\n- Apologetic language about data gaps\n\n### How to Handle Different Data Types:\n\n**Primary Sources (documents, data, specifications):**\n- Present prominently with specific details\n- Include exact quotes and numbers\n- Draw clear implications\n\n**Secondary Sources (articles, analyses, reports):**\n- Include with appropriate context\n- Note patterns across sources\n- Use for supporting arguments\n\n**Your Analysis:**\n- Clearly mark as analysis: \"This suggests...\" \"Analysis indicates...\"\n- Base on documented patterns\n- Connect to practical implications\n\n## WRITING STYLE\n\n### Be Direct and Clear\n- Start sections with key findings, not background\n- Use active voice and strong verbs\n- Make definitive statements where evidence supports\n- Avoid hedging when unnecessary\n\n### Good: \n\"The system exhibits three critical performance bottlenecks at scale, making horizontal scaling the only viable solution for 10x growth.\"\n\n### Weak: \n\"It appears that there might be some possible performance considerations that could potentially impact scalability in certain scenarios.\"\n\n### Use Natural Sections\nDon't force rigid headers. Use sections that make sense:\n- \"Critical Findings\"\n- \"Why This Approach Works\"\n- \"The Case for Option B\"\n- \"Key Risks and Mitigation\"\n- \"Where to Focus Efforts\"\n- \"Implementation Roadmap\"\n\n## SOURCE CITATION APPROACH\n\n### In-Text References\n- Include inline citations for specific claims: \"Python 3.12 introduced improved error messages [PEP 657]\"\n- Use parenthetical sources for flow: \"(15% improvement per benchmark suite)\"\n- Link important findings to sources naturally in text\n\n### End Sources Section\n- Complete list at the end under \"Sources\" or \"References\"\n- Include full URLs where available\n- Group by type if helpful (Documentation, Research Papers, Technical Specs, Media Coverage)\n- Don't apologize for what's not there\n\n## ADAPTIVE EXAMPLES\n\n### For \"Analyze the performance of [Technology X]\":\nStart with:\n> \"**Performance Summary:** [Technology X] demonstrates excellent throughput (50k req/sec) and low latency (p99 < 10ms) under normal load, but exhibits three critical bottlenecks at scale: connection pooling limits, memory allocation patterns, and lock contention on shared state. The most impactful optimization would be...\"\n\n### For \"Compare [Option A] vs [Option B]\":\nStart with:\n> \"**Recommendation: Option B for your use case.** While Option A offers better raw performance (2x throughput), Option B provides the operational simplicity and ecosystem maturity that align with your team's constraints. Specifically...\"\n\n### For \"What are the risks of [Approach X]?\":\nStart with:\n> \"**Risk Assessment: Moderate-High with mitigation path.** [Approach X] introduces three primary risk categories: technical debt accumulation (high probability, high impact), vendor lock-in (medium probability, high impact), and team skill gap (high probability, medium impact). The most critical concern is...\"\n\n### For \"Research [Topic X]\":\nStart with:\n> \"**Key Finding:** Current research strongly supports [conclusion], with 15 of 18 peer-reviewed studies showing consistent results. The mechanism appears to be [explanation], though two important limitations remain: [limitation 1] and [limitation 2]...\"\n\n## REPORT CHECKLIST\n\nBefore finishing, ensure you've:\n1. \u2713 Directly answered what they asked for\n2. \u2713 Led with most important findings for their goal\n3. \u2713 Included all relevant information found\n4. \u2713 Provided analysis and recommendations\n5. \u2713 Connected findings to actionable insights\n6. \u2713 Cited sources for factual claims\n7. \u2713 Adapted structure to their specific needs\n\n## OUTPUT INSTRUCTION\n\n**Write the report immediately.** No preamble about what you'll do - just start with the report itself. Begin with a compelling executive summary that directly addresses their goal, then organize remaining content by relevance to their specific query.\n\nRemember: Every request is different. A report about \"What's the best framework for X?\" needs a completely different structure than \"Analyze the security implications of Y\" or \"Research the current state of Z.\" \n\n**Be responsive, be useful, be direct.**",
"enableStreaming": true,
"returnIntermediateSteps": true
},
"promptType": "define",
"needsFallback": true
},
"retryOnFail": true,
"typeVersion": 2.2
},
{
"id": "d9b9db5e-fb2d-4d89-928a-f6408f8b7094",
"name": "Sticky Note12",
"type": "n8n-nodes-base.stickyNote",
"position": [
2624,
3568
],
"parameters": {
"color": 7,
"width": 1696,
"height": 720,
"content": "## \ud83e\uddf0 The Agent\u2019s Toolbox (Superpowers)\n\nThese nodes are the **tools** your agent can use \u2014 think of them as its superpowers \ud83e\uddb8\u200d\u2642\ufe0f\nEach tool gives the agent a specific ability, like searching the web, querying APIs, or fetching structured data.\n\n### \ud83e\udde0 How it works\n\nThe agent\u2019s *reasoning layer* analyzes your request and automatically selects the most relevant tool(s).\nYou don\u2019t need to choose tools manually \u2014 the agent handles this for you.\n\n### \ud83d\udd10 Credentials Required\n\nSome tools need credentials to run. Before using this workflow, make sure you configure:\n\n* **LLM credentials** (for reasoning & report writing)\n* **Search / API credentials** (for web or data sources)\n* **Any custom API keys** used by added tools\n\nNo credentials are included in this template.\n\n### \u2795 Add more tools\n\nTo extend the agent:\n\n1. Add a new tool node (HTTP Request, Google Sheets, APIs, etc.)\n2. Connect it to the agent\u2019s tool input\n3. Configure credentials (if needed)\n\nThe agent will automatically consider the new tool when answering future queries.\n"
},
"typeVersion": 1
},
{
"id": "3958b92a-1e92-412d-9fdf-bf03dce14d17",
"name": "Sticky Note5",
"type": "n8n-nodes-base.stickyNote",
"position": [
2544,
2512
],
"parameters": {
"color": 2,
"width": 992,
"height": 576,
"content": "# Research topics using AI agents with web search, verification, and report generation\n\n## How it works\n\nThis workflow accepts a research query via webhook or another workflow.\nIt performs structured web research using multiple AI agents, gathers\ninformation from different sources, verifies the findings, and generates\na final research report.\n\nThe workflow includes verification steps to reduce hallucinations and\nensure higher-quality outputs before returning the result.\n\n## Setup steps\n\n1. Add your AI provider credentials.\n2. Configure web search tools or APIs if required.\n3. Choose how the workflow is triggered (Webhook or Execute Workflow).\n4. Activate the workflow and send a research query.\n"
},
"typeVersion": 1
},
{
"id": "44c5f4e5-9468-4339-8e99-7656e692277c",
"name": "Sticky Note6",
"type": "n8n-nodes-base.stickyNote",
"position": [
3584,
2512
],
"parameters": {
"color": 2,
"width": 816,
"height": 416,
"content": "## \ud83d\udd10 Credentials Required\n\nThis workflow uses external tools that require credentials:\n\n- **OpenRouter API** \n Used for LLM reasoning, report writing, and verification.\n\n- **Jina AI** \n Used for web scraping and content extraction.\n\n- **ScrapingDog API** \n Used for scraping public content from sources like LinkedIn and X (Twitter).\n\nNo credentials are included in this template. \nYou must add your own credentials after importing the workflow.\n"
},
"typeVersion": 1
},
{
"id": "df95927e-5a10-4f9e-8ecf-c9fd2d91a4bb",
"name": "Trigger research request (Webhook)",
"type": "n8n-nodes-base.webhook",
"position": [
2560,
3168
],
"parameters": {
"path": "general-research",
"options": {},
"httpMethod": "POST",
"responseMode": "streaming"
},
"typeVersion": 2.1
},
{
"id": "9928fa27-c6a8-4814-b4ee-08ab77b675df",
"name": "Trigger research from another workflow",
"type": "n8n-nodes-base.executeWorkflowTrigger",
"position": [
2560,
3360
],
"parameters": {
"workflowInputs": {
"values": [
{
"name": "prompt"
}
]
}
},
"typeVersion": 1.1
},
{
"id": "6a0d2c1e-9ad5-41dc-ab75-fd06cf7cc5c9",
"name": "Structured Output Parser",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
5568,
3536
],
"parameters": {
"autoFix": true,
"schemaType": "manual",
"inputSchema": "{\n \"$schema\": \"http://json-schema.org/draft-07/schema#\",\n \"title\": \"Verification Report\",\n \"type\": \"object\",\n \"required\": [\"contains_hallucinations\", \"hallucinations\", \"summary\"],\n \"properties\": {\n \"contains_hallucinations\": {\n \"type\": \"boolean\",\n \"description\": \"True if ANY critical factual claim is not supported by retrieved documents\"\n },\n \"hallucinations\": {\n \"type\": \"array\",\n \"description\": \"List of specific unsupported claims\",\n \"items\": {\n \"type\": \"object\",\n \"required\": [\"exact_text\", \"issue_type\", \"severity\"],\n \"properties\": {\n \"exact_text\": {\n \"type\": \"string\",\n \"description\": \"The EXACT text from the report that is unsupported\"\n },\n \"issue_type\": {\n \"type\": \"string\",\n \"enum\": [\"unsupported_number\", \"unsupported_date\", \"false_quote\", \"missing_entity\", \"unsupported_event\", \"unsupported_claim\"],\n \"description\": \"Category of hallucination\"\n },\n \"severity\": {\n \"type\": \"string\",\n \"enum\": [\"critical\", \"moderate\", \"minor\"],\n \"description\": \"How problematic this hallucination is\"\n },\n \"searched_in\": {\n \"type\": \"string\",\n \"description\": \"Which documents were checked for this claim\"\n }\n }\n }\n },\n \"summary\": {\n \"type\": \"string\",\n \"description\": \"Brief summary - either 'All factual claims verified' or '3 critical hallucinations found: [list]'\"\n }\n }\n}"
},
"typeVersion": 1.3
},
{
"id": "f6372e0f-493d-4558-89a2-1f91a05a0464",
"name": "If hallucinations present",
"type": "n8n-nodes-base.if",
"position": [
5984,
3280
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "3ac4aa73-45ff-4140-90d6-58cb115f069c",
"operator": {
"type": "boolean",
"operation": "true",
"singleValue": true
},
"leftValue": "={{ $json.output.contains_hallucinations }}",
"rightValue": ""
},
{
"id": "e8b43be4-9505-4861-b915-801b10c87c06",
"operator": {
"type": "number",
"operation": "lt"
},
"leftValue": "={{ $runIndex }}",
"rightValue": 4
}
]
}
},
"typeVersion": 2.2
},
{
"id": "0e89baa6-0a27-4c6a-b27c-fbe4e1a29be2",
"name": "Set Report",
"type": "n8n-nodes-base.set",
"position": [
5296,
3280
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "0381fedf-0f65-4435-bd6f-197614916315",
"name": "Final Report",
"type": "string",
"value": "={{ $json.output }}"
},
{
"id": "e68ea8cd-497f-4734-8581-912436d883fe",
"name": "Retrieved Documents",
"type": "string",
"value": "={{ $json.intermediateSteps.slice(-500000) }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "4e97fb51-5f6d-437f-8074-15d3a5a10cf6",
"name": "Set Output",
"type": "n8n-nodes-base.set",
"position": [
7200,
3360
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "b943ce2b-92a7-4fb5-b49a-df2894d5e445",
"name": "report",
"type": "string",
"value": "={{ $('Set Report').item.json['Final Report'] }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "ca7ae9a4-e60d-4b55-9dc9-026062edb040",
"name": "Auto Fallback4",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
"position": [
5440,
3536
],
"parameters": {
"model": "openrouter/auto",
"options": {
"temperature": 0.2
}
},
"credentials": {
"openRouterApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "43b1afd7-37e1-48ca-949e-9ef5a10bd3d3",
"name": "Auto Fallback5",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
"position": [
6272,
3552
],
"parameters": {
"model": "openrouter/auto",
"options": {
"temperature": 0.1
}
},
"credentials": {
"openRouterApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "3e2ef803-4e71-4a80-8015-380b1362e34c",
"name": "Think Tool Analysis2",
"type": "@n8n/n8n-nodes-langchain.toolThink",
"position": [
6448,
3552
],
"parameters": {
"description": "=**Analysis Phase - Synthesize All Retrieved Texts**\n\nYour job: Analyze retrieved content to create strategic insights.\n\nRequired Analysis:\n1. Map findings to user query:\n \"User asked about Prop 12 challenges\"\n \n2. Identify patterns:\n \"Pattern: All constitutional challenges have failed\"\n \"Pattern: Enforcement increasing in 2024\"\n \n3. Note contradictions:\n \"9th Circuit upheld, but 6th Circuit questioning\"\n \n4. Identify gaps:\n \"No enforcement data after July 2024\"\n \n5. Develop insights:\n \"Legal challenges exhausted, focus shifting to compliance\"\n \n6. Form recommendations:\n \"Monitor state-level adoption rather than federal challenges\"\n\nFocus on:\n- Connecting dots between sources\n- Finding non-obvious patterns\n- Creating actionable intelligence\n\nThis shapes the final strategic report - think deeply!"
},
"typeVersion": 1
},
{
"id": "73385c0d-93e4-4ac6-b2e2-3eafad46631e",
"name": "If Empty Output",
"type": "n8n-nodes-base.if",
"position": [
6560,
3280
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "loose"
},
"combinator": "and",
"conditions": [
{
"id": "7c9099fa-f4dd-49de-a916-a344368bbeda",
"operator": {
"type": "string",
"operation": "empty",
"singleValue": true
},
"leftValue": "={{ $json.output }}",
"rightValue": ""
}
]
},
"looseTypeValidation": true
},
"typeVersion": 2.2
},
{
"id": "cac047ed-257b-4cf8-9e12-4735b5f2bd3b",
"name": "If Empty Output1",
"type": "n8n-nodes-base.if",
"position": [
5792,
3280
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "loose"
},
"combinator": "and",
"conditions": [
{
"id": "7c9099fa-f4dd-49de-a916-a344368bbeda",
"operator": {
"type": "object",
"operation": "empty",
"singleValue": true
},
"leftValue": "={{ $json.output }}",
"rightValue": ""
}
]
},
"looseTypeValidation": true
},
"typeVersion": 2.2
},
{
"id": "baa7257c-7916-4803-8b2d-a6d899b83db0",
"name": "Opus1",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
"position": [
6128,
3552
],
"parameters": {
"model": "anthropic/claude-opus-4.5",
"options": {
"temperature": 0.1
}
},
"credentials": {
"openRouterApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "02b6eaaf-4935-40a9-9459-95d3ecb051d7",
"name": "Sonnet",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
"position": [
5312,
3536
],
"parameters": {
"model": "anthropic/claude-sonnet-4.5",
"options": {
"temperature": 0.2
}
},
"credentials": {
"openRouterApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "ac4895d1-1b6c-4815-bf49-644f5c542b7b",
"name": "Respond to Webhook",
"type": "n8n-nodes-base.respondToWebhook",
"position": [
7200,
3168
],
"parameters": {
"options": {
"enableStreaming": true
},
"respondWith": "json",
"responseBody": "={{ JSON.stringify({ type: \"research_report\", data: { report: $json['report'], metadata: { generated_at: new Date().toISOString() } } }) }}"
},
"typeVersion": 1.5
},
{
"id": "5bea3a12-05bb-4611-b99b-957531843a20",
"name": "If Source is Webhook",
"type": "n8n-nodes-base.if",
"position": [
7008,
3280
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 3,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "6f78d9d5-176a-4660-8e24-f516502127ae",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $('Set Prompt').item.json.source }}",
"rightValue": "webhook"
}
]
}
},
"typeVersion": 2.3
},
{
"id": "1dd1865c-9dbb-431f-bd5b-4e7a685976b9",
"name": "Set Report1",
"type": "n8n-nodes-base.set",
"position": [
6768,
3280
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "7b69595c-0808-4da7-85c0-575a6aca2ce3",
"name": "report",
"type": "string",
"value": "={{ $('Set Report').item.json['Final Report'] }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "0ea7ab2c-9db3-47b4-a8b2-05651d05d4ed",
"name": "Verifying Report",
"type": "@n8n/n8n-nodes-langchain.chainLlm",
"position": [
5472,
3280
],
"parameters": {
"text": "=# \ud83d\udd0d REPORT VERIFICATION AGENT\n\n## THE CURRENT DATE & TIME IS {{ $now }}\n\n## Mission\nIdentify **only clear factual hallucinations that would materially mislead about the subject matter**. The report writer creates adaptive, analytically-rich reports - respect this approach. Focus on catching fabricated facts, not questioning analytical insights or strategic assessments.\n\n## Your Inputs\n1. **Final Report** - The completed report (may have adaptive structure based on user query)\n2. **Retrieved Content** - All verified sources and materials\n\n## CRITICAL PRINCIPLE: Support Good Report Writing\n\n### The Report Writer Is Supposed To:\n- **Adapt structure to user needs** - Don't flag non-standard formats\n- **Lead with most relevant findings** - Don't expect rigid section order\n- **Provide strategic analysis** - This is valuable, not hallucination\n- **Draw conclusions from patterns** - Inference from evidence is expected\n- **Make recommendations** - Strategic guidance is the point\n- **Connect dots across sources** - Synthesis is core value\n\n### Only Flag Clear Fabrications:\n- **Invented facts** with no basis in sources\n- **Wrong entities** (wrong subject, wrong attribution)\n- **False events** that didn't happen\n- **Major quantitative errors** (order of magnitude wrong)\n\n## WHAT IS NOT HALLUCINATION\n\n### 1. ADAPTIVE REPORT STRUCTURE\n**Always Acceptable:**\n- Non-standard section headers based on user query\n- Information organized by relevance, not template\n- Starting with key findings instead of background\n- Focusing entirely on specific aspects if that's what was asked\n- Omitting sections that aren't relevant to the query\n\n### 2. ANALYTICAL INSIGHTS\n**Always Acceptable:**\n- \"This finding suggests...\"\n- \"The pattern indicates...\"\n- \"Analysis reveals...\"\n- \"This creates an opportunity for...\"\n- \"The evidence points to...\"\n- \"Strategic implications include...\"\n\n### 3. PATTERN RECOGNITION\n**Always Acceptable:**\n- \"Multiple data points indicate...\"\n- \"The trend suggests...\"\n- \"The structure implies...\"\n- \"This pattern reveals...\"\n- \"Cross-referencing shows...\"\n\n### 4. STRATEGIC RECOMMENDATIONS\n**Always Acceptable:**\n- Implementation suggestions\n- Risk mitigation strategies\n- Optimization approaches\n- Decision frameworks\n- Best practices recommendations\n- Tactical guidance\n\n### 5. REASONABLE DOMAIN INFERENCES\n**Always Acceptable:**\n- Standard practices applied to the subject\n- Typical characteristics for the domain\n- Expected relationships based on context\n- Likely implications\n- Common challenges for the field\n\n## ACTUAL HALLUCINATIONS TO FLAG\n\n### 1. FABRICATED ENTITIES OR EVENTS\n**Must Flag Only If Completely False:**\n- Subject never existed or is wrong subject\n- Names that are fabricated\n- Events that never happened\n- Data points that are entirely fictional\n- Relationships that didn't occur\n\n**Don't Flag:**\n- Paraphrased descriptions of real events\n- Summarized information that captures essence\n- Combined information from multiple sources\n\n### 2. MAJOR QUANTITATIVE ERRORS\n**Must Flag Only If Materially Wrong:**\n- Numbers off by order of magnitude\n- Dates off by years or decades\n- Quantities drastically wrong\n- Measurements vastly incorrect\n\n**Don't Flag:**\n- Reasonable ranges from sources\n- Approximations (\"approximately,\" \"roughly\")\n- Minor rounding\n- Vague quantifiers (\"multiple,\" \"several\")\n\n### 3. WRONG CORE FACTS\n**Must Flag Only If Fundamentally Wrong:**\n- Wrong category or classification entirely\n- Incorrect fundamental attributes\n- False core characteristics\n- Misidentified subject matter\n\n**Don't Flag:**\n- Inferred capabilities from context\n- Assumed standard characteristics\n- Context-based assessments\n- Domain-appropriate interpretations\n\n## VERIFICATION APPROACH FOR ADAPTIVE REPORTS\n\n### Understand the User's Query First\nBefore verifying, consider:\n- What did the user ask for?\n- Is the report structure responsive to that?\n- Are emphasized points relevant to the query?\n- Does the analysis serve the stated goal?\n\n### Apply Context-Aware Verification\n- **For technical analysis:** Performance assessments are core, not hallucination\n- **For research synthesis:** Literature interpretation is expected\n- **For comparative evaluation:** Evaluative judgments are the point\n- **For problem analysis:** Root cause analysis is the goal\n\n### Respect Report Methodology\n- Connecting dots across sources is valid\n- Pattern identification is analytical work\n- Strategic assessment is expected output\n- Recommendations don't need source citations\n\n## SIMPLIFIED DECISION TREE\n\nFor each potential issue:\n\n1. **Is it strategic analysis or recommendation?**\n - YES \u2192 Never flag (this is the point of the report)\n - NO \u2192 Continue\n\n2. **Is it a reasonable inference from evidence?**\n - YES \u2192 Don't flag\n - NO \u2192 Continue\n\n3. **Is it materially false (not just imprecise)?**\n - NO \u2192 Don't flag\n - YES \u2192 Continue\n\n4. **Would it actually mislead about the subject?**\n - NO \u2192 Don't flag\n - YES \u2192 FLAG IT\n\n## OUTPUT FORMAT\n\nOnly flag clear, material hallucinations:\n\n```\nHALLUCINATION #[X]:\n**False Claim:** \"[Exact quote]\"\n**Why It's False:** [Not just missing, but demonstrably wrong]\n**Material Impact:** [How this would mislead decisions]\n**Severity:** [Only use Critical or Significant - no Minor flags]\n```\n\n### Summary:\n```\nVERIFICATION COMPLETE\nMaterial Hallucinations: [X]\nReport Assessment: [Reliable with minor issues / Needs correction / Generally accurate]\n\nNote: Strategic analysis and recommendations are features, not bugs.\n```\n\n## EXAMPLES - BE VERY PERMISSIVE\n\n### NEVER Flag These (All Acceptable):\n- \"The system's architecture creates potential bottlenecks\"\n- \"This pattern suggests underlying issues with\"\n- \"The data conflicts with stated objectives\"\n- \"Between 100-150 instances\" (when sources show this range)\n- \"Approximately 50 occurrences\" (even if sources say 45-55)\n- \"Vulnerable to scaling challenges given current design\"\n- \"Should prioritize addressing the core issue\"\n- \"Opportunity for improvement in this area\"\n- \"Established in the early 2010s\" (for 2012)\n- \"Rapidly developing field\" (general characterization)\n- \"Likely follows standard industry patterns\"\n- \"Would benefit from systematic approach\"\n\n### ONLY Flag These Clear Errors:\n- \"Established in 1990\" (when actually 2010 - major error)\n- \"Created by John Smith\" (when created by Jane Doe - wrong person)\n- \"Performance of 5000x baseline\" (when actually 5x - magnitude error)\n- \"Acquired by Company X in 2020\" (never happened)\n- \"System was shut down permanently\" (if this didn't happen)\n- \"50,000 users\" (when actually 500)\n\n## CRITICAL REMINDERS\n\n1. **The report's job is to be useful** - Don't punish usefulness\n2. **Analysis is not hallucination** - It's the core value\n3. **Adaptive structure is good** - Don't expect rigid formats\n4. **Strategic recommendations are expected** - Never flag these\n5. **Minor imprecision is acceptable** - Focus on material errors\n6. **When in doubt, don't flag** - We want rich, analytical reports\n\n## FINAL INSTRUCTION\n\nBe extremely permissive. Only flag things that are clearly, demonstrably false and would materially mislead someone making decisions about this subject. Remember: a report full of strategic insights, analytical assessments, and actionable recommendations is doing exactly what it should do.\n\n# RETRIEVED DOCUMENTS\n{{ \n (() => {\n const docs = $json['Retrieved Documents'] || '';\n // 2.4M chars (~600K tokens) - source materials, research data, documentation\n const maxChars = 2400000;\n const processedDocs = typeof docs === 'string' ? docs : JSON.stringify(docs, null, 1);\n \n if (processedDocs.length > maxChars) {\n // Try to truncate at a natural boundary\n let truncPoint = maxChars;\n const boundaries = [\n processedDocs.lastIndexOf('\\n\\n', maxChars), // Section break\n processedDocs.lastIndexOf('}\\n{', maxChars), // Between JSON objects\n processedDocs.lastIndexOf('\\n##', maxChars), // Markdown section\n processedDocs.lastIndexOf('Source:', maxChars), // Source boundary\n processedDocs.lastIndexOf('Document:', maxChars), // Document section\n processedDocs.lastIndexOf('Data:', maxChars), // Data section\n processedDocs.lastIndexOf('\\n', maxChars) // Line break\n ];\n \n for (const boundary of boundaries) {\n if (boundary > maxChars * 0.95) {\n truncPoint = boundary + 1;\n break;\n }\n }\n \n return processedDocs.substring(0, truncPoint) + \n '\\n\\n... [TRUNCATED - Verify only visible portion]';\n }\n return processedDocs;\n })()\n}}\n\n# FINAL REPORT TO VERIFY\n\n{{ \n (() => {\n const report = $json['Final Report'] || '';\n // 800K chars (~200K tokens) - full comprehensive report\n const maxChars = 800000;\n const processedReport = typeof report === 'string' ? report : JSON.stringify(report, null, 1);\n \n if (processedReport.length > maxChars) {\n // Try to truncate at a natural boundary\n let truncPoint = maxChars;\n const boundaries = [\n processedReport.lastIndexOf('\\n## ', maxChars), // Major section\n processedReport.lastIndexOf('\\n### ', maxChars), // Subsection\n processedReport.lastIndexOf('Analysis', maxChars), // Analysis sections\n processedReport.lastIndexOf('Finding', maxChars), // Finding sections\n processedReport.lastIndexOf('\\n**', maxChars), // Bold headers\n processedReport.lastIndexOf('\\n\\n', maxChars), // Paragraph break\n processedReport.lastIndexOf('. ', maxChars) // Sentence end\n ];\n \n for (const boundary of boundaries) {\n if (boundary > maxChars * 0.9) {
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.
httpHeaderAuthhttpQueryAuthjinaAiApiopenRouterApi
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
This workflow is designed for researchers, analysts, and knowledge workers who need to: Gather comprehensive information on complex topics from multiple web sources Get AI-synthesized insights rather than raw search results Ensure factual accuracy with built-in hallucination…
Source: https://n8n.io/workflows/12504/ — 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.
This workflow is designed for legal professionals, policy analysts, and compliance teams who need to: Research case law, legislation, and regulatory developments on specific topics Build comprehensive
Who is this for? Agencies, consultants, and service providers who conduct discovery calls and need to quickly turn conversations into professional proposals.
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
Deep Research new (fr). Uses outputParserStructured, formTrigger, chainLlm, form. Event-driven trigger; 82 nodes.
This comprehensive workflow automates the complete financial document processing pipeline using AI. Upload invoices via chat, drop expense receipts into a folder, or add bank statements - the system a