> ## Documentation Index
> Fetch the complete documentation index at: https://docs.anysite.io/llms.txt
> Use this file to discover all available pages before exploring further.

# 预构建工作流

> 用于常见用例的即用型 Anysite 工作流模板

## 概述

使用预构建的工作流模板快速入门，这些模板结合了多个 Anysite 节点，用于常见的业务场景。这些模板提供了完整的自动化解决方案，您可以根据特定需求进行定制。

## 潜在客户生成工作流

### 社交媒体潜在客户发现

用于在社交平台上查找和筛选潜在客户的完整工作流。

**功能：**

* 在 LinkedIn 上搜索目标行业的专业人士
* 查找他们的 Twitter 资料以进行互动分析
* 从公司网站提取联系信息
* 根据互动和公司规模对潜在客户评分
* 将合格的潜在客户添加到您的 CRM

**工作流模板：**

```json theme={null}
{
  "name": "Social Media Lead Discovery",
  "nodes": [
    {
      "name": "Search LinkedIn Professionals",
      "type": "@horizondatawave/n8n-nodes-anysite.LinkedIn",
      "operation": "searchPeople",
      "parameters": {
        "keywords": "CTO OR \"Chief Technology Officer\"",
        "location": "San Francisco Bay Area",
        "industry": "Technology",
        "limit": 50
      }
    },
    {
      "name": "Find Twitter Profiles",
      "type": "@horizondatawave/n8n-nodes-anysite.Twitter",
      "operation": "searchUsers",
      "parameters": {
        "query": "{{ $json.firstName }} {{ $json.lastName }} {{ $json.company }}"
      }
    },
    {
      "name": "Get Company Website",
      "type": "@horizondatawave/n8n-nodes-anysite.LinkedIn",
      "operation": "getCompanyInfo",
      "parameters": {
        "companyName": "{{ $json.company }}"
      }
    },
    {
      "name": "Extract Contact Info",
      "type": "@horizondatawave/n8n-nodes-anysite.WebParser",
      "operation": "parseUrl",
      "parameters": {
        "url": "{{ $json.websiteUrl }}/contact",
        "customSelectors": {
          "email": "a[href^='mailto:']",
          "phone": "[href^='tel:']"
        }
      }
    },
    {
      "name": "Score Lead Quality",
      "type": "n8n-nodes-base.function",
      "parameters": {
        "functionCode": `
          const lead = items[0].json;
          let score = 0;

          // 公司规模评分
          if (lead.employeeCount > 500) score += 30;
          else if (lead.employeeCount > 100) score += 20;
          else if (lead.employeeCount > 10) score += 10;

          // 社交互动评分
          if (lead.twitterFollowers > 5000) score += 25;
          else if (lead.twitterFollowers > 1000) score += 15;

          // 行业相关性
          if (lead.industry.includes('Technology')) score += 20;
          if (lead.industry.includes('Software')) score += 15;

          // 联系方式可用性
          if (lead.email) score += 15;
          if (lead.phone) score += 10;

          return [{
            json: {
              ...lead,
              leadScore: score,
              qualification: score > 70 ? 'Hot' : score > 40 ? 'Warm' : 'Cold'
            }
          }];
        `
      }
    },
    {
      "name": "Filter High-Quality Leads",
      "type": "n8n-nodes-base.filter",
      "parameters": {
        "conditions": [
          {
            "field": "leadScore",
            "operation": "greaterThan",
            "value": 40
          }
        ]
      }
    },
    {
      "name": "Add to CRM",
      "type": "n8n-nodes-base.hubspot",
      "parameters": {
        "operation": "create",
        "resource": "contact",
        "data": {
          "firstname": "={{ $json.firstName }}",
          "lastname": "={{ $json.lastName }}",
          "email": "={{ $json.email }}",
          "company": "={{ $json.company }}",
          "jobtitle": "={{ $json.position }}",
          "lead_score": "={{ $json.leadScore }}",
          "lead_source": "Social Media Discovery"
        }
      }
    }
  ]
}
```

### 内容创作者外联

在您的行业中查找并联系内容创作者。

**功能：**

* Instagram 影响者发现
* 互动率分析
* 联系信息提取
* 外联消息个性化

## 竞争情报

### 竞争对手社交媒体监控

跨所有社交平台跟踪竞争对手活动。

**工作流组件：**

1. **多平台搜索** - 监控 LinkedIn、Twitter、Instagram、Reddit
2. **内容分析** - 提取主题、信息和互动
3. **表现追踪** - 比较互动率和触达
4. **趋势识别** - 发现新兴话题和策略
5. **报告生成** - 每周竞争情报报告

