ChatGPT销售外联触达AI 评分 · 待评分AI 辅助编辑·未发现明显提示词注入风险n8n.io

用 n8n + GPT-4 Mini 清洗 Google Sheet 中的公司名,提升冷邮件个性化效果

输入:含 Company 列的 Google Sheet URL → 处理:LLM 自动去除后缀、标语与格式问题 → 输出:新增 Cleaned Companies 工作表,含清洗后的公司名

有一点经验步骤流程提示词贴士
给谁
负责冷邮件外联的销售或市场运营人员
你会得到
将 messy 公司名(如 "Techwave Solutions LLC")清洗为自然、专业的简称(如 "Techwave"),降低模板感,提升回复率
你需要
n8n · google-sheets

硬约束

前置条件:n8n 实例(自托管或云版);Google Sheets OAuth2 凭证(需对目标 Sheet 有编辑权限);OpenAI API 凭证。输入 Sheet 必须包含名为 "Company" 的列。费用:OpenAI API 按 token 计费,n8n 按实例方案计费。

他们做了什么

模板作者 paperjam 在 n8n 中构建了一个工作流:通过表单接收含 Company 列的 Google Sheet URL,自动创建结果工作表,调用 GPT-4.1-mini 配合结构化输出解析器清洗公司名,最后将清洗结果与原始数据合并保存。

效果如何

作者称该 system prompt 为 "highly optimized",并建议根据目标行业或 leads 数据特征更新 examples 以获得更好效果(author_report)。

值得知道

1. Google Sheets 凭证账号必须对提交的 Sheet 有编辑权限。2. 默认 batchSize 为 5,可在 Clean Company Name 节点调整。3. 模型可在 gpt-4.1-mini / gpt-4.1 / gpt-4 间切换。4. 本站未实测此工作流,搭建后请先用小样本验证输出。5. 模板不含错误处理节点,生产环境建议添加异常分支。

n8n 工作流模板

结构已检查 · 未实际运行

下载后在 n8n 选择“Import from File”,或复制 JSON 后粘贴到编辑器。先配置自己的账号,再用测试数据运行;模板默认未启用。

配置与测试清单

需要绑定的凭证

  • Get Leads 节点:绑定Google Sheets OAuth2 凭证。
  • OpenAI Chat Model 节点:绑定OpenAI API 凭证。
  • Save Output 节点:绑定Google Sheets OAuth2 凭证。
  • Create Destination Sheet 节点:绑定Google Sheets OAuth2 凭证。

需要替换的配置

  • 源模板来自 n8n 公开库 #5647(约 12 个节点)。导入后先保持未启用,核对触发器、表达式与外部 API 端点。
  • Sticky Note 中的说明仅供参考;按自己的账号、表结构或频道 ID 替换占位配置。

测试输入与预期结果

  • 在测试环境手动执行一次主路径,确认每个需凭证的节点已连接且无鉴权错误。
  • 用一条合成/脱敏样例数据跑通,核对输出字段与下游写入目标,再考虑生产启用。

模板处理说明

  • 已移除原作者凭证绑定、webhookId 与执行数据,工作流设为未启用;节点、连线与原文提示词保持原样。未在 n8n 中实际运行。
  • 未改业务逻辑;运行前请自行核对密钥、配额与隐私合规。

模板获取日期: 2026-10-24

