8
n8n 中文网amn8n.com

BeyondPresence 销售机会评分 - 实时潜在客户智能

中级

这是一个Sales, AI领域的自动化工作流,包含 14 个节点。主要使用 Code, Slack, Switch, Webhook, RespondToWebhook 等节点,结合人工智能技术实现智能自动化。 BeyondPresence 销售智能 → 实时潜在客户评分

前置要求
  • Slack Bot Token 或 Webhook URL
  • HTTP Webhook 端点(n8n 会自动生成)
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "3lIutQSsxmpnS38v",
  "meta": {
    "instanceId": "eb3d53320c110bef9b66cf21b0da1ce60c7b6876e22315eca1be511a26fd726c",
    "templateCredsSetupCompleted": true
  },
  "name": "BeyondPresence 销售机会评分 - 实时潜在客户智能",
  "tags": [],
  "nodes": [
    {
      "id": "8131b77c-66b2-4138-bac9-1062dd50b631",
      "name": "工作流概览",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        80,
        -600
      ],
      "parameters": {
        "color": 6,
        "width": 560,
        "height": 660,
        "content": "## 🎯 销售机会评分系统"
      },
      "typeVersion": 1
    },
    {
      "id": "ab3a8f0b-a1ab-4f88-80ed-435115915cb3",
      "name": "评分规则",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        680,
        -600
      ],
      "parameters": {
        "color": 4,
        "width": 400,
        "height": 780,
        "content": "## 📊 评分逻辑"
      },
      "typeVersion": 1
    },
    {
      "id": "6395e121-1f83-4d07-a8e2-1566c37511ce",
      "name": "提醒系统",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1100,
        -600
      ],
      "parameters": {
        "color": 3,
        "width": 380,
        "height": 780,
        "content": "## 🔔 Slack 提醒"
      },
      "typeVersion": 1
    },
    {
      "id": "abc9e5e4-df53-4891-97ff-6c18fd06d534",
      "name": "BeyondPresence 实时 Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        100,
        -120
      ],
      "webhookId": "beyondpresence-sales-intelligence",
      "parameters": {
        "path": "beyondpresence-sales-intelligence",
        "options": {
          "rawBody": false
        },
        "httpMethod": "POST",
        "responseMode": "responseNode"
      },
      "typeVersion": 2
    },
    {
      "id": "f94cb19d-0bca-4f42-8f25-11cc853f3323",
      "name": "确认接收",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        280,
        -120
      ],
      "parameters": {
        "options": {
          "responseCode": 200
        },
        "respondWith": "json",
        "responseBody": "{\n  \"status\": \"success\",\n  \"message\": \"Sales intelligence processing\",\n  \"timestamp\": \"{{ $now.toISO() }}\"\n}"
      },
      "typeVersion": 1.2
    },
    {
      "id": "9dae992f-6930-4db1-9c18-b85deaa352df",
      "name": "筛选用户消息",
      "type": "n8n-nodes-base.switch",
      "position": [
        460,
        -120
      ],
      "parameters": {
        "rules": {
          "values": [
            {
              "outputKey": "user_message",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.body.event_type }}",
                    "rightValue": "message"
                  },
                  {
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.body.message.sender }}",
                    "rightValue": "user"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "call_ended",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.body.event_type }}",
                    "rightValue": "call_ended"
                  }
                ]
              },
              "renameOutput": true
            }
          ]
        },
        "options": {
          "fallbackOutput": "none"
        }
      },
      "typeVersion": 3.2
    },
    {
      "id": "c7cc875b-4282-4197-9d56-879a287fe385",
      "name": "评分销售机会",
      "type": "n8n-nodes-base.code",
      "position": [
        720,
        -160
      ],
      "parameters": {
        "jsCode": "// Sales Opportunity Scoring Engine\n// Helper function for recommendations (moved to top for better organization)\nfunction generateRecommendations(score, signals) {\n  const recommendations = [];\n  \n  if (score >= 70) {\n    recommendations.push('📞 Schedule immediate follow-up call');\n    recommendations.push('👤 Loop in senior sales rep');\n    recommendations.push('📊 Prepare custom pricing proposal');\n  } else if (score >= 40) {\n    recommendations.push('📧 Send detailed product information');\n    recommendations.push('📅 Offer demo scheduling link');\n    recommendations.push('📚 Share relevant case studies');\n  } else if (score < 0) {\n    recommendations.push('🎯 Address specific objections');\n    recommendations.push('💡 Focus on value proposition');\n    recommendations.push('📞 Schedule follow-up for better timing');\n  }\n  \n  if (signals.includes('🏁 Competitor Evaluation')) {\n    recommendations.push('⚔️ Prepare competitive differentiation materials');\n  }\n  \n  return recommendations;\n}\n\ntry {\n  // Safely extract input data with validation\n  const input = $input.first();\n  if (!input || !input.json || !input.json.body) {\n    throw new Error('Invalid input structure');\n  }\n  \n  const messageData = input.json.body;\n  const message = messageData.message;\n  const callId = messageData.call_id || 'unknown';\n  const userName = messageData.call_data?.userName || 'Unknown User';\n  \n  // Validate message structure\n  if (!message || !message.message) {\n    throw new Error('Message content is missing');\n  }\n  \n  // Initialize scoring\n  let opportunityScore = 0;\n  const detectedSignals = [];\n  const alerts = [];\n  \n  // Buying Signal Detection with Scoring\n  const buyingSignals = {\n    high_intent: {\n      keywords: ['purchase', 'buy', 'implement', 'contract', 'agreement', 'sign up', 'ready to move forward'],\n      score: 30,\n      label: '🔥 High Purchase Intent'\n    },\n    decision_maker: {\n      keywords: ['decision maker', 'my team', 'our company', 'we need', 'our budget', 'my boss', 'approval from'],\n      score: 25,\n      label: '👔 Decision Maker Indicator'\n    },\n    demo_request: {\n      keywords: ['demo', 'trial', 'test', 'try it', 'see it in action', 'show me', 'walk through'],\n      score: 25,\n      label: '🖥️ Demo Request'\n    },\n    timeline: {\n      keywords: ['when can', 'how soon', 'timeline', 'start date', 'implement by', 'deadline', 'need this by'],\n      score: 20,\n      label: '⏰ Timeline Discussion'\n    },\n    budget: {\n      keywords: ['budget', 'cost', 'pricing', 'investment', 'roi', 'pay', 'afford', 'price point'],\n      score: 15,\n      label: '💰 Budget Discussion'\n    },\n    interest: {\n      keywords: ['interested', 'tell me more', 'sounds good', 'like this', 'impressive', 'exactly what', 'perfect'],\n      score: 15,\n      label: '👍 Positive Interest'\n    },\n    problem_fit: {\n      keywords: ['solve our problem', 'exactly what we need', 'perfect for us', 'this would help', 'addresses our'],\n      score: 20,\n      label: '✅ Strong Problem-Solution Fit'\n    }\n  };\n  \n  // Negative Signal Detection\n  const negativeSignals = {\n    price_objection: {\n      keywords: ['too expensive', 'cant afford', 'over budget', 'too much', 'cheaper option', 'cost too high'],\n      score: -25,\n      label: '💸 Price Objection'\n    },\n    not_interested: {\n      keywords: ['not interested', 'no thanks', 'not for us', 'pass', 'not looking', 'don\\'t need'],\n      score: -30,\n      label: '❌ Not Interested'\n    },\n    timing: {\n      keywords: ['not right now', 'maybe later', 'next year', 'not a priority', 'down the road', 'future'],\n      score: -15,\n      label: '⏸️ Bad Timing'\n    },\n    just_browsing: {\n      keywords: ['just looking', 'researching', 'comparing options', 'early stages', 'exploring', 'window shopping'],\n      score: -10,\n      label: '🔍 Just Browsing'\n    }\n  };\n  \n  // Competitor Detection \n  const competitors = [\n    'competitor', 'alternative', 'other options', 'shopping around',\n    'comparing', 'versus', 'instead of', 'switch from',\n // Competitor Detection - Add your specific competitors here\n   'competitor1', 'competitor2'\n  ];\n  \n  // Deal Size Indicators\n  const dealSizeIndicators = {\n    enterprise: {\n      keywords: ['enterprise', 'company-wide', 'global', 'multiple teams', 'thousand users', 'all departments', 'entire organization'],\n      multiplier: 10,\n      label: '🏢 Enterprise Deal'\n    },\n    mid_market: {\n      keywords: ['department', 'team of', 'hundred users', 'multiple locations', 'division', 'several teams'],\n      multiplier: 5,\n      label: '🏬 Mid-Market Deal'\n    },\n    small_business: {\n      keywords: ['small team', 'few users', 'startup', 'small business', 'just us', 'handful of people'],\n      multiplier: 1,\n      label: '🏪 Small Business Deal'\n    }\n  };\n  \n  // Process message through scoring engine\n  const messageLower = message.message.toLowerCase();\n  \n  // Check buying signals\n  Object.entries(buyingSignals).forEach(([key, signal]) => {\n    if (signal.keywords.some(keyword => messageLower.includes(keyword))) {\n      opportunityScore += signal.score;\n      detectedSignals.push(signal.label);\n    }\n  });\n  \n  // Check negative signals\n  Object.entries(negativeSignals).forEach(([key, signal]) => {\n    if (signal.keywords.some(keyword => messageLower.includes(keyword))) {\n      opportunityScore += signal.score; // Note: score is negative\n      detectedSignals.push(signal.label);\n      alerts.push(`⚠️ Objection Detected: ${signal.label}`);\n    }\n  });\n  \n  // Check for competitors\n  const mentionedCompetitors = competitors.filter(comp => \n    messageLower.includes(comp.toLowerCase())\n  );\n  if (mentionedCompetitors.length > 0) {\n    alerts.push(`🎯 Competitor Mentioned: ${mentionedCompetitors.join(', ')}`);\n    detectedSignals.push('🏁 Competitor Evaluation');\n  }\n  \n  // Estimate deal size\n  let dealSizeEstimate = 'standard';\n  let dealMultiplier = 2;\n  Object.entries(dealSizeIndicators).forEach(([size, indicator]) => {\n    if (indicator.keywords.some(keyword => messageLower.includes(keyword))) {\n      dealSizeEstimate = size;\n      dealMultiplier = indicator.multiplier;\n      detectedSignals.push(indicator.label);\n    }\n  });\n  \n  // Determine lead temperature\n  let leadTemperature = '🧊 Cold';\n  let alertUrgency = 'low';\n  if (opportunityScore >= 70) {\n    leadTemperature = '🔥 Hot';\n    alertUrgency = 'high';\n    alerts.push('🚨 HOT LEAD DETECTED!');\n  } else if (opportunityScore >= 40) {\n    leadTemperature = '🌡️ Warm';\n    alertUrgency = 'medium';\n  } else if (opportunityScore >= 20) {\n    leadTemperature = '😎 Cool';\n    alertUrgency = 'low';\n  }\n  \n  // Extract numbers for deal size estimation - Improved regex\n  const numberMatches = messageLower.match(/\\$?\\d{1,3}(?:,\\d{3})*(?:\\.\\d{2})?[km]?|\\d+[km]/gi);\n  let estimatedValue = null;\n  if (numberMatches && numberMatches.length > 0) {\n    // Convert to standardized number\n    const lastNumber = numberMatches[numberMatches.length - 1];\n    let parsedValue = 0;\n    \n    if (lastNumber.toLowerCase().includes('k')) {\n      parsedValue = parseFloat(lastNumber.replace(/[^0-9.]/g, '')) * 1000;\n    } else if (lastNumber.toLowerCase().includes('m')) {\n      parsedValue = parseFloat(lastNumber.replace(/[^0-9.]/g, '')) * 1000000;\n    } else {\n      parsedValue = parseFloat(lastNumber.replace(/[$,]/g, ''));\n    }\n    \n    // Only set estimatedValue if we got a valid number\n    if (!isNaN(parsedValue) && parsedValue > 0) {\n      estimatedValue = parsedValue * dealMultiplier;\n    }\n  }\n  \n  // Prepare output\n  return [{\n    json: {\n      // Message context\n      callId: callId,\n      userName: userName,\n      timestamp: message.sent_at || new Date().toISOString(),\n      sender: message.sender || 'unknown',\n      message: message.message,\n      \n      // Scoring results\n      opportunityScore: opportunityScore,\n      leadTemperature: leadTemperature,\n      alertUrgency: alertUrgency,\n      \n      // Detected signals\n      detectedSignals: detectedSignals,\n      alerts: alerts,\n      \n      // Competitor intelligence\n      competitorsMentioned: mentionedCompetitors,\n      hasCompetitorMention: mentionedCompetitors.length > 0,\n      \n      // Deal estimation\n      dealSizeCategory: dealSizeEstimate,\n      dealMultiplier: dealMultiplier,\n      estimatedDealValue: estimatedValue,\n      formattedDealValue: estimatedValue ? `$${estimatedValue.toLocaleString()}` : 'Not detected',\n      \n      // Action recommendations\n      recommendedActions: generateRecommendations(opportunityScore, detectedSignals),\n      \n      // Metadata\n      processedAt: new Date().toISOString(),\n      workflowExecution: $execution?.id || 'unknown',\n      \n      // Success indicator\n      success: true,\n      error: null\n    }\n  }];\n  \n} catch (error) {\n  // Return error response\n  return [{\n    json: {\n      success: false,\n      error: error.message,\n      callId: 'error',\n      userName: 'Unknown',\n      timestamp: new Date().toISOString(),\n      opportunityScore: 0,\n      leadTemperature: '❌ Error',\n      alertUrgency: 'high',\n      alerts: [`🚨 Processing Error: ${error.message}`],\n      recommendedActions: ['🔧 Check input data format', '📞 Contact technical support'],\n      processedAt: new Date().toISOString()\n    }\n  }];\n}"
      },
      "typeVersion": 2
    },
    {
      "id": "88281417-5a4a-414d-9c8f-295ac1b3aeaa",
      "name": "路由提醒",
      "type": "n8n-nodes-base.switch",
      "position": [
        920,
        -200
      ],
      "parameters": {
        "rules": {
          "values": [
            {
              "outputKey": "hot_lead",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.alertUrgency }}",
                    "rightValue": "high"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "competitor_alert",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "operator": {
                      "type": "boolean",
                      "operation": "true",
                      "singleValue": true
                    },
                    "leftValue": "={{ $json.hasCompetitorMention }}",
                    "rightValue": "={{ true }}"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "qualified_lead",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "operator": {
                      "type": "number",
                      "operation": "gte"
                    },
                    "leftValue": "={{ $json.opportunityScore }}",
                    "rightValue": 40
                  }
                ]
              },
              "renameOutput": true
            }
          ]
        },
        "options": {
          "fallbackOutput": "none"
        }
      },
      "typeVersion": 3.2
    },
    {
      "id": "0f6ed4eb-c8d4-4c1e-8c03-991d887c83f9",
      "name": "Slack:热门潜在客户提醒",
      "type": "n8n-nodes-base.slack",
      "position": [
        1260,
        -260
      ],
      "webhookId": "bb0d3a7c-7481-4a86-b52a-9511cdc2309e",
      "parameters": {
        "text": "=🔥 *HOT LEAD ALERT!*\n\n*Lead:* {{ $json.userName }}\n*Score:* {{ $json.opportunityScore }} {{ $json.leadTemperature }}\n*Call ID:* `{{ $json.callId }}`\n\n*Message:* _\"{{ $json.message }}\"_\n\n*Detected Signals:*\n{{ $json.detectedSignals.join('\\n') }}\n\n*Recommended Actions:*\n{{ $json.recommendedActions.join('\\n') }}\n\n{{ $json.estimatedDealValue ? `💰 *Estimated Deal Value:* ${$json.formattedDealValue}` : '' }}",
        "select": "channel",
        "channelId": {
          "__rl": true,
          "mode": "name",
          "value": "#sales-hot-leads"
        },
        "otherOptions": {
          "mrkdwn": true
        },
        "authentication": "oAuth2"
      },
      "credentials": {
        "slackOAuth2Api": {
          "id": "fqQEQ6t5FN8BPrTs",
          "name": "Slack account"
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "35d57ba3-432e-444a-bde4-b6bc5a340ee7",
      "name": "Slack:竞争对手提醒",
      "type": "n8n-nodes-base.slack",
      "position": [
        1240,
        -120
      ],
      "webhookId": "987e4ae2-0036-4cd1-8986-775c7ba988e7",
      "parameters": {
        "text": "=🎯 *Competitor Intelligence Alert*\n\n*Lead:* {{ $json.userName }}\n*Competitors Mentioned:* `{{ $json.competitorsMentioned.join(', ') }}`\n\n*Context:* _\"{{ $json.message }}\"_\n\n*Current Lead Score:* {{ $json.opportunityScore }} {{ $json.leadTemperature }}\n\n*Recommended Response:*\n⚔️ Emphasize unique differentiators\n📊 Share competitive comparison docs\n🎯 Address specific competitor weaknesses",
        "select": "channel",
        "channelId": {
          "__rl": true,
          "mode": "name",
          "value": "#sales-competitors"
        },
        "otherOptions": {
          "mrkdwn": true
        },
        "authentication": "oAuth2"
      },
      "credentials": {
        "slackOAuth2Api": {
          "id": "fqQEQ6t5FN8BPrTs",
          "name": "Slack account"
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "6ddcb61a-dc4d-4585-b0e2-e7c62eba7b3f",
      "name": "Slack:合格潜在客户",
      "type": "n8n-nodes-base.slack",
      "position": [
        1240,
        20
      ],
      "webhookId": "dfb87f01-c527-42dc-9d4c-296f83211373",
      "parameters": {
        "text": "=📈 *Qualified Lead Update*\n\n*Lead:* {{ $json.userName }}\n*Score:* {{ $json.opportunityScore }} {{ $json.leadTemperature }}\n\n*Latest Message:* _\"{{ $json.message }}\"_\n\n*Buying Signals:*\n{{ $json.detectedSignals.filter(s => !s.includes('❌') && !s.includes('💸') && !s.includes('⏸️') && !s.includes('🔍')).join('\\n') || 'None detected' }}\n\n*Next Steps:*\n{{ $json.recommendedActions.slice(0, 3).join('\\n') }}",
        "select": "channel",
        "channelId": {
          "__rl": true,
          "mode": "name",
          "value": "#sales-qualified"
        },
        "otherOptions": {
          "mrkdwn": true
        },
        "authentication": "oAuth2"
      },
      "credentials": {
        "slackOAuth2Api": {
          "id": "fqQEQ6t5FN8BPrTs",
          "name": "Slack account"
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "9efb26ba-abeb-48e3-ad95-e7a14c32ee34",
      "name": "处理通话摘要",
      "type": "n8n-nodes-base.code",
      "position": [
        720,
        20
      ],
      "parameters": {
        "jsCode": "// Process end-of-call summary with final scoring\nconst callData = $input.first().json.body;\nconst messages = callData.messages || [];\n\n// Aggregate scoring across entire conversation\nlet totalScore = 0;\nconst allSignals = new Set();\nconst competitorMentions = new Set();\nlet maxDealValue = 0;\nlet userMessageCount = 0;\n\n// Process each message\nmessages.forEach(msg => {\n  if (msg.sender === 'user') {\n    userMessageCount++;\n    const msgLower = msg.message.toLowerCase();\n    \n    // Check buying signals\n    const buyingKeywords = [\n      { keyword: 'interested', score: 15 },\n      { keyword: 'budget', score: 15 },\n      { keyword: 'timeline', score: 20 },\n      { keyword: 'demo', score: 25 },\n      { keyword: 'trial', score: 25 },\n      { keyword: 'purchase', score: 30 },\n      { keyword: 'implement', score: 30 },\n      { keyword: 'decision maker', score: 25 },\n      { keyword: 'our team', score: 20 }\n    ];\n    \n    buyingKeywords.forEach(item => {\n      if (msgLower.includes(item.keyword)) {\n        totalScore += item.score;\n        allSignals.add(`✅ ${item.keyword}`);\n      }\n    });\n    \n    // Check negative signals\n    const negativeKeywords = [\n      { keyword: 'not interested', score: -30 },\n      { keyword: 'too expensive', score: -25 },\n      { keyword: 'maybe later', score: -15 },\n      { keyword: 'just looking', score: -10 }\n    ];\n    \n    negativeKeywords.forEach(item => {\n      if (msgLower.includes(item.keyword)) {\n        totalScore += item.score;\n        allSignals.add(`❌ ${item.keyword}`);\n      }\n    });\n    \n    // Check competitors\n    const competitors = ['competitor', 'alternative', 'versus', 'comparing'];\n    competitors.forEach(comp => {\n      if (msgLower.includes(comp)) {\n        competitorMentions.add(comp);\n      }\n    });\n  }\n});\n\n// Calculate final metrics\nconst avgMessageScore = userMessageCount > 0 ? totalScore / userMessageCount : 0;\nconst qualificationLevel = \n  totalScore >= 100 ? '🏆 Highly Qualified' :\n  totalScore >= 50 ? '✅ Qualified' :\n  totalScore >= 20 ? '🤔 Needs Nurturing' :\n  '❄️ Not Qualified';\n\nreturn [{\n  json: {\n    callId: callData.call_id,\n    userName: callData.call_data.userName,\n    duration: callData.evaluation?.duration_minutes || 0,\n    totalMessages: messages.length,\n    userMessages: userMessageCount,\n    finalScore: totalScore,\n    averageScore: avgMessageScore.toFixed(1),\n    qualificationLevel: qualificationLevel,\n    uniqueSignals: Array.from(allSignals),\n    competitorsMentioned: Array.from(competitorMentions),\n    callSummary: {\n      topic: callData.evaluation?.topic || 'General Discussion',\n      sentiment: callData.evaluation?.user_sentiment || 'neutral',\n      endTime: callData.call_data.endedAt\n    },\n    recommendations: generateFinalRecommendations(totalScore, allSignals),\n    nextBestAction: totalScore >= 50 ? '📞 Call within 24 hours' : '📧 Add to nurture campaign'\n  }\n}];\n\nfunction generateFinalRecommendations(score, signals) {\n  const recs = [];\n  if (score >= 100) {\n    recs.push('🎯 Fast-track to sales manager');\n    recs.push('📄 Prepare contract immediately');\n    recs.push('💰 Custom pricing proposal needed');\n  } else if (score >= 50) {\n    recs.push('📧 Send personalized follow-up within 2 hours');\n    recs.push('📅 Schedule next meeting this week');\n    recs.push('📊 Prepare ROI calculation');\n  } else {\n    recs.push('🌱 Add to nurture campaign');\n    recs.push('📚 Send educational content');\n    recs.push('⏰ Check back in 30 days');\n  }\n  return recs;\n}"
      },
      "typeVersion": 2
    },
    {
      "id": "86d700e6-027d-4771-b749-30ad2573bd34",
      "name": "Slack:通话摘要",
      "type": "n8n-nodes-base.slack",
      "position": [
        920,
        20
      ],
      "webhookId": "4efa4f35-14aa-4d1a-9d60-f7eff1f3c4f6",
      "parameters": {
        "text": "=📊 *Call Summary Report*\n\n*Lead:* {{ $json.userName }}\n*Call Duration:* {{ $json.duration }} minutes\n*Messages:* {{ $json.userMessages }} from user / {{ $json.totalMessages }} total\n\n*Final Qualification:* {{ $json.qualificationLevel }}\n*Total Score:* {{ $json.finalScore }} (Avg: {{ $json.averageScore }}/message)\n\n*Key Signals Detected:*\n{{ $json.uniqueSignals.join('\\n') || 'No strong signals detected' }}\n\n*Competitors Mentioned:* {{ $json.competitorsMentioned.length > 0 ? $json.competitorsMentioned.join(', ') : 'None' }}\n\n*Next Best Action:* {{ $json.nextBestAction }}\n\n*Recommendations:*\n{{ $json.recommendations.join('\\n') }}\n\n---\n_Call ID: `{{ $json.callId }}` | Ended: {{ $json.callSummary.endTime }}_",
        "select": "channel",
        "channelId": {
          "__rl": true,
          "mode": "name",
          "value": "#sales-summaries"
        },
        "otherOptions": {
          "mrkdwn": true
        },
        "authentication": "oAuth2"
      },
      "credentials": {
        "slackOAuth2Api": {
          "id": "fqQEQ6t5FN8BPrTs",
          "name": "Slack account"
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "786595a2-20fc-4948-89da-918fc08d6b1d",
      "name": "设置说明",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1500,
        -500
      ],
      "parameters": {
        "width": 340,
        "height": 540,
        "content": "## 🔧 配置步骤"
      },
      "typeVersion": 1
    }
  ],
  "active": true,
  "pinData": {
    "BeyondPresence Real-Time Webhook": [
      {
        "json": {
          "body": {
            "call_id": "BZ0MTsPQUOJngw4k5Txg",
            "message": {
              "sender": "user",
              "message": "I want to know about weather",
              "sent_at": "2025-05-28T10:26:32.104000+00:00"
            },
            "call_data": {
              "agentId": "1c540d63-8044-4e87-9fc1-e713abb60944",
              "userName": "Shehroz Sajjad"
            },
            "event_type": "message"
          },
          "query": {},
          "params": {},
          "headers": {
            "host": "bey-test.app.n8n.cloud",
            "accept": "*/*",
            "cf-ray": "946d0def44f1bb74-FRA",
            "cdn-loop": "cloudflare; loops=1; subreqs=1",
            "cf-ew-via": "15",
            "cf-worker": "n8n.cloud",
            "x-real-ip": "2600:1900:0:3401::e00",
            "cf-visitor": "{\"scheme\":\"https\"}",
            "user-agent": "python-requests/2.31.0",
            "cf-ipcountry": "US",
            "content-type": "application/json",
            "x-is-trusted": "yes",
            "content-length": "277",
            "accept-encoding": "gzip, br",
            "x-forwarded-for": "2600:1900:0:3401::e00, 172.70.246.133",
            "cf-connecting-ip": "2600:1900:0:3401::e00",
            "x-forwarded-host": "bey-test.app.n8n.cloud",
            "x-forwarded-port": "443",
            "x-forwarded-proto": "https",
            "x-forwarded-server": "traefik-prod-users-gwc-72-585f59b6c7-zdqd9"
          },
          "webhookUrl": "https://bey-test.app.n8n.cloud/webhook/beyondpresence-sales-intelligence",
          "executionMode": "production"
        }
      }
    ]
  },
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "a83151b3-1111-41e2-a9f9-b8680f2dd64f",
  "connections": {
    "Route Alerts": {
      "main": [
        [
          {
            "node": "Slack: Hot Lead Alert",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Slack: Competitor Alert",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Slack: Qualified Lead",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Acknowledge Receipt": {
      "main": [
        [
          {
            "node": "Filter User Messages",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter User Messages": {
      "main": [
        [
          {
            "node": "Score Sales Opportunity",
            "type": "main",
            "index": 0
          }
        ],
        []
      ]
    },
    "Process Call Summary": {
      "main": [
        [
          {
            "node": "Slack: Call Summary",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Score Sales Opportunity": {
      "main": [
        [
          {
            "node": "Route Alerts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "BeyondPresence Real-Time Webhook": {
      "main": [
        [
          {
            "node": "Acknowledge Receipt",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。

这个工作流适合什么场景?

中级 - 销售, 人工智能

需要付费吗?

本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。

工作流信息
难度等级
中级
节点数量14
分类2
节点类型6
难度说明

适合有一定经验的用户,包含 6-15 个节点的中等复杂度工作流

作者
M Shehroz Sajjad

M Shehroz Sajjad

@mshehrozsajjad

🚀 BeyondPresence Integration Specialist | n8n Expert Building the future of conversational AI automation. Creator of the BeyondPresence template collection for n8n, enabling real-time conversation intelligence, automated insights, and seamless business system integration. Specialties: Video agent automation, real-time webhooks, AI analysis, conversation intelligence

外部链接
在 n8n.io 查看

分享此工作流