8
n8n 中文网amn8n.com

冷邮件破冰生成器GPT-4o-mini模板

中级

这是一个Lead Generation, Multimodal AI领域的自动化工作流,包含 10 个节点。主要使用 GoogleSheets, ManualTrigger, SplitInBatches, OpenAi 等节点。 使用GPT-4O-mini和谷歌表格生成个性化冷邮件开场白

前置要求
  • Google Sheets API 凭证
  • OpenAI API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "8yxaQbSKa73Naaoq",
  "meta": {
    "instanceId": "6dab325484db17217432bd17c46b16a74656e18b7a3b29fe24824c64123a2170",
    "templateCredsSetupCompleted": true
  },
  "name": "冷邮件破冰生成器 GPT 4o-mini 模板",
  "tags": [],
  "nodes": [
    {
      "id": "6e508452-0193-4fc6-9762-a53d57b5a02a",
      "name": "当点击\"执行工作流\"时",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -32,
        0
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "d564d4ce-92c9-4797-868a-697f8a5e9ecd",
      "name": "获取表格中的行",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        192,
        0
      ],
      "parameters": {
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "",
          "cachedResultUrl": "",
          "cachedResultName": ""
        },
        "documentId": {
          "__rl": true,
          "mode": "url",
          "value": ""
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "O1ZqVN7Ekj72TWzq",
          "name": "Google Sheets account 2"
        }
      },
      "executeOnce": false,
      "typeVersion": 4.6
    },
    {
      "id": "6574b56d-b207-48a5-bcf7-4f9d54332e52",
      "name": "向模型发送消息",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        624,
        16
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini",
          "cachedResultName": "GPT-4O-MINI"
        },
        "options": {},
        "messages": {
          "values": [
            {
              "role": "system",
              "content": "You are a data-to-JSON generator. \nYou must return ONLY a valid JSON object with no text before or after. \nDo not add explanations, line breaks, or commentary outside the JSON. \nStrict schema:\n\n{\n  \"verdict\": \"true\" or \"false\",\n  \"icebreaker\": \"string\",\n  \"shortenedCompanyName\": \"string\"\n}\n"
            },
            {
              "content": "=Your task is to write a natural, close, and spartan one-line icebreaker for a cold email.  \nIt should feel like I’ve done my homework on the person — specific and genuine, not generic.  \n\nOutput rules:\n- \"verdict\" = \"true\" if the input is a person, \"false\" if it’s a company.  \n- \"icebreaker\" must:  \n  - Start with: \"Hey [firstName],\"  \n  - Use a natural “I love…” or “I really like…” structure, but go deeper than surface-level (highlight something real from their role, company, industry, or city).  \n  - Keep it casual, like talking to a friend — no hype, no formal language.  \n  - One line only.  \n- End the icebreaker with a short, natural transition phrase like “wanted to run something by you” (or variations such as “thought I’d reach out” / “figured I’d connect”).\n- \"shortenedCompanyName\": shorten the company name (remove “Inc.”, “LLC”, “Agency”, etc).  \n\nExamples:  \nInput: \"Aina Rakotoarinaly, CEO founder - Maki Agency/Ti'bouffe, Maki Agency, outsourcing/offshoring, Antananarivo, Madagascar\"  \nOutput: {\"verdict\":\"true\",\"icebreaker\":\"Hey Aina, I love how you’ve built Maki into a go-to shop for outsourcing in Antananarivo.\",\"shortenedCompanyName\":\"Maki\"}\n\nInput: \"Adam Greenwood, Visionary Agency Leader | Digital Strategy & AI | Middle East, UK and Global Markets, the human tech agency, information technology & services, Dubai, United Arab Emirates\"  \nOutput: {\"verdict\":\"true\",\"icebreaker\":\"Hey Adam, I love how The Human Tech Agency mixes digital strategy with AI across global markets — super smart. Thought I’d reach out.\",\"shortenedCompanyName\":\"The Human Tech Agency\"}\n\nNow generate JSON for:\n{{ $json.firsName }} {{ $json.lastName }}, {{ $json.headline }}, {{ $json.industry }}, {{ $json.companyName }}, {{ $json.city }}, {{ $json.email }}"
            }
          ]
        },
        "simplify": false,
        "jsonOutput": true
      },
      "credentials": {
        "openAiApi": {
          "id": "YyHV6eOJU0bKIPQK",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1.8
    },
    {
      "id": "0bcf09d1-f467-4578-9abf-981a24baddfe",
      "name": "遍历项目",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        416,
        0
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "0d808a31-0bf6-4ec5-9491-2e02f805fc14",
      "name": "在表格中更新行",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        960,
        16
      ],
      "parameters": {
        "columns": {
          "value": {
            "icebreaker": "={{ $json.choices[0].message.content.icebreaker }}",
            "row_number": "={{ $('Get row(s) in sheet').item.json.row_number }}",
            "shortenedCompanyName": "={{ $json.choices[0].message.content.shortenedCompanyName }}"
          },
          "schema": [
            {
              "id": "first_name",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "first_name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "last_name",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "last_name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "headline",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "headline",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "companyName",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "companyName",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "industry",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "industry",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "city",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "city",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "country",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "country",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "email",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "email",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "icebreaker",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "icebreaker",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "shortenedCompanyName",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "shortenedCompanyName",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "linkedin_url",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "linkedin_url",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "row_number",
              "type": "number",
              "display": true,
              "removed": false,
              "readOnly": true,
              "required": false,
              "displayName": "row_number",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "row_number"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "update",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1R1PdKdw1UH1YCGOK94xPFlAM7Qqfkiz6sa7kihIsyX0/edit#gid=0",
          "cachedResultName": "Hoja 1"
        },
        "documentId": {
          "__rl": true,
          "mode": "url",
          "value": ""
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "O1ZqVN7Ekj72TWzq",
          "name": "Google Sheets account 2"
        }
      },
      "typeVersion": 4.6
    },
    {
      "id": "7e71ea4a-af5f-4bf8-8ef0-6fd76d7990b9",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        144,
        -320
      ],
      "parameters": {
        "color": 4,
        "width": 192,
        "height": 272,
        "content": "## 从 Google Sheets 获取潜在客户"
      },
      "typeVersion": 1
    },
    {
      "id": "b4b1fa0f-8f4e-4d82-941e-b01f1cf0d888",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -80,
        -320
      ],
      "parameters": {
        "width": 192,
        "height": 272,
        "content": "## 工作流触发器"
      },
      "typeVersion": 1
    },
    {
      "id": "c1310003-7c1c-43b1-af57-02ae1684836f",
      "name": "便签2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        592,
        -320
      ],
      "parameters": {
        "color": 6,
        "width": 288,
        "height": 272,
        "content": "## 使用 AI 生成个性化内容"
      },
      "typeVersion": 1
    },
    {
      "id": "baefc452-c9d5-422c-acce-9c3444afbb37",
      "name": "便签3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        368,
        -320
      ],
      "parameters": {
        "color": 5,
        "width": 192,
        "height": 272,
        "content": "## 处理每个潜在客户"
      },
      "typeVersion": 1
    },
    {
      "id": "81fbe23c-c5d5-4900-9d11-a5251ebfba8c",
      "name": "便签4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        912,
        -320
      ],
      "parameters": {
        "color": 4,
        "width": 192,
        "height": 272,
        "content": "## 将结果保存到 Google Sheets"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "955ec341-ea41-4da0-8ebf-83d56c571dbd",
  "connections": {
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "Message a model",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Message a model": {
      "main": [
        [
          {
            "node": "Update row in sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get row(s) in sheet": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update row in sheet": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Execute workflow’": {
      "main": [
        [
          {
            "node": "Get row(s) in sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

中级 - 潜在客户开发, 多模态 AI

需要付费吗?

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

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

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

作者

AI & automation consultant helping businesses streamline processes, generate leads, and scale faster with smart workflows. Founder of SyncraLabs, integrating AI with n8n to create practical, high-impact automations. Passionate about sharing knowledge through ready-to-use templates and community contributions.

外部链接
在 n8n.io 查看

分享此工作流