8
n8n 中文网amn8n.com

使用Icypeas执行电子邮件搜索(批量)

中级

这是一个Sales, Marketing领域的自动化工作流,包含 8 个节点。主要使用 Code, HttpRequest, GoogleSheets, ManualTrigger 等节点。 使用Icypeas执行电子邮件搜索(批量)

前置要求
  • 可能需要目标 API 的认证凭证
  • Google Sheets API 凭证
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "meta": {
    "instanceId": "257476b1ef58bf3cb6a46e65fac7ee34a53a5e1a8492d5c6e4da5f87c9b82833"
  },
  "nodes": [
    {
      "id": "f5c16b6d-b7b0-4b36-9e74-795a4f486604",
      "name": "当点击\"执行工作流\"时",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        360,
        1700
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "0cc486d8-397f-44b1-a23b-04d0c142a48d",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        220,
        1420
      ],
      "parameters": {
        "height": 259,
        "content": "## 使用 Icypeas 进行电子邮件搜索(批量搜索)"
      },
      "typeVersion": 1
    },
    {
      "id": "b932d050-4934-4f2f-a620-79f08b97c428",
      "name": "验证您的 Icypeas 账户",
      "type": "n8n-nodes-base.code",
      "position": [
        860,
        1700
      ],
      "parameters": {
        "jsCode": "const API_BASE_URL = \"https://app.icypeas.com/api\";\nconst API_PATH = \"/bulk-search\";\nconst METHOD = \"POST\";\n\n// Change here\nconst API_KEY = \"PUT_API_KEY_HERE\";\nconst API_SECRET = \"PUT_API_SECRET_HERE\";\nconst USER_ID = \"PUT_USER_ID_HERE\";\n////////////////\n\nconst genSignature = (\n    url,\n    method,\n    secret,\n    timestamp = new Date().toISOString()\n) => {\n    const Crypto = require('crypto');\n    const payload = `${method}${url}${timestamp}`.toLowerCase();\n    const sign = Crypto.createHmac(\"sha1\", secret).update(payload).digest(\"hex\");\n\n    return sign;\n};\n\nconst apiUrl = `${API_BASE_URL}${API_PATH}`;\n\nconst data = $input.all().map((x) => [x.json.firstname, x.json.lastname, x.json.company]);\n$input.first().json.data = data;\n$input.first().json.api = {\n  timestamp: new Date().toISOString(),\n  secret: API_SECRET,\n  key: API_KEY,\n  userId: USER_ID,\n  url: apiUrl,\n};\n\n$input.first().json.api.signature = genSignature(apiUrl, METHOD, API_SECRET, $input.first().json.api.timestamp);\nreturn $input.first();"
      },
      "typeVersion": 1
    },
    {
      "id": "35325df4-1d77-4200-9aca-a7f311f3857e",
      "name": "便签 1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        500,
        1560
      ],
      "parameters": {
        "height": 606.4963141641612,
        "content": "## 读取您的 Google Sheets 文件"
      },
      "typeVersion": 1
    },
    {
      "id": "ca04cf0b-59b6-4836-902f-2e93b6cbc3f5",
      "name": "便签 3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        741.0092314499475,
        1458.51011235955
      ],
      "parameters": {
        "width": 392.0593078758952,
        "height": 1203.3290499048028,
        "content": "## 验证您的 Icypeas 账户"
      },
      "typeVersion": 1
    },
    {
      "id": "69e3246b-f490-43e7-94ae-566eb4faf6b9",
      "name": "便签 4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1133,
        1460
      ],
      "parameters": {
        "width": 328.8456933308303,
        "height": 869.114109302513,
        "content": "## 执行电子邮件搜索(批量)"
      },
      "typeVersion": 1
    },
    {
      "id": "56abf128-57b3-4038-a262-38b09b3e3faf",
      "name": "从表格中读取姓氏、名字和公司信息",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        580,
        1700
      ],
      "parameters": {
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": ""
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": ""
        }
      },
      "typeVersion": 4.1
    },
    {
      "id": "f256a8e7-c8c6-4177-810e-f7af4961db05",
      "name": "运行批量搜索(电子邮件搜索)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1200,
        1700
      ],
      "parameters": {
        "url": "={{ $json.api.url }}",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "sendHeaders": true,
        "authentication": "genericCredentialType",
        "bodyParameters": {
          "parameters": [
            {
              "name": "task",
              "value": "=email-search"
            },
            {
              "name": "name",
              "value": "Test"
            },
            {
              "name": "user",
              "value": "={{ $json.api.userId }}"
            },
            {
              "name": "data",
              "value": "={{ $json.data }}"
            }
          ]
        },
        "genericAuthType": "httpHeaderAuth",
        "headerParameters": {
          "parameters": [
            {
              "name": "X-ROCK-TIMESTAMP",
              "value": "={{ $json.api.timestamp }}"
            }
          ]
        }
      },
      "typeVersion": 4.1
    }
  ],
  "pinData": {},
  "connections": {
    "When clicking \"Execute Workflow\"": {
      "main": [
        [
          {
            "node": "Reads lastname,firstname and company from your sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Authenticates to your Icypeas account": {
      "main": [
        [
          {
            "node": "Run bulk search (email-search)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Reads lastname,firstname and company from your sheet": {
      "main": [
        [
          {
            "node": "Authenticates to your Icypeas account",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

中级 - 销售, 营销

需要付费吗?

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

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

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

外部链接
在 n8n.io 查看

分享此工作流