步骤

  1. 配置凭证并准备 Google Sheet

    在 n8n 中添加 Google Sheets OAuth2 和 OpenAI API 凭证。创建一个新的 Google Sheet,确保第一行表头包含 "Company" 列,下方填入待清洗的 leads 数据。

  2. 触发工作流并创建目标工作表

    运行工作流后,通过 n8n Form 提交 Sheet URL。工作流会自动在原 Spreadsheet 中创建一个名为 "Cleaned Companies" 的新工作表(绿色标签),用于存放结果。

  3. 读取线索数据

    工作流从提交 URL 对应的首个工作表(sheet ID "0")中读取全部 leads 数据。

  4. 用 LLM 清洗公司名

    将 Company 列逐条传入 LLM Chain。模型使用 GPT-4.1-mini(可在 n8n 中切换为 gpt-4.1 或 gpt-4),配合结构化输出解析器,按 system prompt 规则清洗:去除 LLC/Inc. 等后缀、Systems/Solutions 等冗余词、标语与描述短语,应用 title case,保留可识别性。批次大小为 5。

    运行提示词 · 来源原文。Clean Company Name 节点的 messages.messageValues[0].message(system prompt)

    **Situation** 
    You 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.  
    
    **Task** 
    Clean 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: 
    1. Remove common business suffixes (LLC, Inc., Corp., Corporation, Ltd., Limited, Co., Company, etc.) 
    2. 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.)
    3. Remove taglines, slogans, or descriptive phrases (typically found after dashes, pipes, or "the" statements) 
    4. Apply proper title case formatting 
    5. Shorten names to their most recognizable form when possible while maintaining professionalism 
    6. Ensure the result maintains the company's professional identity and recognizability  
    
    **Objective** 
    Transform 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.
    
    **Knowledge** 
    - Business suffixes to remove include: LLC, Inc., Corp., Corporation, Ltd., Limited, Co., Company, LP, LLP, PC, PLLC, and their variations with different punctuation 
    - Taglines often appear after symbols like: dash (-), pipe (|), colon (:), or phrases starting with "the," "your," "we," etc. 
    - 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.
    - Maintain professional tone 
    - Keep established business names recognizable (e.g., "Microsoft Corporation" becomes "Microsoft") 
    - Avoid over-shortening if it makes the company unrecognizable or unprofessional 
    - Service descriptions and taglines should be completely removed (e.g., "ExtraSlice, LLC - Workspace as a Service" becomes "ExtraSlice")  
    
    <examples> 
    Input: "ExtraSlice, LLC - Workspace as a Service" 
    Output: "ExtraSlice"  
    
    Input: "ACRE Solutions" 
    Output: "ACRE"  
    
    Input: "MRP Capital Group" 
    Output: "MRP"  
    
    Input: "Paul & Associates Real Estate Services" 
    Output: "Paul & Associates"  
    
    Input: "Global Valuation & Consulting, LLC." 
    Output: "Global Valuation & Consulting"  
    
    Input: "Agent Career Education | Ace" 
    Output: "Agent Career Education"  
    
    Input: "PROPERTY AGENTS" 
    Output: "Property Agents"  
    
    Input: "Agently - Agent Success Platform for Brokerages" 
    Output: "Agently"  
    
    Input: "Monserrate Premium Home Agents" 
    Output: "Monserrate"  
    
    Input: "Belmont Howard Group, LLC."
    Output: "Belmont Howard"  
    
    Input: "BruZiv Partners, LLC" 
    Output: "BruZiv"  
    
    Input: "Van Vlissingen and Co." 
    Output: "Van Vlissingen" 
    </examples>
    
    It'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.
  5. 合并原始数据并保存结果

    将 LLM 输出的 cleanCompanyName 与原始 lead 数据按位置合并,添加 "Clean Company Name" 列,排除中间字段后,追加写入 "Cleaned Companies" 工作表。

可复制提示词

搭建指导 · 本站建议版本。交给搭建助手,先确认输入和权限

这一段是提示词,页面不会在这里插入广告。

你正在复现 n8n 模板 #5647:用 GPT-4 Mini 清洗 Google Sheet 中的公司名。请先确认以下前置条件:1) n8n 实例已就绪;2) Google Sheets OAuth2 和 OpenAI API 凭证已配置;3) 目标 Sheet 包含 "Company" 列。然后导入 workflow.json 或按步骤手动搭建:表单触发 → 创建目标 sheet → 读取 leads → LLM Chain 清洗(含上述 system prompt)→ 合并 → 保存。建议先用小批量测试,验证输出格式后再全量运行。

如需提升效果,可按目标行业更新 system prompt 中的 examples

来源

Clean company names for cold emails with GPT-4 Mini and Google Sheets · paperjam · n8n.io · 2025-07-03

留言与反馈

试过这个方法吗?分享效果、遇到的问题或改进建议。留言审核后公开,请勿填写敏感信息。

正在加载…

    相关用例