This workflow corresponds to n8n.io template #12497 — we link there as the canonical source.
This workflow follows the Agent → Error 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": "XBocOjuWVNjlCCBV",
"meta": {
"templateCredsSetupCompleted": true
},
"name": "Generate pain-driven content ideas from market signals using AI",
"tags": [],
"nodes": [
{
"id": "f8862827-0854-4d81-b8d7-af0a2a2d778e",
"name": "Workflow Error Handler",
"type": "n8n-nodes-base.errorTrigger",
"position": [
-368,
848
],
"parameters": {},
"typeVersion": 1
},
{
"id": "532127a6-e52a-4899-abb5-c608c8b93938",
"name": "Send a message1",
"type": "n8n-nodes-base.gmail",
"position": [
-16,
848
],
"parameters": {
"message": "=\ud83d\udea8 *Workflow Error Alert* *Error Node:* {{ $json.node.name }} *Error Message:* {{ $json.error.message }} *Timestamp:* {{ $now.toISO() }} Please investigate immediately.",
"options": {},
"subject": "Workflow Error Alert",
"emailType": "text"
},
"typeVersion": 2.2
},
{
"id": "d27f3848-b553-4d52-bc72-016839845644",
"name": "Sticky Note7",
"type": "n8n-nodes-base.stickyNote",
"position": [
-448,
688
],
"parameters": {
"color": 7,
"width": 672,
"height": 336,
"content": "## Error Handling\nSends alerts when the workflow fails\n"
},
"typeVersion": 1
},
{
"id": "7dd9e60f-8fa6-40f2-a4cb-f5f92a7aba92",
"name": "Scheduled Market Discovery Trigger",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
-336,
32
],
"parameters": {
"rule": {
"interval": [
{}
]
}
},
"typeVersion": 1.3
},
{
"id": "8daaa7c4-d159-46dc-9a54-d0c6cef4cc78",
"name": "Inject Niche and Keyword Parameters",
"type": "n8n-nodes-base.set",
"position": [
-64,
32
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "105bdfc5-b28e-4d96-a993-af24e5b24fff",
"name": "body.niche",
"type": "string",
"value": "=n8n automations"
},
{
"id": "619782c6-212c-4782-86f7-6f7819f1c294",
"name": "body.query",
"type": "string",
"value": "=lead generation and CRM automation using n8n"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "0a37bc3e-08db-4169-ab51-d19d0d4ccad4",
"name": "Extract Raw User Pain Points from Public Discussions (AI)",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
256,
32
],
"parameters": {
"text": "=DISCOVERY REQUEST:\n\nNiche: \"{{ $json.body.niche }}\"\nResearch Topic / Keywords: \"{{ $json.body.query }}\"\n\nTask:\nScan public discussions related to the niche and keywords across the selected platforms.\n\nExtract:\n- Repeated pain points and frustrations\n- Common questions or complaints\n- Language users naturally use to describe their problems\n- Mentions of tools, workflows, or alternatives people talk about\n- Any marketing or growth challenges mentioned\n\nOutput requirements:\n- Write in clear bullet points\n- Group insights logically if needed\n- Focus on problems, not solutions\n- Ignore promotions, tutorials, or generic advice\n\nDo NOT format as JSON.\nThis output will be processed by another AI step.\n",
"options": {
"maxIterations": 30,
"systemMessage": "You are a market research discovery assistant.\n\nYour role:\n- Observe and summarize real user pain points from public online discussions\n- Capture authentic language and frustrations\n- Highlight patterns, not opinions\n\nRules:\n- Use only public information\n- Do not invent private or personal data\n- Be neutral and factual\n- Do not suggest solutions\n- Do not format output as JSON\n- Do not add conclusions or summaries\n\nYour output is raw discovery data for downstream processing.\n"
},
"promptType": "define",
"hasOutputParser": true
},
"typeVersion": 3
},
{
"id": "b11c119b-d9d8-468a-ab55-b1f44bc6d91a",
"name": "Public Search & Social Intelligence Connector (MCP)",
"type": "@n8n/n8n-nodes-langchain.mcpClientTool",
"position": [
416,
304
],
"parameters": {
"options": {},
"endpointUrl": "https://mcp.xpoz.ai/mcp",
"authentication": "bearerAuth"
},
"credentials": {
"httpBearerAuth": {
"name": "<your credential>"
}
},
"typeVersion": 1.2
},
{
"id": "2a68fcee-95d8-4323-80ed-8bc844433049",
"name": "OpenAI Reasoning Engine for Market Discovery",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
176,
304
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4o",
"cachedResultName": "gpt-4o"
},
"options": {},
"responsesApiEnabled": false
},
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.3
},
{
"id": "cb3853f8-a28e-4b27-9453-ccf313a47a8d",
"name": "Generate Pain-Driven Content Ideas from Market Signals (AI)",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
656,
32
],
"parameters": {
"text": "=CONTENT IDEA GENERATION TASK:\n\nYou are given raw market discovery insights below.\n\nINPUT DISCOVERY DATA:\n{{ $json.output }}\n\nYour task:\nConvert these pain points, frustrations, and user language into high-quality content ideas.\n\nFor each content idea, generate:\n- Content hook (scroll-stopping)\n- Best platform (LinkedIn, Twitter/X, Instagram)\n- Content format (Post, Thread, Carousel, Reel, Video)\n- Core pain point addressed\n- Why this content will resonate with the audience\n- Suggested CTA\n\nFocus on:\n- n8n automations\n- CRM and lead generation workflows\n- Complexity, learning curve, scaling, and integration issues\n\nAvoid:\n- Generic advice\n- Educational tutorials\n- Tool documentation tone\n\nThink like a growth marketer creating viral, pain-driven content.\n\nReturn ONLY valid JSON in the following format.\n",
"options": {
"maxIterations": 30,
"systemMessage": "You are a senior content strategist and growth marketer.\n\nYou specialize in:\n- Turning real customer pain points into high-performing content\n- B2B SaaS and automation niches\n- LinkedIn, Twitter/X, and Instagram content strategy\n\nRules:\n- Every idea must map to a real pain point\n- Hooks must be emotional, clear, and specific\n- Content must be creator-ready (can be posted as-is)\n- No fluff, no theory, no generic motivation\n- Output must be structured and actionable\n"
},
"promptType": "define"
},
"typeVersion": 3
},
{
"id": "8cb5e7ec-4930-4a0a-83b0-1712745ed6b6",
"name": "OpenAI Reasoning Engine for Content Ideation",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
656,
288
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4o",
"cachedResultName": "gpt-4o"
},
"options": {},
"responsesApiEnabled": false
},
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.3
},
{
"id": "2ed29e45-6a74-4b1c-b394-b71f0b7ac09a",
"name": "Normalize and Parse Content Ideas Output",
"type": "n8n-nodes-base.code",
"position": [
1040,
32
],
"parameters": {
"jsCode": "const item = $input.first();\n\nif (!item.json || !item.json.output) {\n throw new Error(\"Missing AI output\");\n}\n\nlet raw = item.json.output;\n\n// 1\ufe0f\u20e3 Remove markdown fences\nraw = raw\n .replace(/```json/gi, \"\")\n .replace(/```/g, \"\")\n .trim();\n\n// 2\ufe0f\u20e3 Parse JSON\nlet parsed;\ntry {\n parsed = JSON.parse(raw);\n} catch (error) {\n throw new Error(\"Failed to parse AI output as JSON: \" + error.message);\n}\n\n// 3\ufe0f\u20e3 Ensure array\nif (!Array.isArray(parsed)) {\n throw new Error(\"Parsed output is not an array\");\n}\n\n// 4\ufe0f\u20e3 Normalize BOTH old + new formats\nreturn parsed.map(item => {\n // NEW format (nested content_idea)\n const idea = item.content_idea || item;\n\n return {\n json: {\n platform:\n idea.platform ||\n idea.best_platform ||\n \"Unknown\",\n\n content_format:\n idea.format ||\n idea.content_format ||\n \"Post\",\n\n content_hook:\n idea.hook ||\n idea.content_hook ||\n \"\",\n\n pain_point:\n idea.pain_point ||\n idea.core_pain_point_addressed ||\n \"\",\n\n why_it_resonates:\n idea.reason_resonate ||\n idea.why_this_content_will_resonate ||\n \"\",\n\n cta:\n idea.cta ||\n idea.suggested_CTA ||\n \"\"\n }\n };\n});\n"
},
"typeVersion": 2
},
{
"id": "b3c898f5-bd0a-4a07-af12-52ac7c3447f6",
"name": "Append Content Ideas to Content Database ",
"type": "n8n-nodes-base.googleSheets",
"position": [
1408,
-128
],
"parameters": {
"columns": {
"value": {
"CTA": "={{ $json.cta }}",
"Status": "New",
"Platform": "={{ $json.platform }}",
"Created At": "={{$now}}",
"Pain Point": "={{ $json.pain_point }}",
"Content Hook": "={{ $json.content_hook }}",
"Content Format": "={{ $json.content_format }}",
"Why It Resonates": "={{ $json.why_it_resonates }}"
},
"schema": [
{
"id": "Platform",
"type": "string",
"display": true,
"required": false,
"displayName": "Platform",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Content Format",
"type": "string",
"display": true,
"required": false,
"displayName": "Content Format",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Content Hook",
"type": "string",
"display": true,
"required": false,
"displayName": "Content Hook",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Pain Point",
"type": "string",
"display": true,
"required": false,
"displayName": "Pain Point",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Why It Resonates",
"type": "string",
"display": true,
"required": false,
"displayName": "Why It Resonates",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "CTA",
"type": "string",
"display": true,
"required": false,
"displayName": "CTA",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Status",
"type": "string",
"display": true,
"required": false,
"displayName": "Status",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Created At",
"type": "string",
"display": true,
"required": false,
"displayName": "Created At",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "append",
"sheetName": {
"__rl": true,
"mode": "list",
"value": 869555007,
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/17rcNd_ZpUQLm0uWEVbD-NY6GyFUkrD4BglvawlyBygM/edit#gid=869555007",
"cachedResultName": "content database"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "17rcNd_ZpUQLm0uWEVbD-NY6GyFUkrD4BglvawlyBygM",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/17rcNd_ZpUQLm0uWEVbD-NY6GyFUkrD4BglvawlyBygM/edit?usp=drivesdk",
"cachedResultName": "sample_leads_50"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 4.7
},
{
"id": "38fdae68-abdb-494a-b72e-c7d503be519b",
"name": "Create Content Task in ClickUp",
"type": "n8n-nodes-base.clickUp",
"position": [
1392,
192
],
"parameters": {
"list": "901412736351",
"name": "={{$json.content_hook}}",
"team": "9014872066",
"space": "90143686913",
"folder": "90147011966",
"additionalFields": {
"status": "to do",
"content": "=Platform: {{$json.platform}} Format: {{$json.content_format}} Pain Point: {{$json.pain_point}} Why it resonates: {{$json.why_it_resonates}} CTA: {{$json.cta}}"
}
},
"credentials": {
"clickUpApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "e43cc333-584f-4d60-a9cb-e79842ae2a1d",
"name": "Aggregate Generated Content Ideas",
"type": "n8n-nodes-base.aggregate",
"position": [
1712,
32
],
"parameters": {
"options": {},
"aggregate": "aggregateAllItemData"
},
"typeVersion": 1
},
{
"id": "1ffc9d16-ab78-42e8-83df-3fc7c5cad1f3",
"name": "Generate Slack Summary of Content Ideas",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
2032,
32
],
"parameters": {
"text": "=TASK:\nCreate a concise Slack message summarizing the generated content ideas.\n\nINPUT DATA:\n{{ JSON.stringify($input.all().map(i => i.json), null, 2) }}\n\nREQUIREMENTS:\n- This message is for a Slack channel (marketing / growth team)\n- Keep it short, clear, and skimmable\n- Highlight:\n \u2022 Total number of content ideas\n \u2022 Platforms covered\n \u2022 Top 3 strongest hooks\n- Use emojis lightly for clarity (not spammy)\n- Do NOT include raw JSON\n- Do NOT include explanations\n\nOUTPUT:\nReturn ONLY the Slack message text.\n",
"options": {
"maxIterations": 30,
"systemMessage": "You are a senior growth and content operations manager.\n\nYour job:\n- Communicate insights clearly to busy teams\n- Summarize content plans in a Slack-friendly way\n- Highlight what matters, not everything\n\nRules:\n- Be concise and professional\n- Avoid marketing fluff\n- Prioritize clarity and action\n- Assume the reader will scan, not read deeply\n"
},
"promptType": "define"
},
"typeVersion": 3
},
{
"id": "c66bbfb1-01d1-4234-bbca-934400e150fd",
"name": "OpenAI Reasoning Engine for Slack Summary",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
2032,
208
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4o",
"cachedResultName": "gpt-4o"
},
"options": {},
"responsesApiEnabled": false
},
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.3
},
{
"id": "f68709f5-75dc-4154-b24a-71b7701d7bf6",
"name": "Send Content Ideation Summary to Slack Channel",
"type": "n8n-nodes-base.slack",
"position": [
2448,
32
],
"parameters": {
"text": "={{ $json.output }}",
"select": "channel",
"channelId": {
"__rl": true,
"mode": "list",
"value": "C09GNB90TED",
"cachedResultName": "general-information"
},
"otherOptions": {}
},
"credentials": {
"slackApi": {
"name": "<your credential>"
}
},
"typeVersion": 2.1
},
{
"id": "7775f0c6-64a2-49a7-b967-062dcd65b4bc",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1072,
-1072
],
"parameters": {
"width": 720,
"height": 624,
"content": "## \ud83d\udce3 Generate Pain-Driven Content Ideas from Market Signals using GPT-4o, XPOZ MCP, ClickUp, and Google Sheets\n\n### How it works\nThis workflow runs on a scheduled trigger to continuously discover real user pain points related to n8n automations, lead generation, and CRM workflows. It injects a predefined niche and keyword set, then scans public discussions across search and social platforms using connected social intelligence tools.\n\nAn AI discovery agent analyzes raw public conversations to extract recurring frustrations, common questions, and the exact language users use to describe their problems. The goal at this stage is discovery only\u2014no solutions, no opinions, and no assumptions.\n\nThese raw market signals are then passed to a second AI agent that converts genuine pain points into high-quality, creator-ready content ideas. Each idea includes a strong hook, best platform, content format, core pain point, resonance explanation, and a suggested CTA.\n\nThe workflow normalizes all outputs, stores content ideas in a Google Sheets content database, creates execution tasks in ClickUp, and finally sends a concise Slack summary to the marketing or growth team highlighting what content was generated and why it matters.\n\n### Setup steps\n1. Set the schedule frequency.\n2. Update niche and keyword parameters if needed.\n3. Connect OpenAI credentials.\n4. Connect MCP (Xpoz) social intelligence credentials.\n5. Configure Google Sheets and ClickUp credentials.\n6. Select the Slack channel for summaries.\n"
},
"typeVersion": 1
},
{
"id": "5f146e45-8e76-413f-99ed-f8325643f980",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-384,
-272
],
"parameters": {
"color": 7,
"width": 480,
"height": 528,
"content": "## Scheduling & Research Inputs\nControls when discovery runs and defines the niche and keyword focus.\n"
},
"typeVersion": 1
},
{
"id": "ecd825a7-3c35-4533-b425-64e8449a4c7e",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
128,
-192
],
"parameters": {
"color": 7,
"width": 448,
"height": 704,
"content": "## Raw Market Discovery\nExtracts real user pain points and language from public discussions.\n"
},
"typeVersion": 1
},
{
"id": "358c58d6-36c4-44cb-ad24-e8a2a04f7a81",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
608,
-96
],
"parameters": {
"color": 7,
"width": 336,
"height": 560,
"content": "## Content Ideation\nConverts real pain points into platform-ready content ideas.\n"
},
"typeVersion": 1
},
{
"id": "954343d9-3e22-4439-9979-f81b650165fc",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
960,
-128
],
"parameters": {
"color": 7,
"width": 272,
"height": 352,
"content": "## Output Normalization\nCleans and standardizes AI-generated content ideas.\n"
},
"typeVersion": 1
},
{
"id": "b4ddcd37-9c49-421e-b8ce-f6c8071f275d",
"name": "Sticky Note5",
"type": "n8n-nodes-base.stickyNote",
"position": [
1312,
-336
],
"parameters": {
"color": 7,
"width": 288,
"height": 736,
"content": "## Content Storage & Task Creation\nStores ideas and creates execution tasks for the content team.\n"
},
"typeVersion": 1
},
{
"id": "113044a1-7036-49c5-9b1e-f1d2b8409089",
"name": "Sticky Note6",
"type": "n8n-nodes-base.stickyNote",
"position": [
1664,
-144
],
"parameters": {
"color": 7,
"width": 944,
"height": 512,
"content": "## Aggregation & Team Notification\nSummarizes content ideas and notifies the team in Slack.\n"
},
"typeVersion": 1
}
],
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "7e2c8e07-e876-47d4-b060-2174e5c74145",
"connections": {
"Workflow Error Handler": {
"main": [
[
{
"node": "Send a message1",
"type": "main",
"index": 0
}
]
]
},
"Aggregate Generated Content Ideas": {
"main": [
[
{
"node": "Generate Slack Summary of Content Ideas",
"type": "main",
"index": 0
}
]
]
},
"Scheduled Market Discovery Trigger": {
"main": [
[
{
"node": "Inject Niche and Keyword Parameters",
"type": "main",
"index": 0
}
]
]
},
"Inject Niche and Keyword Parameters": {
"main": [
[
{
"node": "Extract Raw User Pain Points from Public Discussions (AI)",
"type": "main",
"index": 0
}
]
]
},
"Generate Slack Summary of Content Ideas": {
"main": [
[
{
"node": "Send Content Ideation Summary to Slack Channel",
"type": "main",
"index": 0
}
]
]
},
"Normalize and Parse Content Ideas Output": {
"main": [
[
{
"node": "Append Content Ideas to Content Database ",
"type": "main",
"index": 0
},
{
"node": "Create Content Task in ClickUp",
"type": "main",
"index": 0
},
{
"node": "Aggregate Generated Content Ideas",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Reasoning Engine for Slack Summary": {
"ai_languageModel": [
[
{
"node": "Generate Slack Summary of Content Ideas",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"OpenAI Reasoning Engine for Content Ideation": {
"ai_languageModel": [
[
{
"node": "Generate Pain-Driven Content Ideas from Market Signals (AI)",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"OpenAI Reasoning Engine for Market Discovery": {
"ai_languageModel": [
[
{
"node": "Extract Raw User Pain Points from Public Discussions (AI)",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Public Search & Social Intelligence Connector (MCP)": {
"ai_tool": [
[
{
"node": "Extract Raw User Pain Points from Public Discussions (AI)",
"type": "ai_tool",
"index": 0
}
]
]
},
"Extract Raw User Pain Points from Public Discussions (AI)": {
"main": [
[
{
"node": "Generate Pain-Driven Content Ideas from Market Signals (AI)",
"type": "main",
"index": 0
}
]
]
},
"Generate Pain-Driven Content Ideas from Market Signals (AI)": {
"main": [
[
{
"node": "Normalize and Parse Content Ideas Output",
"type": "main",
"index": 0
}
]
]
}
}
}
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.
clickUpApigoogleSheetsOAuth2ApihttpBearerAuthopenAiApislackApi
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
This workflow automates market-driven content ideation by continuously discovering real user pain points from public discussions and converting them into execution-ready content ideas. It is designed for growth and content teams who want ideas grounded in actual customer…
Source: https://n8n.io/workflows/12497/ — 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.
📘 Description This workflow automates keyword-level SEO research and content opportunity discovery using live Google SERP data and AI-driven analysis. It takes a single keyword request, pulls real-tim
Consultants, agencies, freelancers, and project managers who want to ensure proposals, emails, and tasks are followed up on time.
This workflow is designed for Scrum Masters and Agile Coaches who prepare and coordinate Sprint Planning sessions, using Google Calendar, Google Sheets, and OpenAI.
This workflow is designed for Scrum Masters, Agile Coaches, and Product Owners who want to automate backlog refinement preparation using Google Sheets, Gmail, and OpenAI. It’s ideal for teams seeking
Stop manually sending follow-ups. This workflow automates your entire cold email outreach with AI-powered personalization, smart scheduling, and automatic reply detection.