创作者社交媒体趋势页面
中级
这是一个Market Research, AI Summarization领域的自动化工作流,包含 15 个节点。主要使用 Set, Code, Merge, HttpRequest, ManualTrigger 等节点。 使用 Reddit、Twitter 和 GPT-4o 追踪社交媒体趋势,同步至 SharePoint/Drive
前置要求
- •可能需要目标 API 的认证凭证
- •OpenAI API Key
使用的节点 (15)
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"id": "WEsO2dwjCaN6NwQT",
"meta": {
"instanceId": "2cf742429c2e3ee4e5a20069d3d8a75208519303b864f026a79464efa726bd95",
"templateCredsSetupCompleted": true
},
"name": "创作者社交媒体趋势页面",
"tags": [
{
"id": "wpMIpESnBZpdPCpj",
"name": "Marketing",
"createdAt": "2025-06-03T11:38:37.020Z",
"updatedAt": "2025-06-03T11:38:37.020Z"
}
],
"nodes": [
{
"id": "a4dd01b9-57d6-41ff-9630-1bc6276f48da",
"name": "Reddit API",
"type": "n8n-nodes-base.httpRequest",
"position": [
-336,
48
],
"parameters": {
"url": "https://oauth.reddit.com/r/artificial/hot",
"options": {},
"authentication": "predefinedCredentialType",
"nodeCredentialType": "redditOAuth2Api"
},
"credentials": {
"redditOAuth2Api": {
"id": "QfwNxnbWZe2Y5RSa",
"name": "Reddit account"
}
},
"typeVersion": 3
},
{
"id": "fd03075f-7e22-48a8-b92a-ef397a7d74e6",
"name": "合并数据",
"type": "n8n-nodes-base.merge",
"position": [
-96,
192
],
"parameters": {},
"typeVersion": 2.1
},
{
"id": "b5dd36d6-a175-4695-8a02-0e92237bc0d3",
"name": "聚合内容",
"type": "n8n-nodes-base.code",
"position": [
80,
192
],
"parameters": {
"jsCode": "const allData = $input.all();\nlet content = '\\n';\n\nallData.forEach(item => {\n if (item.json.data?.children) {\n // Reddit data\n item.json.data.children.slice(0,3).forEach((post, i) => {\n content += `${i+1}. ${post.data.title}\\n`;\n });\n }\n content += '\\n';\n});\n\n// Output in `aggregatedContent`\nreturn [{\n json: {\n aggregatedContent: content,\n output: $('Get Twitter Trends').first().json.output\n }\n}];\n"
},
"typeVersion": 2
},
{
"id": "aa228c26-feb4-4d9e-9535-2da2b4aa3635",
"name": "准备 Excel",
"type": "n8n-nodes-base.code",
"position": [
608,
192
],
"parameters": {
"jsCode": "const aiResponse = $input.first().json.output;\nconst dateToday = $('Set Config').first().json.dateToday;\n\nlet trendsData;\ntry {\n const jsonMatch = aiResponse.match(/\\{[\\s\\S]*\\}/);\n trendsData = jsonMatch ? JSON.parse(jsonMatch[0]) : { trends: [] };\n} catch {\n trendsData = {\n trends: [{\n rank: 1,\n trend: 'AI Innovation',\n description: 'AI continues to innovate',\n platforms: ['Multiple']\n }]\n };\n}\n\n// Return one item per row\nreturn trendsData.trends.map(trend => ({\n json: {\n Rank: trend.rank,\n Trend: trend.trend,\n Description: trend.description,\n Platforms: Array.isArray(trend.platforms) ? trend.platforms.join(', ') : trend.platforms,\n Date: dateToday\n }\n}));\n"
},
"typeVersion": 2
},
{
"id": "ada69f9a-3b99-4c41-98df-9fed26498184",
"name": "创建 Excel",
"type": "n8n-nodes-base.spreadsheetFile",
"position": [
832,
192
],
"parameters": {
"options": {},
"operation": "toFile"
},
"typeVersion": 2
},
{
"id": "f6df2ff4-fd06-4073-bc41-a71d2c614010",
"name": "AI Agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
288,
-16
],
"parameters": {
"text": "=Analyze these social media trends and extract the top 5 trends in JSON format:\n\nTRENDS FROM REDDIT:\n{{$json.aggregatedContent}}\n\nTRENDS FROM X:\n{{ $json.output }}\n\nRespond with:\n{\n \"trends\": [\n {\"rank\": 1, \"trend\": \"Trend Name\", \"description\": \"Description\", \"platforms\": [\"Platform1\"]}\n ]\n}",
"options": {},
"promptType": "define"
},
"typeVersion": 2
},
{
"id": "9fc152ce-46e6-45c2-8d3f-72a9e34f5b3a",
"name": "OpenAI 聊天模型",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
288,
192
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4o",
"cachedResultName": "gpt-4o"
},
"options": {}
},
"credentials": {
"openAiApi": {
"id": "E4PFATctY0kV00hl",
"name": "OpenAi account"
}
},
"typeVersion": 1.2
},
{
"id": "302e51be-be21-4883-b62a-21c8fc6c4ca4",
"name": "当点击\"执行工作流\"时",
"type": "n8n-nodes-base.manualTrigger",
"position": [
-768,
192
],
"parameters": {},
"typeVersion": 1
},
{
"id": "c625cc58-a4aa-4090-9b31-53c92fda8d37",
"name": "Microsoft SharePoint",
"type": "n8n-nodes-base.microsoftSharePoint",
"position": [
1040,
192
],
"parameters": {
"site": {
"__rl": true,
"mode": "list",
"value": "plemeo.sharepoint.com,f304c34c-1252-4b99-a852-059c2036c718,c3bf26ab-bf44-4334-8e5b-e8b680bb9e1d",
"cachedResultName": "plemeo"
},
"folder": {
"__rl": true,
"mode": "list",
"value": "01M45PWAZCILJ3WHMIXBGZA2UP2JMQ5CXO",
"cachedResultName": "Newsletter Workflow"
},
"fileName": "social-media-trends.xls",
"operation": "upload",
"fileContents": "data",
"requestOptions": {}
},
"credentials": {
"microsoftSharePointOAuth2Api": {
"id": "jZkLTQXyVEzxtmp3",
"name": "Microsoft SharePoint account"
}
},
"typeVersion": 1
},
{
"id": "fd72d6de-d25d-4bb1-922b-8a4f0d3d7bca",
"name": "获取 Twitter 趋势",
"type": "n8n-nodes-base.httpRequest",
"position": [
-336,
320
],
"parameters": {
"url": "=<YOUR_SERVICE_URL>",
"method": "POST",
"options": {
"allowUnauthorizedCerts": true
},
"jsonBody": "={\n \"workflow_to_run\": \"python <PATH_TO_YOUR_SCRIPT>\\\\\\\\twitter_bot_dynamic.py --topic \\\"{{ $json.topic }}\\\"\"\n}",
"sendBody": true,
"sendHeaders": true,
"specifyBody": "json",
"headerParameters": {
"parameters": [
{}
]
}
},
"typeVersion": 4.2
},
{
"id": "71e4af0b-959f-48ee-9554-73d08a13abc2",
"name": "设置配置",
"type": "n8n-nodes-base.set",
"position": [
-560,
192
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "9b3e9f6d-6ddb-4871-b4e0-d135d5f82189",
"name": "dateToday",
"type": "string",
"value": "={{ $now.setLocale('en').toFormat('yyyy-MM-dd') }}"
},
{
"id": "308da6fe-c718-4e5e-a309-c276bdfc6658",
"name": "topic",
"type": "string",
"value": "Artificial Intelligence"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "5915a721-4aca-4f8f-892e-df152dc2b9a0",
"name": "便签",
"type": "n8n-nodes-base.stickyNote",
"position": [
-832,
-208
],
"parameters": {
"width": 432,
"height": 304,
"content": "### 数据源分支"
},
"typeVersion": 1
},
{
"id": "e7497dd8-57ed-4ffd-94a3-f04bb18da3c4",
"name": "便签1",
"type": "n8n-nodes-base.stickyNote",
"position": [
112,
-336
],
"parameters": {
"width": 560,
"height": 272,
"content": "### AI 分析分支"
},
"typeVersion": 1
},
{
"id": "0101f056-16c6-41ba-a9cc-c5778d3ca64d",
"name": "便签2",
"type": "n8n-nodes-base.stickyNote",
"position": [
720,
-112
],
"parameters": {
"width": 416,
"height": 256,
"content": "### 电子表格创建分支"
},
"typeVersion": 1
},
{
"id": "39c76494-1a64-4756-9f20-81c087c24342",
"name": "便签3",
"type": "n8n-nodes-base.stickyNote",
"position": [
720,
384
],
"parameters": {
"width": 496,
"height": 288,
"content": "### 存储分支"
},
"typeVersion": 1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "b5041345-234a-450f-85ee-e8f6e1ad045d",
"connections": {
"AI Agent": {
"main": [
[
{
"node": "Prepare Excel",
"type": "main",
"index": 0
}
]
]
},
"Merge Data": {
"main": [
[
{
"node": "Aggregate Content",
"type": "main",
"index": 0
}
]
]
},
"Reddit API": {
"main": [
[
{
"node": "Merge Data",
"type": "main",
"index": 0
}
]
]
},
"Set Config": {
"main": [
[
{
"node": "Reddit API",
"type": "main",
"index": 0
},
{
"node": "Get Twitter Trends",
"type": "main",
"index": 0
}
]
]
},
"Create Excel": {
"main": [
[
{
"node": "Microsoft SharePoint",
"type": "main",
"index": 0
}
]
]
},
"Prepare Excel": {
"main": [
[
{
"node": "Create Excel",
"type": "main",
"index": 0
}
]
]
},
"Aggregate Content": {
"main": [
[
{
"node": "AI Agent",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "AI Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Get Twitter Trends": {
"main": [
[
{
"node": "Merge Data",
"type": "main",
"index": 1
}
]
]
},
"When clicking ‘Execute workflow’": {
"main": [
[
{
"node": "Set Config",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
中级 - 市场调研, AI 摘要总结
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
从趋势电子表格生成SEO内容到存储(SharePoint/Drive/Dropbox)
使用GPT-4o、FAL AI和多存储支持从趋势自动生成SEO内容
If
Set
Code
+13
47 节点plemeo
内容创作
为 HubSpot 联系人和 SharePoint 生成 AI 撰写的新闻稿和素材
使用 GPT-4o、AI 图像和视频为 HubSpot 和 SharePoint 创建双语新闻稿
If
Set
Code
+15
49 节点plemeo
社交媒体
使用GPT-4洞察和Slack交付自动化每周SEO报告
通过GPT-4洞察和Slack交付自动化每周SEO报告
Set
Code
Merge
+8
42 节点Marcelo Abreu
市场调研
基于 GPT-4 专家的全面 SEO 审计,使用 Analytics、Search Console 和 PageSpeed
基于 GPT-4 专家的全面 SEO 审计,使用 Analytics、Search Console 和 PageSpeed
Set
Code
Merge
+8
38 节点Jimmy Gay
市场调研
社交媒体监控
使用AnySite API和GPT的跨平台品牌监控与分析
Code
Merge
Data Table
+8
42 节点Andrey
市场调研
带 AI 过滤的个性化学习内容聚合器
使用 GPT-4.1-mini 和 Google Sheets 从 Reddit 和 RSS 筛选学习内容
Set
Code
Merge
+7
18 节点higashiyama
市场调研