社交媒体情绪仪表板
中级
这是一个Market Research, AI Summarization领域的自动化工作流,包含 15 个节点。主要使用 If, Code, Slack, Webhook, GoogleSheets 等节点。 基于自定义 AI 的社交媒体情绪分析仪表板(支持 Twitter、Reddit 和 LinkedIn)
前置要求
- •Slack Bot Token 或 Webhook URL
- •HTTP Webhook 端点(n8n 会自动生成)
- •Google Sheets API 凭证
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"id": "SocialMediaSentimentDashboard2024",
"meta": {
"instanceId": "social-media-sentiment-dashboard-instance",
"templateCredsSetupCompleted": false
},
"name": "社交媒体情绪仪表板",
"tags": [
"social-media",
"sentiment-analysis",
"brand-monitoring",
"crisis-management",
"dashboard",
"automation"
],
"nodes": [
{
"id": "social-media-trigger",
"name": "社交媒体监控触发器",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
400,
800
],
"parameters": {
"rule": {
"interval": [
{
"field": "hours",
"hoursInterval": 4
}
]
}
},
"typeVersion": 1.2
},
{
"id": "manual-sentiment-trigger",
"name": "手动情绪检查 Webhook",
"type": "n8n-nodes-base.webhook",
"position": [
400,
600
],
"webhookId": "sentiment-monitoring-webhook",
"parameters": {
"path": "sentiment-webhook",
"options": {
"noResponseBody": false
},
"httpMethod": "GET"
},
"typeVersion": 1.1
},
{
"id": "twitter-scraper",
"name": "Twitter品牌提及抓取器",
"type": "n8n-nodes-scrapegraphai.scrapegraphAi",
"position": [
800,
500
],
"parameters": {
"userPrompt": "Extract social media posts and mentions from this Twitter search page. Focus on posts that mention our brand or company. Use this schema for response: { \"request_id\": \"unique_id\", \"status\": \"completed\", \"platform\": \"Twitter\", \"posts\": [{ \"post_id\": \"tweet_id\", \"author\": \"@username\", \"author_followers\": 1500, \"content\": \"Full tweet text here\", \"timestamp\": \"2024-01-15T10:30:00Z\", \"likes\": 25, \"retweets\": 5, \"replies\": 3, \"post_url\": \"https://twitter.com/user/status/123456\", \"mentions\": [\"@YourBrand\", \"@competitor\"], \"hashtags\": [\"#tech\", \"#innovation\"], \"media_urls\": [\"https://image-url.com\"], \"post_type\": \"original\", \"language\": \"en\", \"verified_account\": false }] }",
"websiteUrl": "https://twitter.com/search?q=%22YourBrand%22%20OR%20%22YourCompany%22&src=typed_query&f=live"
},
"credentials": {
"scrapegraphAIApi": {
"id": "",
"name": ""
}
},
"typeVersion": 1
},
{
"id": "reddit-scraper",
"name": "Reddit品牌讨论抓取器",
"type": "n8n-nodes-scrapegraphai.scrapegraphAi",
"position": [
800,
700
],
"parameters": {
"userPrompt": "Extract Reddit posts and comments mentioning our brand. Focus on discussions, reviews, and mentions. Use this schema: { \"request_id\": \"unique_id\", \"status\": \"completed\", \"platform\": \"Reddit\", \"posts\": [{ \"post_id\": \"reddit_post_id\", \"subreddit\": \"r/technology\", \"author\": \"username\", \"title\": \"Post title if applicable\", \"content\": \"Full post or comment text\", \"timestamp\": \"2024-01-15T10:30:00Z\", \"upvotes\": 150, \"downvotes\": 10, \"score\": 140, \"comments_count\": 25, \"post_url\": \"https://reddit.com/r/sub/comments/abc123\", \"post_type\": \"post\", \"flair\": \"Discussion\", \"is_pinned\": false, \"is_locked\": false }] }",
"websiteUrl": "https://www.reddit.com/search/?q=%22YourBrand%22&type=comment&sort=new"
},
"credentials": {
"scrapegraphAIApi": {
"id": "",
"name": ""
}
},
"typeVersion": 1
},
{
"id": "linkedin-scraper",
"name": "LinkedIn专业提及抓取器",
"type": "n8n-nodes-scrapegraphai.scrapegraphAi",
"position": [
800,
900
],
"parameters": {
"userPrompt": "Extract LinkedIn posts and professional discussions about our brand. Focus on business content and professional opinions. Use this schema: { \"request_id\": \"unique_id\", \"status\": \"completed\", \"platform\": \"LinkedIn\", \"posts\": [{ \"post_id\": \"linkedin_activity_id\", \"author\": \"Full Name\", \"author_title\": \"CEO at Company\", \"author_company\": \"Company Name\", \"content\": \"Full LinkedIn post text\", \"timestamp\": \"2024-01-15T10:30:00Z\", \"likes\": 45, \"comments\": 8, \"shares\": 12, \"post_url\": \"https://linkedin.com/posts/activity-123456\", \"post_type\": \"article\", \"industry_tags\": [\"Technology\", \"Innovation\"], \"is_promoted\": false }] }",
"websiteUrl": "https://www.linkedin.com/search/results/content/?keywords=%22YourBrand%22&origin=GLOBAL_SEARCH_HEADER&sid=123"
},
"credentials": {
"scrapegraphAIApi": {
"id": "",
"name": ""
}
},
"typeVersion": 1
},
{
"id": "sentiment-analysis-processor",
"name": "高级情绪分析与品牌智能",
"type": "n8n-nodes-base.code",
"notes": "Processes social media data with\nadvanced sentiment analysis and\nbrand intelligence algorithms",
"position": [
1400,
700
],
"parameters": {
"jsCode": "// Advanced Social Media Sentiment Analysis & Intelligence Processing\nconst inputData = $input.all();\nconst processedPosts = [];\n\n// Configuration for sentiment analysis and brand monitoring\nconst sentimentConfig = {\n brandKeywords: {\n 'your_brand': ['YourBrand', 'YourCompany', 'YourProduct', '@yourbrand'],\n 'competitors': {\n 'Competitor1': ['Competitor1', 'CompetitorProduct1', '@competitor1'],\n 'Competitor2': ['Competitor2', 'CompetitorProduct2', '@competitor2'],\n 'Competitor3': ['Competitor3', 'CompetitorProduct3', '@competitor3']\n }\n },\n sentimentKeywords: {\n positive: {\n strong: ['amazing', 'excellent', 'outstanding', 'fantastic', 'incredible', 'perfect', 'brilliant', 'phenomenal'],\n moderate: ['good', 'great', 'nice', 'helpful', 'useful', 'recommended', 'satisfied', 'happy', 'pleased'],\n mild: ['ok', 'fine', 'decent', 'adequate', 'reasonable', 'acceptable']\n },\n negative: {\n strong: ['terrible', 'awful', 'horrible', 'disgusting', 'worst', 'hate', 'disaster', 'nightmare'],\n moderate: ['bad', 'poor', 'disappointing', 'frustrated', 'annoying', 'waste', 'regret', 'failed'],\n mild: ['meh', 'not great', 'could be better', 'issues', 'problems', 'concerns']\n },\n neutral: ['said', 'mentioned', 'announced', 'reported', 'according', 'stated', 'explained', 'noted']\n },\n influencerThresholds: {\n twitter: { mega: 1000000, macro: 100000, micro: 10000, nano: 1000 },\n linkedin: { thought_leader: 50000, professional: 10000, specialist: 5000 },\n reddit: { power_user: 10000, active_user: 1000, regular_user: 100 }\n }\n};\n\n// Advanced sentiment analysis function\nfunction analyzeSentiment(text, platform) {\n const cleanText = text.toLowerCase();\n let sentimentScore = 0;\n let sentimentStrength = 0;\n let emotionalIntensity = 0;\n \n // Analyze positive sentiment\n Object.entries(sentimentConfig.sentimentKeywords.positive).forEach(([strength, words]) => {\n const multiplier = strength === 'strong' ? 3 : strength === 'moderate' ? 2 : 1;\n words.forEach(word => {\n if (cleanText.includes(word)) {\n sentimentScore += multiplier;\n sentimentStrength += multiplier;\n emotionalIntensity += multiplier * 0.5;\n }\n });\n });\n \n // Analyze negative sentiment\n Object.entries(sentimentConfig.sentimentKeywords.negative).forEach(([strength, words]) => {\n const multiplier = strength === 'strong' ? 3 : strength === 'moderate' ? 2 : 1;\n words.forEach(word => {\n if (cleanText.includes(word)) {\n sentimentScore -= multiplier;\n sentimentStrength += multiplier;\n emotionalIntensity += multiplier * 0.5;\n }\n });\n });\n \n // Check for emotional indicators\n const emotionalMarkers = {\n excitement: ['!', '!!!', '🔥', '🚀', '💯', '⭐'],\n disappointment: ['😞', '😢', '💔', '🤦', '😤'],\n question: ['?', '??', '🤔'],\n sarcasm: ['/s', 'sure...', 'yeah right', 'obviously']\n };\n \n let emotionalContext = 'neutral';\n Object.entries(emotionalMarkers).forEach(([emotion, markers]) => {\n markers.forEach(marker => {\n if (text.includes(marker)) {\n emotionalContext = emotion;\n emotionalIntensity += 0.5;\n }\n });\n });\n \n // Determine overall sentiment\n let finalSentiment = 'neutral';\n let confidence = 0;\n \n if (sentimentScore > 0) {\n finalSentiment = sentimentScore >= 3 ? 'very_positive' : 'positive';\n confidence = Math.min(sentimentStrength / 5, 1);\n } else if (sentimentScore < 0) {\n finalSentiment = sentimentScore <= -3 ? 'very_negative' : 'negative';\n confidence = Math.min(sentimentStrength / 5, 1);\n } else {\n confidence = 0.3; // Default neutral confidence\n }\n \n return {\n sentiment: finalSentiment,\n score: sentimentScore,\n confidence: Math.round(confidence * 100),\n emotional_intensity: Math.round(emotionalIntensity * 100) / 100,\n emotional_context: emotionalContext,\n strength: sentimentStrength\n };\n}\n\n// Brand mention detection function\nfunction detectBrandMentions(text) {\n const mentions = {\n your_brand: [],\n competitors: [],\n total_mentions: 0\n };\n \n const cleanText = text.toLowerCase();\n \n // Check for your brand mentions\n sentimentConfig.brandKeywords.your_brand.forEach(keyword => {\n if (cleanText.includes(keyword.toLowerCase())) {\n mentions.your_brand.push({\n keyword: keyword,\n context_snippet: extractContext(text, keyword, 50)\n });\n mentions.total_mentions++;\n }\n });\n \n // Check for competitor mentions\n Object.entries(sentimentConfig.brandKeywords.competitors).forEach(([competitor, keywords]) => {\n keywords.forEach(keyword => {\n if (cleanText.includes(keyword.toLowerCase())) {\n mentions.competitors.push({\n competitor: competitor,\n keyword: keyword,\n context_snippet: extractContext(text, keyword, 50)\n });\n mentions.total_mentions++;\n }\n });\n });\n \n return mentions;\n}\n\n// Extract context around mentions\nfunction extractContext(text, keyword, radius) {\n const index = text.toLowerCase().indexOf(keyword.toLowerCase());\n if (index === -1) return '';\n \n const start = Math.max(0, index - radius);\n const end = Math.min(text.length, index + keyword.length + radius);\n return text.substring(start, end).trim();\n}\n\n// Influencer tier classification\nfunction classifyInfluencer(platform, followers, engagement) {\n const thresholds = sentimentConfig.influencerThresholds[platform.toLowerCase()] || {};\n \n if (platform.toLowerCase() === 'twitter') {\n if (followers >= thresholds.mega) return 'mega_influencer';\n if (followers >= thresholds.macro) return 'macro_influencer';\n if (followers >= thresholds.micro) return 'micro_influencer';\n if (followers >= thresholds.nano) return 'nano_influencer';\n return 'regular_user';\n }\n \n if (platform.toLowerCase() === 'linkedin') {\n if (followers >= thresholds.thought_leader) return 'thought_leader';\n if (followers >= thresholds.professional) return 'professional_influencer';\n if (followers >= thresholds.specialist) return 'specialist';\n return 'professional';\n }\n \n if (platform.toLowerCase() === 'reddit') {\n const karma = followers; // Using followers as karma approximation\n if (karma >= thresholds.power_user) return 'power_user';\n if (karma >= thresholds.active_user) return 'active_user';\n if (karma >= thresholds.regular_user) return 'regular_user';\n return 'new_user';\n }\n \n return 'unknown';\n}\n\n// Calculate engagement rate\nfunction calculateEngagementRate(post, platform) {\n let totalEngagement = 0;\n let followerCount = 1; // Avoid division by zero\n \n if (platform.toLowerCase() === 'twitter') {\n totalEngagement = (post.likes || 0) + (post.retweets || 0) + (post.replies || 0);\n followerCount = post.author_followers || 1;\n } else if (platform.toLowerCase() === 'linkedin') {\n totalEngagement = (post.likes || 0) + (post.comments || 0) + (post.shares || 0);\n followerCount = 1000; // Default estimate for LinkedIn\n } else if (platform.toLowerCase() === 'reddit') {\n totalEngagement = (post.upvotes || 0) + (post.comments_count || 0);\n followerCount = 100; // Reddit doesn't have followers in the same way\n }\n \n return totalEngagement / followerCount;\n}\n\n// Process priority calculation\nfunction calculatePriority(post, sentiment, mentions, influencerTier, engagementRate) {\n let priorityScore = 0;\n \n // Sentiment impact\n if (sentiment.sentiment === 'very_negative') priorityScore += 10;\n else if (sentiment.sentiment === 'negative') priorityScore += 7;\n else if (sentiment.sentiment === 'very_positive') priorityScore += 5;\n else if (sentiment.sentiment === 'positive') priorityScore += 3;\n \n // Brand mention impact\n if (mentions.your_brand.length > 0) priorityScore += 8;\n if (mentions.competitors.length > 0) priorityScore += 4;\n \n // Influencer tier impact\n const influencerScores = {\n 'mega_influencer': 10, 'thought_leader': 10, 'power_user': 8,\n 'macro_influencer': 8, 'professional_influencer': 7, 'active_user': 6,\n 'micro_influencer': 6, 'specialist': 5, 'regular_user': 3,\n 'nano_influencer': 4, 'professional': 4, 'new_user': 1\n };\n priorityScore += influencerScores[influencerTier] || 1;\n \n // Engagement rate impact\n if (engagementRate > 0.1) priorityScore += 5;\n else if (engagementRate > 0.05) priorityScore += 3;\n else if (engagementRate > 0.01) priorityScore += 1;\n \n // Determine priority level\n if (priorityScore >= 15) return 'Critical';\n if (priorityScore >= 10) return 'High';\n if (priorityScore >= 6) return 'Medium';\n return 'Low';\n}\n\n// Process each input from different social media platforms\ninputData.forEach(input => {\n if (input.json.result && input.json.result.posts) {\n const platform = input.json.result.platform || 'Unknown';\n \n input.json.result.posts.forEach(post => {\n const sentimentAnalysis = analyzeSentiment(post.content, platform);\n const brandMentions = detectBrandMentions(post.content);\n const engagementRate = calculateEngagementRate(post, platform);\n \n let followerCount = 0;\n if (platform.toLowerCase() === 'twitter') followerCount = post.author_followers || 0;\n else if (platform.toLowerCase() === 'reddit') followerCount = post.score || 0;\n else followerCount = 1000; // Default for LinkedIn\n \n const influencerTier = classifyInfluencer(platform, followerCount, engagementRate);\n const priority = calculatePriority(post, sentimentAnalysis, brandMentions, influencerTier, engagementRate);\n \n processedPosts.push({\n json: {\n // Post Identification\n post_id: post.post_id || `${platform.toLowerCase()}_${Date.now()}_${Math.random().toString(36).substr(2, 5)}`,\n platform: platform,\n post_url: post.post_url,\n timestamp: post.timestamp,\n \n // Author Information\n author: post.author,\n author_title: post.author_title || '',\n author_company: post.author_company || '',\n author_followers: followerCount,\n influencer_tier: influencerTier,\n verified_account: post.verified_account || false,\n \n // Content Analysis\n content: post.content,\n content_length: post.content.length,\n language: post.language || 'unknown',\n post_type: post.post_type || 'post',\n \n // Engagement Metrics\n likes: post.likes || post.upvotes || 0,\n shares: post.retweets || post.shares || 0,\n comments: post.replies || post.comments || post.comments_count || 0,\n engagement_rate: Math.round(engagementRate * 10000) / 100, // Percentage with 2 decimals\n total_engagement: (post.likes || post.upvotes || 0) + (post.retweets || post.shares || 0) + (post.replies || post.comments || post.comments_count || 0),\n \n // Sentiment Analysis Results\n sentiment: sentimentAnalysis.sentiment,\n sentiment_score: sentimentAnalysis.score,\n sentiment_confidence: sentimentAnalysis.confidence,\n emotional_intensity: sentimentAnalysis.emotional_intensity,\n emotional_context: sentimentAnalysis.emotional_context,\n \n // Brand Intelligence\n mentions_your_brand: brandMentions.your_brand.length > 0,\n your_brand_mentions: brandMentions.your_brand,\n competitor_mentions: brandMentions.competitors,\n total_brand_mentions: brandMentions.total_mentions,\n \n // Priority and Classification\n priority_level: priority,\n requires_response: priority === 'Critical' || (priority === 'High' && sentimentAnalysis.sentiment.includes('negative')),\n crisis_potential: sentimentAnalysis.sentiment === 'very_negative' && brandMentions.your_brand.length > 0 && ['mega_influencer', 'thought_leader', 'power_user'].includes(influencerTier),\n \n // Additional Context\n hashtags: post.hashtags || [],\n mentions: post.mentions || [],\n media_urls: post.media_urls || [],\n subreddit: post.subreddit || '',\n industry_tags: post.industry_tags || [],\n \n // Metadata\n processed_at: new Date().toISOString(),\n monitoring_session: `session_${new Date().toISOString().split('T')[0].replace(/-/g, '')}`\n }\n });\n });\n }\n});\n\nreturn processedPosts;"
},
"notesInFlow": true,
"typeVersion": 2
},
{
"id": "google-sheets-dashboard",
"name": "Google Sheets情绪仪表板",
"type": "n8n-nodes-base.googleSheets",
"position": [
2200,
700
],
"parameters": {
"columns": {
"value": {},
"schema": [
{
"id": "post_id",
"type": "string",
"display": true,
"required": false,
"displayName": "Post ID",
"defaultMatch": true,
"canBeUsedToMatch": true
},
{
"id": "platform",
"type": "string",
"display": true,
"required": false,
"displayName": "Platform",
"defaultMatch": false,
"canBeUsedToMatch": false
},
{
"id": "author",
"type": "string",
"display": true,
"required": false,
"displayName": "Author",
"defaultMatch": false,
"canBeUsedToMatch": false
},
{
"id": "content",
"type": "string",
"display": true,
"required": false,
"displayName": "Content",
"defaultMatch": false,
"canBeUsedToMatch": false
},
{
"id": "sentiment",
"type": "string",
"display": true,
"required": false,
"displayName": "Sentiment",
"defaultMatch": false,
"canBeUsedToMatch": false
},
{
"id": "sentiment_confidence",
"type": "number",
"display": true,
"required": false,
"displayName": "Confidence %",
"defaultMatch": false,
"canBeUsedToMatch": false
},
{
"id": "mentions_your_brand",
"type": "boolean",
"display": true,
"required": false,
"displayName": "Mentions Brand",
"defaultMatch": false,
"canBeUsedToMatch": false
},
{
"id": "priority_level",
"type": "string",
"display": true,
"required": false,
"displayName": "Priority",
"defaultMatch": false,
"canBeUsedToMatch": false
},
{
"id": "engagement_rate",
"type": "number",
"display": true,
"required": false,
"displayName": "Engagement Rate %",
"defaultMatch": false,
"canBeUsedToMatch": false
},
{
"id": "influencer_tier",
"type": "string",
"display": true,
"required": false,
"displayName": "Influencer Tier",
"defaultMatch": false,
"canBeUsedToMatch": false
},
{
"id": "crisis_potential",
"type": "boolean",
"display": true,
"required": false,
"displayName": "Crisis Potential",
"defaultMatch": false,
"canBeUsedToMatch": false
},
{
"id": "timestamp",
"type": "string",
"display": true,
"required": false,
"displayName": "Timestamp",
"defaultMatch": false,
"canBeUsedToMatch": false
},
{
"id": "post_url",
"type": "string",
"display": true,
"required": false,
"displayName": "Post URL",
"defaultMatch": false,
"canBeUsedToMatch": false
}
],
"mappingMode": "autoMapInputData",
"matchingColumns": [
"post_id"
]
},
"options": {},
"operation": "appendOrUpdate",
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/edit#gid=0",
"cachedResultName": "Sentiment Data"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/edit#gid=0",
"cachedResultName": "Social Media Sentiment Dashboard"
},
"authentication": "serviceAccount"
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "",
"name": ""
}
},
"typeVersion": 4.4
},
{
"id": "crisis-alert-filter",
"name": "危机与优先级警报过滤器",
"type": "n8n-nodes-base.if",
"position": [
1400,
450
],
"parameters": {
"options": {},
"conditions": {
"options": {
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"conditions": [
{
"id": "crisis-alert",
"operator": {
"type": "boolean",
"operation": "true"
},
"leftValue": "={{ $json.crisis_potential }}",
"rightValue": true
},
{
"id": "critical-priority",
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.priority_level }}",
"rightValue": "Critical"
},
{
"id": "negative-brand-mention",
"operator": {
"type": "boolean",
"operation": "true"
},
"leftValue": "={{ $json.mentions_your_brand && ($json.sentiment === 'negative' || $json.sentiment === 'very_negative') }}",
"rightValue": true
}
],
"combineOperation": "any"
}
},
"typeVersion": 2
},
{
"id": "slack-crisis-alert",
"name": "Slack危机与优先级警报",
"type": "n8n-nodes-base.slack",
"position": [
1800,
450
],
"parameters": {
"text": "🚨 **SOCIAL MEDIA ALERT** 🚨\n\n{% if $json.crisis_potential %}🔴 **CRISIS POTENTIAL DETECTED** 🔴{% else %}⚠️ **HIGH PRIORITY MENTION** ⚠️{% endif %}\n\n**Platform**: {{ $json.platform }}\n**Author**: {{ $json.author }}{% if $json.author_followers %} ({{ $json.author_followers }} followers){% endif %}\n**Influencer Tier**: {{ $json.influencer_tier | replace('_', ' ') | title }}\n\n**Content Preview**:\n_{{ $json.content | truncate(200) }}_\n\n**Sentiment Analysis**:\n{% if $json.sentiment == 'very_negative' %}🔴 VERY NEGATIVE{% elif $json.sentiment == 'negative' %}🟠 NEGATIVE{% elif $json.sentiment == 'positive' %}🟢 POSITIVE{% elif $json.sentiment == 'very_positive' %}💚 VERY POSITIVE{% else %}⚪ NEUTRAL{% endif %} ({{ $json.sentiment_confidence }}% confidence)\n\n**Engagement Metrics**:\n👍 {{ $json.likes }} likes | 🔄 {{ $json.shares }} shares | 💬 {{ $json.comments }} comments\n📊 **Engagement Rate**: {{ $json.engagement_rate }}%\n\n**Brand Intelligence**:\n{% if $json.mentions_your_brand %}🎯 **MENTIONS YOUR BRAND**{% endif %}\n{% if $json.competitor_mentions|length > 0 %}👥 Competitor mentions: {{ $json.competitor_mentions|length }}{% endif %}\n\n**Priority Level**: {{ $json.priority_level }}\n{% if $json.requires_response %}💡 **Response Required**{% endif %}\n\n🔗 [**View Post**]({{ $json.post_url }})\n\n*Detected at {{ $json.processed_at | date('short') }} | Session: {{ $json.monitoring_session }}*",
"select": "channel",
"channelId": {
"__rl": true,
"mode": "name",
"value": "C1234567890"
},
"otherOptions": {
"includeLinkPreviews": true
},
"authentication": "oAuth2"
},
"credentials": {
"slackOAuth2Api": {
"id": "",
"name": ""
}
},
"typeVersion": 2.2
},
{
"id": "positive-sentiment-filter",
"name": "积极情绪过滤器",
"type": "n8n-nodes-base.if",
"position": [
1400,
950
],
"parameters": {
"options": {},
"conditions": {
"options": {
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"conditions": [
{
"id": "positive-sentiment",
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.sentiment }}",
"rightValue": "positive"
},
{
"id": "very-positive-sentiment",
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.sentiment }}",
"rightValue": "very_positive"
}
],
"combineOperation": "any"
}
},
"typeVersion": 2
},
{
"id": "slack-positive-alert",
"name": "Slack积极提及警报",
"type": "n8n-nodes-base.slack",
"position": [
1800,
950
],
"parameters": {
"text": "🌟 **POSITIVE BRAND MENTION** 🌟\n\n**{{ $json.author }}** on **{{ $json.platform }}** said something great about us!\n\n{% if $json.sentiment == 'very_positive' %}💚 **VERY POSITIVE**{% else %}🟢 **POSITIVE**{% endif %} ({{ $json.sentiment_confidence }}% confidence)\n\n**Content**:\n_{{ $json.content | truncate(300) }}_\n\n**Engagement**: 👍 {{ $json.likes }} | 🔄 {{ $json.shares }} | 💬 {{ $json.comments }}\n**Influencer Tier**: {{ $json.influencer_tier | replace('_', ' ') | title }}\n\n🔗 [View Post]({{ $json.post_url }})\n\n💡 Consider engaging with this positive mention!",
"select": "channel",
"channelId": {
"__rl": true,
"mode": "name",
"value": "C0987654321"
},
"otherOptions": {
"includeLinkPreviews": true
},
"authentication": "oAuth2"
},
"credentials": {
"slackOAuth2Api": {
"id": "",
"name": ""
}
},
"typeVersion": 2.2
},
{
"id": "sticky-triggers",
"name": "便签 - 触发器",
"type": "n8n-nodes-base.stickyNote",
"position": [
280,
350
],
"parameters": {
"color": 6,
"width": 350,
"height": 450,
"content": "# 步骤1:社交媒体监控触发器 📱"
},
"typeVersion": 1
},
{
"id": "sticky-scraping",
"name": "便签 - 社交抓取",
"type": "n8n-nodes-base.stickyNote",
"position": [
680,
200
],
"parameters": {
"color": 6,
"width": 350,
"height": 450,
"content": "# 步骤2:多平台社交抓取 🌐"
},
"typeVersion": 1
},
{
"id": "sticky-analysis",
"name": "便签 - 情绪分析",
"type": "n8n-nodes-base.stickyNote",
"position": [
1280,
200
],
"parameters": {
"color": 6,
"width": 350,
"height": 450,
"content": "# 步骤3:高级情绪分析 🧠"
},
"typeVersion": 1
},
{
"id": "sticky-dashboard",
"name": "便签 - 仪表板与警报",
"type": "n8n-nodes-base.stickyNote",
"position": [
1680,
200
],
"parameters": {
"color": 6,
"width": 350,
"height": 450,
"content": "# 步骤4:智能警报与仪表板 📊"
},
"typeVersion": 1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "social-sentiment-v1.0",
"connections": {
"Positive Sentiment Filter": {
"main": [
[
{
"node": "Slack Positive Mention Alert",
"type": "main",
"index": 0
}
]
]
},
"Social Media Monitor Trigger": {
"main": [
[
{
"node": "Twitter Brand Mentions Scraper",
"type": "main",
"index": 0
},
{
"node": "Reddit Brand Discussion Scraper",
"type": "main",
"index": 0
},
{
"node": "LinkedIn Professional Mentions Scraper",
"type": "main",
"index": 0
}
]
]
},
"Crisis & Priority Alert Filter": {
"main": [
[
{
"node": "Slack Crisis & Priority Alert",
"type": "main",
"index": 0
}
]
]
},
"Manual Sentiment Check Webhook": {
"main": [
[
{
"node": "Twitter Brand Mentions Scraper",
"type": "main",
"index": 0
},
{
"node": "Reddit Brand Discussion Scraper",
"type": "main",
"index": 0
},
{
"node": "LinkedIn Professional Mentions Scraper",
"type": "main",
"index": 0
}
]
]
},
"Twitter Brand Mentions Scraper": {
"main": [
[
{
"node": "Advanced Sentiment Analysis & Brand Intelligence",
"type": "main",
"index": 0
}
]
]
},
"Reddit Brand Discussion Scraper": {
"main": [
[
{
"node": "Advanced Sentiment Analysis & Brand Intelligence",
"type": "main",
"index": 0
}
]
]
},
"LinkedIn Professional Mentions Scraper": {
"main": [
[
{
"node": "Advanced Sentiment Analysis & Brand Intelligence",
"type": "main",
"index": 0
}
]
]
},
"Advanced Sentiment Analysis & Brand Intelligence": {
"main": [
[
{
"node": "Google Sheets Sentiment Dashboard",
"type": "main",
"index": 0
},
{
"node": "Crisis & Priority Alert Filter",
"type": "main",
"index": 0
},
{
"node": "Positive Sentiment Filter",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
中级 - 市场调研, AI 摘要总结
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
竞品价格监控
带AI组件和警报的价格监控仪表板
If
Code
Slack
+6
15 节点vinci-king-01
市场调研
我的工作流 2
结合 AI 竞品监控和收入优化的自动化动态定价
If
Code
Merge
+8
25 节点vinci-king-01
市场调研
销售管道自动化仪表板
使用HubSpot CRM、ScrapeGraphAI和Google Sheets仪表板自动化销售管道
If
Code
Slack
+7
22 节点vinci-king-01
客户关系管理
我的工作流程 2
使用ScrapeGraphAI、Google表格和Slack提醒构建支持工单分析仪表板
If
Code
Slack
+5
15 节点vinci-king-01
工单管理
我的工作流程2
使用AI、Slack和Google Sheets监控社交媒体内容趋势
Code
Merge
Slack
+5
17 节点vinci-king-01
市场调研
我的工作流程 2
AI驱动内容差距分析,使用ScrapeGraphAI和战略规划
Code
Google Sheets
Schedule Trigger
+2
18 节点vinci-king-01
市场调研