**工作流模板：**

```json theme={null}
{
  "name": "Competitor Social Monitoring",
  "nodes": [
    {
      "name": "Monitor Competitor LinkedIn",
      "type": "@horizondatawave/n8n-nodes-anysite.LinkedIn",
      "operation": "getCompanyPosts",
      "parameters": {
        "companyName": "{{ $('Set Competitors').item.json.competitor }}",
        "limit": 10
      }
    },
    {
      "name": "Monitor Competitor Twitter",
      "type": "@horizondatawave/n8n-nodes-anysite.Twitter",
      "operation": "getUserPosts",
      "parameters": {
        "username": "{{ $('Set Competitors').item.json.twitterHandle }}",
        "tweetCount": 20
      }
    },
    {
      "name": "Analyze Content Themes",
      "type": "n8n-nodes-base.openAi",
      "parameters": {
        "operation": "analyze",
        "prompt": "Analyze these social media posts and identify the main themes, messaging strategies, and target audience: {{ JSON.stringify($input.all().map(item => item.json.text || item.json.content).slice(0, 10)) }}"
      }
    },
    {
      "name": "Calculate Engagement Metrics",
      "type": "n8n-nodes-base.function",
      "parameters": {
        "functionCode": `
          const posts = $input.all();
          const totalEngagement = posts.reduce((sum, post) => {
            const likes = post.json.likes || 0;
            const comments = post.json.comments || 0;
            const shares = post.json.shares || post.json.retweets || 0;
            return sum + likes + comments + shares;
          }, 0);

          const avgEngagement = totalEngagement / posts.length;
          const topPost = posts.reduce((max, post) => {
            const engagement = (post.json.likes || 0) + (post.json.comments || 0);
            const maxEngagement = (max.json.likes || 0) + (max.json.comments || 0);
            return engagement > maxEngagement ? post : max;
          }, posts[0]);

          return [{
            json: {
              competitor: posts[0].json.competitor,
              totalPosts: posts.length,
              avgEngagement,
              topPost: topPost.json,
              analysisDate: new Date().toISOString()
            }
          }];
        `
      }
    }
  ]
}
```

### 价格监控与分析

监控竞争对手定价和产品变化。

**功能：**

* 网站变化检测
* 价格比较分析
* 产品发布识别
* 市场定位洞察

## 内容研究

### 行业趋势分析

发现热门话题和内容机会。

**工作流功能：**

1. **多源研究** - Reddit、Twitter、行业博客
2. **趋势识别** - 发现新兴话题和讨论
3. **内容差距分析** - 查找内容服务不足的领域
4. **关键词研究** - 提取热门搜索词
5. **内容日历** - 生成内容创意和排程

**实现示例：**

```json theme={null}
{
  "name": "Industry Trend Analysis",
  "trigger": {
    "type": "n8n-nodes-base.cron",
    "parameters": {
      "rule": {
        "interval": [
          {
            "field": "cronExpression",
            "expression": "0 9 * * 1"
          }
        ]
      }
    }
  },
  "nodes": [
    {
      "name": "Reddit Hot Topics",
      "type": "@horizondatawave/n8n-nodes-anysite.Reddit",
      "operation": "monitorHotPosts",
      "parameters": {
        "subreddits": "MachineLearning,artificial,technology",
        "postLimit": 20,
        "minScore": 100
      }
    },
    {
      "name": "Twitter Trending",
      "type": "@horizondatawave/n8n-nodes-anysite.Twitter",
      "operation": "searchTweets",
      "parameters": {
        "query": "#AI OR #MachineLearning OR #TechTrends",
        "resultType": "popular",
        "limit": 50
      }
    },
    {
      "name": "Extract Trending Keywords",
      "type": "n8n-nodes-base.function",
      "parameters": {
        "functionCode": `
          const allText = $input.all().map(item =>
            item.json.title || item.json.text || ''
          ).join(' ');

          const keywords = allText.toLowerCase()
            .match(/\\b\\w{4,}\\b/g) || [];

          const keywordCount = {};
          keywords.forEach(word => {
            if (!['this', 'that', 'with', 'from', 'they', 'have', 'will', 'been', 'said'].includes(word)) {
              keywordCount[word] = (keywordCount[word] || 0) + 1;
            }
          });

          const trending = Object.entries(keywordCount)
            .sort(([,a], [,b]) => b - a)
            .slice(0, 15)
            .map(([keyword, count]) => ({ keyword, mentions: count }));

          return [{ json: { trendingKeywords: trending, date: new Date().toISOString() } }];
        `
      }
    },
    {
      "name": "Generate Content Ideas",
      "type": "n8n-nodes-base.openAi",
      "parameters": {
        "operation": "generate",
        "prompt": "Based on these trending keywords in AI/ML: {{ JSON.stringify($json.trendingKeywords) }}, generate 5 unique blog post ideas that would appeal to technical professionals. Include title, brief description, and target audience for each."
      }
    },
    {
      "name": "Save to Content Calendar",
      "type": "n8n-nodes-base.googleSheets",
      "parameters": {
        "operation": "append",
        "sheetId": "your-content-calendar-sheet-id",
        "values": [
          "={{ new Date().toLocaleDateString() }}",
          "={{ $json.contentIdeas }}",
          "Trend Analysis",
          "Planning"
        ]
      }
    }
  ]
}
```

