This workflow corresponds to n8n.io template #5430 — we link there as the canonical source.
This workflow follows the Chainllm → Chat Trigger 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": "ugY2Cg4sj2vP0rk6",
"meta": {
"templateCredsSetupCompleted": true
},
"name": "Market Research Generator",
"tags": [],
"nodes": [
{
"id": "76a873cb-d035-4ca4-8ca9-ca9d2b1d3aa1",
"name": "When chat message received",
"type": "@n8n/n8n-nodes-langchain.chatTrigger",
"position": [
-280,
-60
],
"parameters": {
"options": {}
},
"typeVersion": 1.1
},
{
"id": "75de6535-e334-4d64-a57f-7260df401a9d",
"name": "Anthropic Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
"position": [
580,
120
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "claude-sonnet-4-20250514",
"cachedResultName": "Claude 4 Sonnet"
},
"options": {}
},
"credentials": {},
"typeVersion": 1.3
},
{
"id": "ce9f1ce5-2e12-4acc-ad9c-f92ba13ca246",
"name": "Google Docs",
"type": "n8n-nodes-base.googleDocs",
"position": [
820,
-60
],
"parameters": {
"actionsUi": {
"actionFields": [
{
"text": "={{ $json.text }}",
"action": "insert"
}
]
},
"operation": "update",
"documentURL": "Redacted"
},
"credentials": {},
"typeVersion": 2
},
{
"id": "7932ae33-d1e4-4bb8-b38e-91b74435cb5f",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-340,
-180
],
"parameters": {
"width": 220,
"height": 500,
"content": "Chat Input Trigger"
},
"typeVersion": 1
},
{
"id": "0a490125-3a86-43cf-83c5-1b436e54e7ff",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-100,
-180
],
"parameters": {
"color": 5,
"width": 300,
"height": 500,
"content": "Define Research Scope"
},
"typeVersion": 1
},
{
"id": "09e33798-af03-45bf-b0a0-a01aa654d8e3",
"name": "Research Scope Definer Agent",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
-80,
-60
],
"parameters": {
"modelId": {
"__rl": true,
"mode": "list",
"value": "chatgpt-4o-latest",
"cachedResultName": "CHATGPT-4O-LATEST"
},
"options": {},
"messages": {
"values": [
{
"content": "={{ $json.chatInput }}"
},
{
"role": "system",
"content": "You are a market research planner, and a Perplexity (research) prompt agent.\n\nYour task is to take the following user query and define a structured scope of research to guide AI agents. Break it down into the following components:\n1. Industry/Business Type\n2. Geographic Focus\n3. Key Trends to Research\n4. Potential Opportunities/Challenges\n5. Suggested Data Sources (public reports, industry benchmarks, etc.)\n\nOutput a prompt meant for Perplexity research node based on the components."
}
]
}
},
"credentials": {},
"typeVersion": 1.8
},
{
"id": "17d56e9a-735f-4195-963b-e5939a596728",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
220,
-180
],
"parameters": {
"color": 2,
"width": 220,
"height": 500,
"content": "Perplexity Deep Research"
},
"typeVersion": 1
},
{
"id": "16ca83ec-c18d-4196-8122-0ca4dfeb0871",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
460,
-180
],
"parameters": {
"color": 5,
"width": 300,
"height": 500,
"content": "Business Case Builder"
},
"typeVersion": 1
},
{
"id": "4794c40e-9eef-4c91-9d31-56c07072537c",
"name": "Perplexity Business Case Deep Research",
"type": "n8n-nodes-base.perplexity",
"position": [
280,
-60
],
"parameters": {
"model": "sonar-deep-research",
"options": {},
"messages": {
"message": [
{
"role": "system",
"content": "You are a professional market analyst with access to real-time data and reports.\n\nYour task is to conduct deep web research based on the following structured research scope. Provide a concise, well-cited summary for each of the following areas:\n- Industry trends\n- Consumer behavior\n- Competitive landscape\n- Regulatory or environmental factors\n- Key statistics and data\n\nUse reliable sources (government reports, industry publications, global databases). Include in-text citation links in markdown format.\n\nPresent the research summary in clear sections with headings.\n"
},
{
"content": "={{ $json.message.content }}"
}
]
},
"requestOptions": {}
},
"credentials": {},
"typeVersion": 1
},
{
"id": "2de9f3f6-5e61-47c1-842d-c7bf996d4a1b",
"name": "Claude Business Case Writer",
"type": "@n8n/n8n-nodes-langchain.chainLlm",
"position": [
480,
-60
],
"parameters": {
"text": "={{ $json.choices[0].message.content }}",
"batching": {},
"messages": {
"messageValues": [
{
"message": "You are a business strategy consultant writing a professional market opportunity case study. You will receive user input from a Perplexity node which includes the thinking steps. exclude the content of the thinking steps, which is usually the content between <think> at the beginning of Perplexity's output. Use the structured topic scope and supporting research provided to write a well-organized, 1500-word case study. Your case study must include: 1. Executive Summary 2. Market Overview 3. Opportunity Analysis 4. Competitive Landscape 5. Challenges and Risks 6. Strategic Recommendations 7. Conclusion Maintain a formal and analytical tone. Use section headers. Ensure insights are backed by the research provided. "
}
]
},
"promptType": "define"
},
"typeVersion": 1.7
},
{
"id": "dbc5fc4a-3f45-45f6-a34c-c302900dedd0",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
780,
-180
],
"parameters": {
"color": 3,
"width": 300,
"height": 500,
"content": "Business Case Output on Google Docs"
},
"typeVersion": 1
},
{
"id": "756b169a-3f46-4671-a8fe-62d7732a3911",
"name": "Sticky Note5",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1340,
-240
],
"parameters": {
"color": 3,
"width": 980,
"height": 1000,
"content": "\ud83e\udde0 Market Research Case Study Generator\nCategory: AI + Research | GPT + Perplexity | Business Strategy\nSkill Level: Intermediate\nUse Case: Market Research, Business Planning, Strategic Analysis\n\n\ud83d\udccc Description:\nThis template automates the creation of comprehensive, data-backed business case studies\u2014perfect for entrepreneurs, analysts, consultants, and market researchers.\n\nFor more of such build + step-by-step video tutorials, check out:\nhttps://www.youtube.com/@Automatewithmarc\n\nJust send a simple message like:\n\n\u201cGive me a market opportunity analysis of a bicycle rental business in North Africa.\u201d\n\nAnd the workflow does the rest. It scopes your research topic, performs live web research, and crafts a well-structured 1500-word business case study\u2014all automatically saved to Google Docs.\n\n\ud83d\udd27 How It Works:\n\ud83d\udfe2 Chat Trigger:\nStart the workflow by sending a prompt via the built-in Chat interface (Langchain Chat Trigger).\n\n\ud83e\udded Research Scope Definer (GPT-4o):\nBreaks down the user input into structured components like industry, geography, trends, and challenges.\n\n\ud83c\udf10 Deep Research (Perplexity Sonar):\nPerforms live research to retrieve relevant industry data, consumer trends, competitive insights, and more.\n\n\ud83d\udcd8 Business Case Writer (Claude Sonnet):\nSynthesizes the findings into a detailed case study with sections including:\nExecutive Summary\nMarket Overview\nOpportunity Analysis\nCompetitive Landscape\nRisks & Challenges\nStrategic Recommendations\nConclusion\n\ud83d\udcc4 Google Docs Integration:\nThe final output is appended to a connected Google Doc, so all your insights are neatly stored and ready to share.\n\ud83e\uddf0 Tools Used:\nOpenAI GPT-4o\nPerplexity Sonar Deep Research\nAnthropic Claude Sonnet\nGoogle Docs\nChat Trigger\n\u2705 Ideal For:\nBusiness consultants & strategy teams\nMarket researchers & analysts\nStartup founders & product managers\nEducators & MBA students"
},
"typeVersion": 1
}
],
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "4122d186-b3c0-46d0-8a74-fdb918dc2ceb",
"connections": {
"Anthropic Chat Model": {
"ai_languageModel": [
[
{
"node": "Claude Business Case Writer",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"When chat message received": {
"main": [
[
{
"node": "Research Scope Definer Agent",
"type": "main",
"index": 0
}
]
]
},
"Claude Business Case Writer": {
"main": [
[
{
"node": "Google Docs",
"type": "main",
"index": 0
}
]
]
},
"Research Scope Definer Agent": {
"main": [
[
{
"node": "Perplexity Business Case Deep Research",
"type": "main",
"index": 0
}
]
]
},
"Perplexity Business Case Deep Research": {
"main": [
[
{
"node": "Claude Business Case Writer",
"type": "main",
"index": 0
}
]
]
}
}
}
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
This workflow contains community nodes that are only compatible with the self-hosted version of n8n.
Source: https://n8n.io/workflows/5430/ — 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 contains community nodes that are only compatible with the self-hosted version of n8n.
✨ Intro This workflow shows how to go beyond a “plain” AI chatbot by:
The original LLM Council concept was introduced by Andrej Karpathy and published as an open-source repository demonstrating multi-model consensus and ranking. This workflow is my adaptation of that or
Paste any text and get a verdict on whether it was written by a human, AI, or a hybrid mix. Instead of trusting one black-box score, this workflow runs your text through statistical analysis and a thr
This workflow turns a simple chat interface into a powerful personal expense tracker. Just describe your spending in plain language — the AI understands it, categorizes it, and saves it to Google Shee