基于GPT-4和Apify的AI驱动竞争对手与市场情报系统
中级
这是一个Market Research, AI Summarization领域的自动化工作流,包含 12 个节点。主要使用 Code, Merge, Slack, Postgres, GoogleDocs 等节点。 基于GPT-4和Apify的AI驱动竞争对手与市场情报系统
前置要求
- •Slack Bot Token 或 Webhook URL
- •PostgreSQL 数据库连接信息
- •可能需要目标 API 的认证凭证
- •OpenAI API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"id": "lsEzOZHxXPDvQmBS",
"meta": {
"instanceId": "a287613f1596da776459594685fbf4e2b4a12124f80ab8c8772f5e37bff103ae",
"templateCredsSetupCompleted": true
},
"name": "基于 GPT-4 和 Apify 的 AI 驱动竞争对手与市场情报系统",
"tags": [],
"nodes": [
{
"id": "9a08ac46-0e1c-4e7f-b83d-9e0537634aef",
"name": "定时分析触发器",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
0,
96
],
"parameters": {
"rule": {
"interval": [
{}
]
}
},
"typeVersion": 1.2
},
{
"id": "c52f9e5a-f2c9-4895-b9cc-a00fed3ae1ee",
"name": "Apify",
"type": "n8n-nodes-base.httpRequest",
"position": [
224,
0
],
"parameters": {
"url": "https://api.apify.com/v2/acts/apify~web-scraper/run-sync",
"method": "POST",
"options": {},
"jsonBody": "{\n \"startUrls\": [\n { \"url\": \"https://www.competitorA.com/pricing\" },\n { \"url\": \"https://www.g2.com/products/competitorB/reviews\" },\n { \"url\": \"https://techcrunch.com/tag/it-trends/\" }\n ],\n \"pseudoUrls\": [\n { \"url\": \"https://www.competitorA.com/blog/[.*]\", \"selector\": \"article\" }\n ],\n \"maxRequestsPerCrawl\": 100\n}",
"sendBody": true,
"sendHeaders": true,
"specifyBody": "json",
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "Bearer [YOUR-API-KEY]"
}
]
}
},
"typeVersion": 4.2
},
{
"id": "f055a43d-ed97-4ae9-b9f9-3cb2baf55b0e",
"name": "获取新闻和博客 RSS",
"type": "n8n-nodes-base.rssFeedRead",
"position": [
224,
192
],
"parameters": {
"url": "[RSS_FEED_URL_1], [RSS_FEED_URL_2], [GOOGLE_ALERTS_RSS_URL]",
"options": {}
},
"typeVersion": 1.2
},
{
"id": "01962693-51f2-4e2e-8b66-e2af1c048251",
"name": "合并数据源",
"type": "n8n-nodes-base.merge",
"position": [
448,
96
],
"parameters": {},
"typeVersion": 3.2
},
{
"id": "dd1ef4a6-613f-4055-9863-b900042ff968",
"name": "为 AI 预处理数据",
"type": "n8n-nodes-base.code",
"position": [
656,
96
],
"parameters": {
"jsCode": "const processedItems = [];\nfor (const item of $input.item) {\n let textContent = '';\n let source = 'Unknown';\n let url = '';\n let title = '';\n\n // Example for HTTP Request output (assuming data is in 'item.json.data')\n if (item.json && item.json.data && Array.isArray(item.json.data.results)) {\n for (const result of item.json.data.results) {\n if (result.html) { // Assuming scraper returns HTML\n // Simple text extraction (consider a more robust library like 'cheerio' if needed)\n // const cheerio = require('cheerio'); // Requires custom n8n setup if not bundled\n // const $ = cheerio.load(result.html);\n // textContent = $('body').text().slice(0, 4000); // Limit text length for AI\n textContent = result.html.replace(/<[^>]*>/g, '').slice(0, 4000); // Basic HTML stripping\n } else if (result.text) { // Assuming scraper returns plain text\n textContent = result.text.slice(0, 4000);\n }\n title = result.title || '';\n url = result.url || '';\n source = result.source || 'Web Scraper Data';\n\n if (textContent.length > 50) { // Only process meaningful content\n processedItems.push({\n json: {\n content: textContent,\n title: title,\n url: url,\n source: source\n }\n });\n }\n }\n }\n\n // Example for RSS Feed output\n if (item.json.description && item.json.title && item.json.link) {\n textContent = item.json.description.slice(0, 4000);\n title = item.json.title;\n url = item.json.link;\n source = 'RSS Feed';\n if (textContent.length > 50) {\n processedItems.push({\n json: {\n content: textContent,\n title: title,\n url: url,\n source: source\n }\n });\n }\n }\n}\nreturn processedItems;"
},
"typeVersion": 2
},
{
"id": "ee5407b0-86af-45ab-a8b7-100f0a01f96b",
"name": "AI 分析与竞争对手洞察",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
864,
96
],
"parameters": {
"modelId": {
"__rl": true,
"mode": "id",
"value": "gpt-4"
},
"options": {},
"messages": {
"values": [
{
"role": "system",
"content": "=You are an expert market intelligence analyst. Your task is to analyze raw data about IT companies and provide concise, actionable insights for a sales team."
},
{
"content": "=Analyze the following collected data about our competitor from various sources. Each data point is clearly labeled with its source.\n\nCollected Data:\n{{ $json.map(item => `- Source: ${item.json.source}\\n Title: ${item.json.title}\\n URL: ${item.json.url}\\n Content: ${item.json.content}`).join('\\n\\n') }}\n\nBased on this, provide the following in a structured JSON format:\n1. **Competitor Name:** (Identify the primary competitor if clear, or 'General Market Trends')\n2. **Key Offerings/Features Identified:** (List new features, services, or product updates)\n3. **Pricing/Promotions:** (Any pricing changes or ongoing promotions)\n4. **Customer Sentiment (from reviews/feedback):** (Summarize overall sentiment: Positive, Negative, Mixed, with key reasons)\n5. **Strengths:** (What are their identified strengths?)\n6. **Weaknesses:** (What are their identified weaknesses or customer pain points?)\n7. **Opportunities for Our Company:** (How can we leverage this info? New market segments, specific product angles, gaps we can fill)\n8. **Threats to Our Company:** (What competitive actions should we be aware of?)\n9. **Actionable Sales Talking Points Suggestion:** (3-5 concise bullet points for our sales team to use against this competitor or about market trends)\n\nEnsure the output is valid JSON."
}
]
}
},
"credentials": {
"openAiApi": {
"id": "WbMi3ZLLBnECFAAV",
"name": "Temp"
}
},
"typeVersion": 1.8
},
{
"id": "54ab8c2c-4641-4f1d-b1b5-67a2c20f7825",
"name": "生成市场情报报告",
"type": "n8n-nodes-base.googleDocs",
"notes": "Value:\n\ncompetitorName: ={{ JSON.parse($json.choices[0].message.content).Competitor_Name }}\n\nstrengths: ={{ JSON.parse($json.choices[0].message.content).Strengths.join('\\n- ') }}\n\nweaknesses: ={{ JSON.parse($json.choices[0].message.content).Weaknesses.join('\\n- ') }}\n\nopportunities: ={{ JSON.parse($json.choices[0].message.content).Opportunities_for_Our_Company.join('\\n- ') }}\n\nthreats: ={{ JSON.parse($json.choices[0].message.content).Threats_to_Our_Company.join('\\n- ') }}\n\nsalesTalkingPoints: ={{ JSON.parse($json.choices[0].message.content).Actionable_Sales_Talking_Points_Suggestion.join('\\n- ') }}",
"position": [
16,
432
],
"parameters": {
"title": "=Market Intel Report - {{ new Date().toISOString().slice(0,10) }}"
},
"credentials": {
"googleDocsOAuth2Api": {
"id": "058aq7NkPlnzASX2",
"name": "temp"
}
},
"typeVersion": 2
},
{
"id": "7fb6fd4a-e27d-44cf-8dcc-34845a445cb3",
"name": "销售与营销团队通知",
"type": "n8n-nodes-base.slack",
"position": [
208,
432
],
"webhookId": "0ecdb2bc-dbcc-4ebd-8851-af8a5d43ef73",
"parameters": {
"text": "=New Market Intelligence Report generated! Check the latest insights on {{ JSON.parse($json.choices[0].message.content).Competitor_Name || 'market trends' }}. Report Link: {{ $json.documentUrl }}",
"select": "channel",
"channelId": {
"__rl": true,
"mode": "id",
"value": "[YOUR_SALES_TEAM_SLACK_CHANNEL_ID]"
},
"otherOptions": {}
},
"credentials": {
"slackApi": {
"id": "AFKF0YsguyhsagR0",
"name": "temp"
}
},
"typeVersion": 2.3
},
{
"id": "7d456b48-e1c0-4316-adf0-31594c49a3b4",
"name": "将洞察存储到数据库",
"type": "n8n-nodes-base.postgres",
"position": [
416,
432
],
"parameters": {
"query": "INSERT INTO competitor_profiles (\n name, last_scraped, strengths, weaknesses, opportunities, threats, sales_talking_points\n) VALUES (\n '{{ JSON.parse($json.choices[0].message.content).Competitor_Name }}',\n '{{ new Date().toISOString() }}',\n '{{ JSON.parse($json.choices[0].message.content).Strengths.join(', ') }}',\n '{{ JSON.parse($json.choices[0].message.content).Weaknesses.join(', ') }}',\n '{{ JSON.parse($json.choices[0].message.content).Opportunities_for_Our_Company.join(', ') }}',\n '{{ JSON.parse($json.choices[0].message.content).Threats_to_Our_Company.join(', ') }}',\n '{{ JSON.parse($json.choices[0].message.content).Actionable_Sales_Talking_Points_Suggestion.join(', ') }}'\n)\nON CONFLICT (name) DO UPDATE SET\n last_scraped = EXCLUDED.last_scraped,\n strengths = EXCLUDED.strengths,\n weaknesses = EXCLUDED.weaknesses,\n opportunities = EXCLUDED.opportunities,\n threats = EXCLUDED.threats,\n sales_talking_points = EXCLUDED.sales_talking_points;",
"options": {},
"operation": "executeQuery"
},
"credentials": {
"postgres": {
"id": "JWyp3nPDNolMuk3l",
"name": "temp"
}
},
"typeVersion": 2.6
},
{
"id": "fa822554-b152-4543-b05a-a1bbea1802de",
"name": "生成个性化销售话术要点",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
624,
432
],
"parameters": {
"modelId": {
"__rl": true,
"mode": "id",
"value": "gpt-4"
},
"options": {},
"messages": {
"values": [
{
"role": "system",
"content": "You are a sales coach. Based on the competitor insights provided and a specific sales context, generate highly personalized and persuasive talking points for a sales representative."
},
{
"content": "=Recent competitor insights for {{ $json.name }} show:\nStrengths: {{ $json.strengths }}\nWeaknesses: {{ $json.weaknesses }}\nNew Features: {{ $json.new_features }}\n\nOur product/service strengths are: [OUR_PRODUCT_USP_1], [OUR_PRODUCT_USP_2].\n\nThe current sales context is: We are pitching to a prospect who is currently using [COMPETITOR_NAME_FROM_CRM_CONTEXT] and values [PROSPECT_VALUE_1], [PROSPECT_VALUE_2].\n\nGenerate 3-5 concise, actionable sales talking points for our sales rep."
}
]
}
},
"credentials": {
"openAiApi": {
"id": "WbMi3ZLLBnECFAAV",
"name": "Temp"
}
},
"typeVersion": 1.8
},
{
"id": "fe1c1f20-bda7-4bf3-9c35-ee8e21241218",
"name": "便签",
"type": "n8n-nodes-base.stickyNote",
"position": [
-160,
-96
],
"parameters": {
"color": 3,
"width": 1440,
"height": 816,
"content": "## 流程"
},
"typeVersion": 1
},
{
"id": "fa066b98-3e5d-4150-9ed6-c8533e49e99e",
"name": "便签 1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-160,
768
],
"parameters": {
"color": 5,
"width": 1440,
"height": 1728,
"content": "# 自动化 AI 驱动的竞争对手与市场情报系统"
},
"typeVersion": 1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "258df6c1-e558-4476-b32f-f94ff2620d10",
"connections": {
"Apify": {
"main": [
[
{
"node": "Combine Data Sources",
"type": "main",
"index": 0
}
]
]
},
"Combine Data Sources": {
"main": [
[
{
"node": "Pre-process Data for AI",
"type": "main",
"index": 0
}
]
]
},
"Fetch News & Blog RSS": {
"main": [
[
{
"node": "Combine Data Sources",
"type": "main",
"index": 1
}
]
]
},
"Pre-process Data for AI": {
"main": [
[
{
"node": "AI Analysis & Competitor Insights",
"type": "main",
"index": 0
}
]
]
},
"Scheduled Analysis Trigger": {
"main": [
[
{
"node": "Apify",
"type": "main",
"index": 0
},
{
"node": "Fetch News & Blog RSS",
"type": "main",
"index": 0
}
]
]
},
"Store Insights to Database": {
"main": [
[
{
"node": "Generate Personalized Sales Talking Points",
"type": "main",
"index": 0
}
]
]
},
"AI Analysis & Competitor Insights": {
"main": [
[
{
"node": "Generate Market Intelligence Report",
"type": "main",
"index": 0
}
]
]
},
"Generate Market Intelligence Report": {
"main": [
[
{
"node": "Sales & Marketing Team Notification",
"type": "main",
"index": 0
}
]
]
},
"Sales & Marketing Team Notification": {
"main": [
[
{
"node": "Store Insights to Database",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
中级 - 市场调研, AI 摘要总结
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
基于GPT-4和Apify的自动化多AI代理竞品与市场分析系统
使用GPT-4、Apify和Google文档生成AI驱动的竞品分析报告
Code
Slack
Google Docs
+4
11 节点Marth
市场调研
001_面向Slack的AI驱动新闻洞察工作流
使用NewsAPI和GPT-4洞察的每日商业新闻简报发送到Slack
Set
Code
Merge
+5
17 节点James Carter
市场调研
AI驱动的房地产市场雷达与痛点检测器
使用Apify、GPT-4o和Telegram提醒跟踪房地产市场痛点
Code
Airtable
Telegram
+5
15 节点Bheta Maranatha
市场调研
使用GPT-4洞察和Slack交付自动化每周SEO报告
通过GPT-4洞察和Slack交付自动化每周SEO报告
Set
Code
Merge
+8
42 节点Marcelo Abreu
市场调研
我的工作流 2
结合 AI 竞品监控和收入优化的自动化动态定价
If
Code
Merge
+8
25 节点vinci-king-01
市场调研
带 AI 过滤的个性化学习内容聚合器
使用 GPT-4.1-mini 和 Google Sheets 从 Reddit 和 RSS 筛选学习内容
Set
Code
Merge
+7
18 节点higashiyama
市场调研
工作流信息
难度等级
中级
节点数量12
分类2
节点类型10
作者
Marth
@marthSimplifying Business with Smart Automation. I create and share user-friendly, highly efficient n8n workflow templates for SMEs, focusing on digital marketing, sales, and operational excellence. Get ready to automate, innovate, and elevate your business. Connect me on Linkedin for custom solutions.
外部链接
在 n8n.io 查看 →
分享此工作流