## 品牌监控

### 社交提及追踪

跨所有社交平台监控品牌提及。

**监控范围：**

* 直接品牌提及
* 产品提及
* 竞争对手提及
* 行业讨论
* 情感分析

### 危机管理

针对负面提及的快速响应工作流。

**响应功能：**

* 实时提及检测
* 情感分析
* 升级触发器
* 团队通知
* 响应追踪

## 数据收集与分析

### 市场研究自动化

全面的市场情报收集。

**研究领域：**

1. **竞争对手分析** - 产品、定价、信息传递
2. **客户反馈** - 评论、社交提及、调查
3. **行业趋势** - 新闻、讨论、专家意见
4. **技术栈** - 目标使用的工具和技术
5. **联系人情报** - 决策者识别

### 潜在客户资格管道

自动化潜在客户评分和资格认定。

**资格标准：**

* 公司规模和增长
* 技术栈一致性
* 预算指标
* 决策者访问权限
* 互动历史

## 工作流定制

### 模板修改

每个工作流模板都可以通过以下方式定制：

1. **调整参数** - 修改搜索条件、限制和筛选器
2. **添加集成** - 连接到您的 CRM、数据库或通知系统
3. **自定义逻辑** - 添加业务特定的评分和资格规则
4. **调度** - 设置自动执行时间
5. **错误处理** - 配置重试逻辑和回退选项

### 最佳实践

**性能优化：**

* 在 API 调用之间使用适当的速率限制
* 为频繁访问的数据实施缓存
* 对大型数据集进行批量处理
* 设置工作流健康状况的监控和警报

**数据质量：**

* 在处理之前验证提取的数据
* 实施去重逻辑
* 优雅地处理缺失或不完整的数据
* 定期数据清理和维护

**合规性：**

* 尊重平台速率限制和服务条款
* 实施适当的数据保留策略
* 确保个人数据符合 GDPR
* 定期对数据访问进行安全审计

## 入门指南

### 快速设置

1. **选择模板** - 选择与您用例匹配的工作流
2. **配置凭证** - 设置您的 Anysite API 凭证
3. **自定义参数** - 根据您的特定需求调整设置
4. **测试工作流** - 使用小数据集运行以验证功能
5. **安排自动化** - 如果需要，设置定期执行

### 导入说明

要将这些工作流导入 n8n：

1. 复制 JSON 工作流模板
2. 在 n8n 中，进入 **Workflows** > **Import from JSON**
3. 粘贴模板并点击 **Import**
4. 在凭证管理器中配置您的 Anysite 凭证
5. 更新任何公司特定的参数
6. 使用示例数据测试工作流

### 支持与社区

* **文档** - 每个 Anysite 节点的详细指南
* **社区论坛** - 分享模板并获取帮助
* **支持** - 企业客户的技术支持
* **更新** - 定期模板更新和新用例

## 高级工作流

### 多渠道归因

跨多个接触点跟踪客户旅程。

### 竞争情报仪表板

包含竞争对手指标的实时仪表板。

### 客户成功自动化

主动的客户健康监控和干预。

### 销售管道加速

自动化的潜在客户培育和资格认定。

## 后续步骤

* [LinkedIn 节点](/n8n-nodes/linkedin-node) - LinkedIn 数据提取
* [Twitter 节点](/n8n-nodes/twitter-node) - Twitter/X 监控
* [Instagram 节点](/n8n-nodes/instagram-node) - Instagram 内容分析
* [Web Parser 节点](/n8n-nodes/web-parser-node) - 网站数据提取
