LinkedIn 潜在客户个性化:Google Drive + Apify + AI 自动外联开场白
上传 Google Drive 表格 → 解析每行并抓取 LinkedIn 动态 → 用 LLM 生成单句个性化开场白 → 回写 Google Sheets 并发送 Telegram 摘要
- 给谁
- 销售/SDR 团队、潜在客户开发机构、增长营销人员
- 你会得到
- 为每位潜在客户自动生成一句基于其 LinkedIn 近期帖子或个人资料的冷邮件开场白,写回原表格
- 你需要
- n8n · google-drive · google-sheets · apify · anthropic · openai · telegram
硬约束
需要 n8n 实例;配置 Google Drive/Sheets OAuth2、Apify token、Anthropic 和/或 OpenAI API key、Telegram bot token 与 chat ID。表格须包含:First Name, Last Name, Company Name for Emails, Person Linkedin Url, Email, Website。运行前替换所有占位符(Bearer [put your token here]、[put your Telegram Bot Chat ID here])。LinkedIn 抓取受平台速率限制,须遵守 ToS。
他们做了什么
作者 marielabg 在 n8n 上发布了一个官方模板:将包含潜在客户信息的 Google Sheets 表格放入指定 Drive 文件夹,自动触发工作流。工作流逐行解析,通过 Apify 抓取每位联系人的 LinkedIn 最近帖子或个人资料,利用 OpenAI 判断帖子时效,再经 Anthropic Claude 生成一句个性化冷邮件开场白,最终写回原表格并通过 Telegram 发送完成摘要。
效果如何
模板作者报告该工作流可为销售团队提供规模化、真实的个性化外联开场白,提升回复率。效果为作者自述(author_report),本站未实测验证。
值得知道
1)工作流包含硬编码的 2025 年份判断,若在其他年份运行需修改 OpenAI system message 中的年份;2)AI Agent1 和 AI Agent_Personalization_no LN post 的系统提示词中嵌入了作者自身业务上下文(AI automation agency / Lead Generation Sales System),复用时须替换为自身业务描述;3)LinkedIn 抓取受平台速率限制,存在被封禁风险,须遵守平台服务条款;4)Code1 节点源码中存在变量名不一致(return limitedItems 应为 return processedItems),首次导入后建议检查并修正;5)成本取决于所选 LLM 型号及 Apify 抓取量;6)Telegram 消息中的 score/status 字段在标准流程中未填充,实际通知内容主要为表格名称与链接。
n8n 工作流模板
结构已检查 · 未实际运行下载后在 n8n 选择“Import from File”,或复制 JSON 后粘贴到编辑器。先配置自己的账号,再用测试数据运行;模板默认未启用。
配置与测试清单
需要绑定的凭证
- Anthropic Chat Model1 节点:绑定Anthropic API 凭证。
- Lead Enrichment is ready 节点:绑定Telegram API 凭证。
- Anthropic Chat Model3 节点:绑定Anthropic API 凭证。
- Google Drive Trigger1 节点:绑定Google Drive OAuth2 凭证。
- Google Drive_DownLoad1 节点:绑定Google Drive OAuth2 凭证。
- OpenAI 节点:绑定OpenAI API 凭证。
- Google Sheets Update with Personalization 节点:绑定Google Sheets OAuth2 凭证。
- 将 __UKH_BEARER_7__ 替换为实际密钥/令牌(原路径 /nodes/7/parameters/headerParameters/parameters/2/value;literal auth header)。
- 将 __UKH_BEARER_10__ 替换为实际密钥/令牌(原路径 /nodes/10/parameters/headerParameters/parameters/2/value;literal auth header)。
需要替换的配置
- 源模板来自 n8n 公开库 #8706(约 25 个节点)。导入后先保持未启用,核对触发器、表达式与外部 API 端点。
- Sticky Note 中的说明仅供参考;按自己的账号、表结构或频道 ID 替换占位配置。
测试输入与预期结果
- 在测试环境手动执行一次主路径,确认每个需凭证的节点已连接且无鉴权错误。
- 用一条合成/脱敏样例数据跑通,核对输出字段与下游写入目标,再考虑生产启用。
模板处理说明
- 已移除原作者凭证绑定、webhookId 与执行数据,工作流设为未启用;节点、连线与原文提示词保持原样。未在 n8n 中实际运行。
- 未改业务逻辑;运行前请自行核对密钥、配额与隐私合规。 另将 2 处字面量密钥替换为 __UKH_…__ 占位符。
模板获取日期: 2026-10-24
步骤
连接凭证与配置触发器
在 n8n 中连接以下凭证:Google Drive/Sheets(OAuth2)、Apify(token)、Anthropic 和/或 OpenAI(API key)、Telegram(bot token)。打开 Google Drive Trigger 节点,选择要监控的文件夹(每次上传新表格时触发)。
准备表格并映射列
确保上传的表格包含以下列:First Name、Last Name、Company Name for Emails、Person Linkedin Url、Email、Website。工作流中的 Code1 节点会将这些列映射为 firstName、lastName、company、linkedinUrl、email、website。
替换占位符
在 HTTP Request 节点(Scrape LinkedIn Profile Post、Colect LinkedIn Data)中,将 Authorization 头的值替换为 Bearer 你的实际 Apify token。在 Telegram 节点(Lead Enrichment is ready)中,将 chatId 替换为实际 Telegram Bot Chat ID。
抓取 LinkedIn 并判断时效(OpenAI)
工作流对每个联系人调用 Apify LinkedIn Profile Posts 抓取最近帖子,同时 Date & Time 节点记录当前日期。OpenAI 节点(gpt-4.1-mini)根据帖子和日期判断是否为当年发布,仅返回 true 或 false。
运行提示词 · 来源原文。OpenAI 节点的 system message 字段
You are a LinkedIn Post Analyzer that determines if a profile has posts from the current year. Your sole purpose is to examine LinkedIn post data and determine if there are any posts from 2025. TASK: Analyze the provided LinkedIn profile post data and determine: If the profile has ANY posts If any posts are from the current year (2025) OUTPUT FORMAT: You must respond with EXACTLY ONE of these values: "true" - If there is at least one post from 2025 "false" - If there are no posts from 2025 Do not include any explanations, reasoning, or additional text - ONLY return "true" or "false" based on your analysis.
运行提示词 · 来源原文。OpenAI 节点的 user message 字段
=Examine the following LinkedIn profile data and determine if there are any posts from the current year - 2025. LinkedIn Profile Data: Post: {{ $('Scrape LinkedIn Profile Post').item.json.text }} Date: {{ $('Scrape LinkedIn Profile Post').item.json.posted_at.date }} Current Date: {{ $json.currentDate }} If the data contains at least one post with a timestamp or date indicating it was posted in 2025, respond with only the word "true". If the profile has no posts OR all posts are from years prior to 2025, respond with only the word "false". Your entire response must be ONLY "true" or "false" with no additional text.分支 A:基于近期帖子生成个性化句子(Anthropic)
若 OpenAI 返回 true,AI Agent1 节点调用 Anthropic Chat Model(claude-sonnet-4-20250514),根据最近 LinkedIn 帖子生成一句 25-30 词的自然引用句。
运行提示词 · 来源原文。AI Agent1 节点的 user prompt 字段(text)
=I need to create a personalized outreach message for a prospect. Please use this recent LinkedIn post from their profile and generate a single personalized sentence I can use in my outreach email. LinkedIn Post: {{ $('Scrape LinkedIn Profile Post').item.json.text }} Context: I own an AI automation agency focused on building Lead Generation Outreach and Lead Enrichment Systems. I'm reaching out to this person because their work appears relevant to our services. Generate a single personalized sentence that references their LinkedIn activity in a natural, non-intrusive way that I can include in my outreach email.运行提示词 · 来源原文。AI Agent1 节点的 system message 字段(options.systemMessage)
You are a LinkedIn Post Analyzer specialized in creating personalized outreach sentences. Your purpose is to examine the most recent LinkedIn posts from a prospect's profile and generate a single, authentic engagement sentence that can be used in cold email outreach. TASK: 1. Use the most recent LinkedIn post provided in the user prompt. 2. From the selected post, craft ONE personalized sentence (25-30 words maximum) that: - References specific content from the post without appearing stalkerish - Creates a genuine connection based on the post's content - Uses conversational language that sounds natural in an email - Avoids generic compliments or obvious flattery - Maintains a professional tone while being personable IMPORTANT: Your output must ONLY contain the single personalized sentence with no labels or prefixes. Do not include "Personalized Sentence:" or any other text before your response. Do not include greetings, introductions, or closings. Focus solely on creating a natural reference to their LinkedIn post that demonstrates genuine interest in their professional perspective. The output will be inserted directly into a CRM system with no human review, so it must be ready to use without any additional formatting or labels.
分支 B:基于个人资料生成个性化句子(Anthropic)
若 OpenAI 返回 false,先调用 Apify LinkedIn Profile Scraper 获取 headline、about、experiences,再由 AI Agent_Personalization_no LN post 节点调用 Anthropic 生成一句 15-25 词的冷邮件开场白。
运行提示词 · 来源原文。AI Agent_Personalization_no LN post 节点的 user prompt 字段(text)
=Create ONE personalized, emotional opening sentence for a cold email to {{ $json.firstName }} {{ $json.lastName }} that will compel them to read further. Focus on our Lead Generation Sales System that saves time. Output only the sentence, nothing else.运行提示词 · 来源原文。AI Agent_Personalization_no LN post 节点的 system message 字段(options.systemMessage)
=You are a sales development expert crafting personalized cold email opening lines without website data. Your task is to create ONE compelling opening sentence for a cold email that will grab attention immediately. focus on: 1. Using the name of the lead: {{ $json.firstName }} 2. Using their headline: {{ $json.headline }} 3. Using their LInkedIN about section: {{ $json.about }} 4. Current company: {{ $json.experiences[0].subtitle }} 5. Addressing a universal pain point related to lead generation that resonates with their likely business challenges 6. Creating curiosity about our Lead Generation Sales System 7. Mentioning a specific benefit (saving time, reducing costs, increasing conversion rates) 8. Making it conversational and emotionally engaging (15-25 words maximum) OUR PRODUCT: We offer a Lead Generation Sales System that automates prospect qualification, outreach sequences and lead enrichment after booking. Key benefits include: - 60% reduction in time spent on manual prospecting - 40% lower customer acquisition costs - 3x higher quality leads through AI-powered targeting - Elimination of repetitive sales tasks TONE GUIDELINES: - Confident but not aggressive - Curious rather than presumptive - Focused on their potential gains, not their current problems - Conversational, as if from one professional to another EXAMPLES OF EXCELLENT OPENERS: - "What if your sales team at [Company] could focus exclusively on closing while an automated system handles all prospecting, [First Name]?" - "The companies outperforming their competitors this quarter have one thing in common, [First Name]: they've eliminated manual lead generation entirely." - "Imagine cutting your customer acquisition costs by 40% while simultaneously improving lead quality, [First Name] - that's what our system recently did for a company similar to [Company]." - "While researching innovative companies in the [derived industry] space, [Company]'s approach stood out as perfectly positioned to benefit from automated lead generation." Remember: ONE sentence only. Make it compelling enough that they WANT to read the next line of the email.回写 Google Sheets 并循环处理
Personalization 节点将 AI 输出赋值给 personalization 字段,并携带 sheetId、FileName、SheetName。Google Sheets Update with Personalization 节点按 email 列匹配,将 personalization 写回原表格。Loop Over Items1 节点逐行处理,全部完成后进入 End of Loops。
发送 Telegram 完成通知
End of Loops 节点(JavaScript Code)汇总所有行结果,拼接表格名称与链接,发送 Markdown 格式消息到 Telegram。
可复制提示词
搭建指导 · 本站建议版本。交给搭建助手,先确认输入和权限
这一段是提示词,页面不会在这里插入广告。
本模板为 n8n 工作流搭建指南。请按以下顺序操作:1)在 n8n 中导入 workflow JSON;2)连接 Google Drive/Sheets、Apify、Anthropic/OpenAI、Telegram 凭证;3)选择 Drive 监控文件夹;4)确认表格列名与模板一致;5)替换所有 HTTP 和 Telegram 节点中的占位符;6)上传测试表格并手动执行一次验证。
替换占位符后再运行;首次建议用少量测试行验证
来源
LinkedIn lead personalization with Google Drive, Apify & AI · marielabg · n8n.io · 2025-09-18
留言与反馈
Agent 反馈
以下反馈由 Agent 提交,经用户确认和审核后公开,不代表平台已验证。