8
n8n 中文网amn8n.com

从网站HTML中提取电子邮件

中级

这是一个Sales, Marketing领域的自动化工作流,包含 10 个节点。主要使用 If, Set, Webhook, SplitOut, HttpRequest 等节点。 从网站HTML中提取电子邮件

前置要求
  • HTTP Webhook 端点(n8n 会自动生成)
  • 可能需要目标 API 的认证凭证
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "meta": {
    "instanceId": "8eadf351d49a11e77d3a57adf374670f06c5294af8b1b7c86a1123340397e728"
  },
  "nodes": [
    {
      "id": "f28a0602-f02c-4f41-8bbf-dfd46d0def87",
      "name": "拆分输出",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        2020,
        620
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "Email"
      },
      "typeVersion": 1
    },
    {
      "id": "d995d088-9be1-4a64-a533-d764587b3ae4",
      "name": "去重",
      "type": "n8n-nodes-base.removeDuplicates",
      "onError": "continueRegularOutput",
      "position": [
        2480,
        600
      ],
      "parameters": {},
      "retryOnFail": true,
      "typeVersion": 1
    },
    {
      "id": "b64f9bc5-7e85-41df-b27c-10d53df6809f",
      "name": "响应 Webhook",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        2740,
        600
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 1
    },
    {
      "id": "466cf9ce-4baf-45f9-bd70-d2041c20605e",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1204.5476340072564,
        520
      ],
      "parameters": {
        "color": 4,
        "width": 1764.2311804548722,
        "height": 309.99889350400827,
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "566ca1f5-b6c4-4566-97e7-59bc2d616e1c",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1300,
        800
      ],
      "parameters": {
        "color": 5,
        "width": 520.3009626085002,
        "height": 249.39327996703526,
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "ea95c9a3-b7c8-4288-8fdf-6504caee46f4",
      "name": "便签 2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        440,
        380
      ],
      "parameters": {
        "width": 728.4741979436378,
        "height": 430.0825742795921,
        "content": "# 如何从网站抓取电子邮件"
      },
      "typeVersion": 1
    },
    {
      "id": "05d4e9d4-d803-4e74-b4d0-166f4873dbca",
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        1360,
        620
      ],
      "webhookId": "ea568868-5770-4b2a-8893-700b344c995e",
      "parameters": {
        "path": "ea568868-5770-4b2a-8893-700b344c995e",
        "options": {},
        "responseMode": "responseNode"
      },
      "typeVersion": 1.1
    },
    {
      "id": "555c8f81-25ea-4be5-b260-7b6039c705a8",
      "name": "获取网站数据",
      "type": "n8n-nodes-base.httpRequest",
      "onError": "continueRegularOutput",
      "position": [
        1600,
        620
      ],
      "parameters": {
        "url": "={{ $json.query['Website'] }}",
        "options": {}
      },
      "retryOnFail": true,
      "typeVersion": 4.1
    },
    {
      "id": "e83b38b8-dc13-49eb-9482-1dbd8a9ef583",
      "name": "提取找到的电子邮件",
      "type": "n8n-nodes-base.set",
      "position": [
        1800,
        620
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "80a8a8ec-9ac7-4545-beab-390732218548",
              "name": "Email",
              "type": "array",
              "value": "={{$json.data.match(/(?:[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,})/g)}}"
            }
          ]
        }
      },
      "typeVersion": 3.3
    },
    {
      "id": "3fe56efc-0d7b-4e0f-8f9c-3b10ce59cb94",
      "name": "如果包含电子邮件",
      "type": "n8n-nodes-base.if",
      "position": [
        2220,
        620
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "701ead8f-02ba-4689-8054-9e40d9b9f770",
              "operator": {
                "type": "string",
                "operation": "notEmpty",
                "singleValue": true
              },
              "leftValue": "={{ $json.Email }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2
    }
  ],
  "pinData": {},
  "connections": {
    "Webhook": {
      "main": [
        [
          {
            "node": "Get the website data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out": {
      "main": [
        [
          {
            "node": "If contains email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If contains email": {
      "main": [
        [
          {
            "node": "Remove Duplicates",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Remove Duplicates": {
      "main": [
        [
          {
            "node": "Respond to Webhook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get the website data": {
      "main": [
        [
          {
            "node": "Extract the emails found",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract the emails found": {
      "main": [
        [
          {
            "node": "Split Out",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

中级 - 销售, 营销

需要付费吗?

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

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

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

作者
Imperol

Imperol

@imperolq

Automation expert with years of experience helping businesses improve their efficiency and productivity with smart automations that are affordable, scalable, and flexible.

外部链接
在 n8n.io 查看

分享此工作流