使用 GPT-4 Mini 和 Google Sheets 清理冷邮件公司名称
中级
这是一个Lead Generation, AI Summarization领域的自动化工作流,包含 12 个节点。主要使用 Set, Merge, FormTrigger, GoogleSheets, ChainLlm 等节点。 使用 GPT-4 Mini 和 Google Sheets 清理冷邮件公司名称
前置要求
- •Google Sheets API 凭证
- •OpenAI API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"meta": {
"instanceId": "9192ad8880fb52b25f18408be81eae9d996a6784a1da3c68d52d3b7ef01d482b",
"templateCredsSetupCompleted": true
},
"nodes": [
{
"id": "fce88a0b-ba03-4657-8d7c-62a96bb12d50",
"name": "获取潜在客户",
"type": "n8n-nodes-base.googleSheets",
"position": [
260,
-35
],
"parameters": {
"options": {},
"sheetName": {
"__rl": true,
"mode": "id",
"value": "0"
},
"documentId": {
"__rl": true,
"mode": "url",
"value": "={{ $('On Form Submit').item.json['Lead Spreadsheet Url'] }}"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "KzK0OnjPiiYVoDTG",
"name": "Google Sheets | Paper Jam"
}
},
"typeVersion": 4.6
},
{
"id": "73e028cc-a9e0-4bf1-ac13-5fb9a5e937da",
"name": "OpenAI 聊天模型",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
480,
60
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4.1-mini"
},
"options": {}
},
"credentials": {
"openAiApi": {
"id": "xn9xslEO7m3MAqNQ",
"name": "OpenAI | Paper Jam"
}
},
"typeVersion": 1.2
},
{
"id": "1b43f3d4-d9d6-4929-8fad-dc9f884feff9",
"name": "结构化输出解析器",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
660,
60
],
"parameters": {
"jsonSchemaExample": "{\n\t\"cleanCompanyName\": \"Techwave\"\n}"
},
"typeVersion": 1.3
},
{
"id": "15fe57a0-4cd5-4907-b9cf-103d5be6cdc7",
"name": "清理公司名称",
"type": "@n8n/n8n-nodes-langchain.chainLlm",
"position": [
480,
-160
],
"parameters": {
"text": "=Company Name: {{ $json.Company }}",
"batching": {
"batchSize": 5
},
"messages": {
"messageValues": [
{
"message": "**Situation** \nYou are processing a lead list for a cold email campaign where company names will be used as personalization variables. The raw company names in the dataset contain various formatting inconsistencies, unnecessary suffixes, taglines, and casing issues that make them unsuitable for professional, natural, personalized outreach. \n\n**Task** \nClean and standardize company names from a lead list to create professional, polished variables suitable for cold email personalization. For each company name provided, you must: \n1. Remove common business suffixes (LLC, Inc., Corp., Corporation, Ltd., Limited, Co., Company, etc.) \n2. Remove common words that are in the formal company name but that a human likely wouldn't include when identifying the company in an email (Systems, Solutions, Communications, Agency, Group, Partners, etc.)\n3. Remove taglines, slogans, or descriptive phrases (typically found after dashes, pipes, or \"the\" statements) \n4. Apply proper title case formatting \n5. Shorten names to their most recognizable form when possible while maintaining professionalism \n6. Ensure the result maintains the company's professional identity and recognizability \n\n**Objective** \nTransform formal, cluttered company names into clean, professional versions that will make cold emails feel more natural, personal and polished, ultimately improving engagement rates and response likelihood in the outreach campaign.\n\n**Knowledge** \n- Business suffixes to remove include: LLC, Inc., Corp., Corporation, Ltd., Limited, Co., Company, LP, LLP, PC, PLLC, and their variations with different punctuation \n- Taglines often appear after symbols like: dash (-), pipe (|), colon (:), or phrases starting with \"the,\" \"your,\" \"we,\" etc. \n- Proper title case means capitalizing the first letter of each major word, but keeping articles, prepositions, and conjunctions lowercase unless they start the name. Acronyms should remain in all caps.\n- Maintain professional tone \n- Keep established business names recognizable (e.g., \"Microsoft Corporation\" becomes \"Microsoft\") \n- Avoid over-shortening if it makes the company unrecognizable or unprofessional \n- Service descriptions and taglines should be completely removed (e.g., \"ExtraSlice, LLC - Workspace as a Service\" becomes \"ExtraSlice\") \n\n<examples> \nInput: \"ExtraSlice, LLC - Workspace as a Service\" \nOutput: \"ExtraSlice\" \n\nInput: \"ACRE Solutions\" \nOutput: \"ACRE\" \n\nInput: \"MRP Capital Group\" \nOutput: \"MRP\" \n\nInput: \"Paul & Associates Real Estate Services\" \nOutput: \"Paul & Associates\" \n\nInput: \"Global Valuation & Consulting, LLC.\" \nOutput: \"Global Valuation & Consulting\" \n\nInput: \"Agent Career Education | Ace\" \nOutput: \"Agent Career Education\" \n\nInput: \"PROPERTY AGENTS\" \nOutput: \"Property Agents\" \n\nInput: \"Agently - Agent Success Platform for Brokerages\" \nOutput: \"Agently\" \n\nInput: \"Monserrate Premium Home Agents\" \nOutput: \"Monserrate\" \n\nInput: \"Belmont Howard Group, LLC.\"\nOutput: \"Belmont Howard\" \n\nInput: \"BruZiv Partners, LLC\" \nOutput: \"BruZiv\" \n\nInput: \"Van Vlissingen and Co.\" \nOutput: \"Van Vlissingen\" \n</examples>\n\nIt's critical that the company's professional recognizability while removing all unnecessary suffixes and taglines - the cleaned name must sound natural and professional when used in a business email context."
}
]
},
"promptType": "define",
"hasOutputParser": true
},
"typeVersion": 1.7
},
{
"id": "5d61e2e3-f881-4919-87ae-5af5a62e12a1",
"name": "合并",
"type": "n8n-nodes-base.merge",
"position": [
856,
-35
],
"parameters": {
"mode": "combine",
"options": {},
"combineBy": "combineByPosition"
},
"typeVersion": 3.2
},
{
"id": "11b87495-d6a1-4e72-a019-efbb44a7c8dc",
"name": "编辑字段",
"type": "n8n-nodes-base.set",
"position": [
1076,
-35
],
"parameters": {
"include": "except",
"options": {},
"assignments": {
"assignments": [
{
"id": "4195d1e4-0d85-43e9-be6e-085944f197df",
"name": "Clean Company Name",
"type": "string",
"value": "={{ $json.output.cleanCompanyName }}"
}
]
},
"excludeFields": "output,row_number",
"includeOtherFields": true
},
"typeVersion": 3.4
},
{
"id": "1883c284-9adf-43e5-8461-d419f112379a",
"name": "保存输出",
"type": "n8n-nodes-base.googleSheets",
"position": [
1300,
-40
],
"parameters": {
"columns": {
"value": {},
"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,
"removed": false,
"required": false,
"displayName": "Last Name",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Email",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Email",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Company",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Company",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Title",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Title",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "LinkedIn Url",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "LinkedIn Url",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Clean Company Name",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Clean Company Name",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "autoMapInputData",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {
"useAppend": true
},
"operation": "append",
"sheetName": {
"__rl": true,
"mode": "id",
"value": "={{ $('Create Destination Sheet').item.json.sheetId }}"
},
"documentId": {
"__rl": true,
"mode": "id",
"value": "={{ $('Create Destination Sheet').item.json.spreadsheetId }}"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "KzK0OnjPiiYVoDTG",
"name": "Google Sheets | Paper Jam"
}
},
"typeVersion": 4.6
},
{
"id": "602d2068-9694-4722-ac83-909a37bc0c4c",
"name": "创建目标表格",
"type": "n8n-nodes-base.googleSheets",
"position": [
40,
-35
],
"parameters": {
"title": "Cleaned Companies",
"options": {
"tabColor": "0aa55c"
},
"operation": "create",
"documentId": {
"__rl": true,
"mode": "url",
"value": "={{ $('On Form Submit').item.json['Lead Spreadsheet Url'] }}"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "KzK0OnjPiiYVoDTG",
"name": "Google Sheets | Paper Jam"
}
},
"typeVersion": 4.6
},
{
"id": "dd66b31e-aaa1-4e23-95e7-da2e62e9dc99",
"name": "表单提交时",
"type": "n8n-nodes-base.formTrigger",
"position": [
-180,
-35
],
"webhookId": "6ff9a6f5-1f05-4d03-ae18-cab031763ebc",
"parameters": {
"options": {},
"formTitle": "Clean Up Company Names",
"formFields": {
"values": [
{
"fieldLabel": "Lead Spreadsheet Url",
"requiredField": true
}
]
}
},
"typeVersion": 2.2
},
{
"id": "ecb26e43-a1fb-4d08-b871-444c7f0d4b75",
"name": "便签",
"type": "n8n-nodes-base.stickyNote",
"position": [
820,
-340
],
"parameters": {
"color": 7,
"width": 660,
"height": 560,
"content": "## 准备并保存输出"
},
"typeVersion": 1
},
{
"id": "ae44d84f-f177-4b01-ab27-29dda23f53d8",
"name": "便签 1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-220,
-340
],
"parameters": {
"color": 7,
"width": 620,
"height": 560,
"content": "## 获取潜在客户数据"
},
"typeVersion": 1
},
{
"id": "3beae3d0-d242-4430-8d3d-bd0e24cad78f",
"name": "便签 2",
"type": "n8n-nodes-base.stickyNote",
"position": [
420,
-340
],
"parameters": {
"color": 7,
"width": 380,
"height": 560,
"content": "## 使用AI清理公司名称"
},
"typeVersion": 1
}
],
"pinData": {},
"connections": {
"Merge": {
"main": [
[
{
"node": "Edit Fields",
"type": "main",
"index": 0
}
]
]
},
"Get Leads": {
"main": [
[
{
"node": "Clean Company Name",
"type": "main",
"index": 0
},
{
"node": "Merge",
"type": "main",
"index": 1
}
]
]
},
"Edit Fields": {
"main": [
[
{
"node": "Save Output",
"type": "main",
"index": 0
}
]
]
},
"On Form Submit": {
"main": [
[
{
"node": "Create Destination Sheet",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "Clean Company Name",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Clean Company Name": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 0
}
]
]
},
"Create Destination Sheet": {
"main": [
[
{
"node": "Get Leads",
"type": "main",
"index": 0
}
]
]
},
"Structured Output Parser": {
"ai_outputParser": [
[
{
"node": "Clean Company Name",
"type": "ai_outputParser",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
中级 - 潜在客户开发, AI 摘要总结
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
潜在客户开发与邮件工作流
使用Google Maps、SendGrid和AI自动化B2B潜在客户开发与邮件营销
If
Set
Code
+21
141 节点Ezema Kingsley Chibuzo
潜在客户开发
联系人信息丰富化
基于 Apollo、LinkedIn 和 GPT-4o 的全面联系人信息丰富化,适用于 HubSpot
If
Set
Code
+15
24 节点Interlock GTM
潜在客户开发
使用Bright Data MCP和AIAgents搜索和分析社交媒体资料
使用AI生成360度社交媒体报告 - Bright Data MCP
Set
Code
Form
+13
50 节点Romuald Członkowski
潜在客户开发
AI线索培育、资质判定与跟进
使用GPT-4o、Google Workspace和自动跟进的线索生成与资质判定
If
Set
Code
+10
41 节点Franz
潜在客户开发
TalentFlow AI - 批量简历筛选与职位描述匹配
使用GPT-4为HR团队进行批量简历筛选与职位描述匹配
If
Code
Merge
+12
30 节点Trung Tran
人力资源
竞争对手情报代理:SERP监控+Thordata+OpenAI的摘要洞察
竞争对手情报代理:SERP 监控 + Thordata + OpenAI 摘要洞察
Set
Merge
Google Sheets
+8
23 节点Ranjan Dailata
市场调研
工作流信息
难度等级
中级
节点数量12
分类2
节点类型8
作者
James Francis
@paperjam👋 Hi, I'm James. I run an AI automation agency focused on building small, focused workflows that have a direct and measurable impact on business growth or optimization.
外部链接
在 n8n.io 查看 →
分享此工作流