ChatGPT销售找线索AI 评分 · 76/100AI 辅助编辑·未发现明显提示词注入风险n8n.io

预约后自动生成潜在客户调研报告

Cal.com 预约触发 → Google Sheets 查找 LinkedIn → Relevance AI 抓取 + Perplexity 研究 → OpenAI 生成档案与痛点 → HTML 报告 → Gmail 发送

有一点经验步骤流程提示词
给谁
需要为销售会议提前准备客户资料的销售人员、顾问、创始人
你会得到
在客户预约会议后自动收到一封包含其 LinkedIn 档案、公司信息、近期动态、痛点分析与高 ROI 建议的 HTML 邮件报告
你需要
n8n · gmail · google-sheets · perplexity · relevance-ai

硬约束

需要 n8n 实例;配置 Cal.com(或其他预约工具)触发器、Google Sheets OAuth2、Relevance AI HTTP Header Auth、Perplexity API、OpenAI API、Gmail OAuth2。模板含多个 Google Sheets 节点需合并为实际数据库。Filter 节点默认过滤条件需替换为实际邮箱。

他们做了什么

该 n8n 模板展示了一个完整工作流:当有人在 Cal.com 预约会议后,系统自动从 Google Sheets 数据库查找该客户的 LinkedIn URL,通过 Relevance AI 抓取公开档案、帖子、教育和工作经历,同时用 Perplexity 对公司进行深度网络研究。抓取的数据经 Code 节点格式化为 HTML 片段后,由两个 OpenAI 节点分别生成个人与公司档案、痛点分析与高 ROI 建议,最终整合为完整 HTML 报告通过 Gmail 发送。

效果如何

来源描述的预期效果(author_report):预约完成后约 2 分钟,收件箱收到一封格式化的调研报告邮件,包含对方角色、公司、最新帖子、业务描述、Perplexity 提供的近期新闻与背景、预测的痛点及你能提供的帮助,让你有备而谈。

值得知道

1. 提示词硬编码了作者公司名 "Built by Abdul" 和 "Kamexa",必须替换为自身业务描述,否则生成内容会指向错误公司。 2. 模板包含 4 个 Google Sheets 节点指向不同电子表格,实际使用时应合并为你的单一客户数据库。 3. Filter 节点默认过滤 [email protected],需移除或改为实际条件。 4. Relevance AI 端点为特定项目 URL(含 project ID),非通用接口,需自行在 Relevance AI 平台创建对应 studio 并替换端点。 5. 提示词提到 TrustPilot 评论作为输入,但 workflow.json 中未见实际 TrustPilot 节点,该输入在当前模板中不会自动获取。 6. o1-mini 模型可用性和成本需确认;可降级为 gpt-4o 等替代模型。 7. 来源未提供该工作流的实际运行日志或第三方验证,效果描述为作者自述。

n8n 工作流模板

结构已检查 · 未实际运行

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

配置与测试清单

需要绑定的凭证

  • Person + Company Profile 节点:绑定OpenAI API 凭证。
  • Pain Points + Solutions 节点:绑定OpenAI API 凭证。
  • Email Report 节点:绑定Gmail OAuth2 凭证。
  • Cal.com Trigger 节点:绑定calApi 凭证。
  • Perplexity 节点:绑定Perplexity API 凭证。
  • Scrape Profiles + Posts - Relevance AI 节点:绑定HTTP Header Auth 凭证。
  • Google Sheets 节点:绑定Google Sheets OAuth2 凭证。
  • Google Sheets1 节点:绑定Google Sheets OAuth2 凭证。
  • Google Sheets2 节点:绑定Google Sheets OAuth2 凭证。
  • Google Sheets3 节点:绑定Google Sheets OAuth2 凭证。

需要替换的配置

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

测试输入与预期结果

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

模板处理说明

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

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

步骤

  1. 配置触发器与数据库连接

    在 n8n 中导入模板后,连接 Cal.com Trigger(或替换为 Calendly/SavvyCal 等),配置 BOOKING_CREATED 事件监听。设置 Google Sheets 节点,将多个查找节点合并为你的实际客户数据库(含 email 与 LinkedIn URL 字段)。修改 Filter 节点的 rightValue 从 [email protected] 改为实际测试邮箱或移除过滤条件。【首次测试安全】导入模板后保持工作流未启用;首次测试前,临时断开 Email Report 节点的输入连接,或将 sendTo 改为测试邮箱并保持发送未启用,避免真实预约触发后自动发信并消耗 Relevance AI / Perplexity API 额度。

  2. 抓取并格式化 LinkedIn 数据

    配置 Scrape Profiles + Posts - Relevance AI HTTP Request 节点:将 URL 替换为你的 Relevance AI 项目端点(模板使用 https://api-bcbe5a.stack.tryrelevance.com/...),在 HTTP Header Auth 凭证中填入 API key。该节点发送 POST 请求,jsonBody 包含 {"linkedin_url":"{{ $json.profileUrl }}","last_x_days":30}。下游 Posts、Experiences、Education 三个 Code 节点自动将返回数据转为 HTML 片段。 节点请求体: ```json ={"linkedin_url":"{{ $json.profileUrl }}","last_x_days":30} ``` 节点代码(Code): ```js const input = $node["Scrape Profiles + Posts - Relevance AI"].json; // Getting posts from output, then fallback to top-level. const posts = (input.output && input.output.last_30_days_posts_transformed) || input.last_30_days_posts_transformed || []; // Build HTML for each LinkedIn post let postsHTML = ''; if (Array.isArray(posts)) { posts.forEach(post => { postsHTML += `<div class="linkedin-post" style="border:1px solid #ddd; padding:10px; margin-bottom:10px;"> <p>${post.user_post}</p> <p><em>Posted on: ${post.posted}</em></p> </div>`; }); } // Return only the generated HTML return [{ json: { postsHTML } }]; ``` 节点代码(Code): ```js // Get the input data from the first item const input = $node["Scrape Profiles + Posts - Relevance AI"].json; // Navigate to the experiences array within the "output" object const experiences = input.linkedin_profile_details_data?.experiences || []; // Build the HTML table rows string let htmlRows = ''; experiences.forEach(exp => { htmlRows += `<tr> <td>${exp.company}</td> <td>${exp.title}</td> <td>${exp.date_range}</td> <td>${exp.location}</td> </tr>`; }); // Return a new object that only contains the experiencesTable field return [{ json: { experiencesTable: htmlRows } }]; ``` 节点代码(Code): ```js // Get the input data from the first item const input = $node["Scrape Profiles + Posts - Relevance AI"].json; // Navigate to the educations array in the output object const educations = input.linkedin_profile_details_data?.educations || []; // Build the HTML table rows for education let educationRows = ''; educations.forEach(edu => { educationRows += `<tr> <td>${edu.school}</td> <td>${edu.degree}</td> <td>${edu.field_of_study}</td> </tr>`; }); // Return a new object that only contains the educationTable key return [{ json: { educationTable: educationRows } }]; ```

  3. 执行深度网络研究

    配置 Perplexity 节点:选择 sonar-pro 模型,填入 Perplexity API 凭证。system 消息设定研究员角色,user 消息传入从 LinkedIn 提取的公司名称与官网 URL。下游 Citations Code 节点将 Perplexity 返回的 citations 数组转为 HTML 链接列表。 节点代码(Code): ```js // Retrieve the JSON from the previous node const input = items[0].json; // Extract the citations array; default to an empty array if not present const citations = input.citations || []; // Build an HTML unordered list for the citations let citationsHTML = '<ul>'; if (Array.isArray(citations)) { citations.forEach(citation => { citationsHTML += `<li><a href="${citation}" target="_blank">${citation}</a></li>`; }); } citationsHTML += '</ul>'; // Return a new JSON object containing the generated HTML snippet return [{ json: { citationsHTML } }]; ```

    运行提示词 · 来源原文。Perplexity 节点的 messages.message[0].content(system 角色)

    =You are a researcher in a business development team. Your job is to find as much research as you can about the prospect company. You must ensure your research is for the correct company and is highly accurate. Your research must always include what the prospect company does.

    运行提示词 · 来源原文。Perplexity 节点的 messages.message[1].content(user 角色)

    =
    Find as much info as you can about {{ $('Scrape Profiles + Posts - Relevance AI').item.json.linkedin_profile_details_data.company }}. }} This is their website URL: {{ $('Scrape Profiles + Posts - Relevance AI').item.json.linkedin_profile_details_data.company_website }}
  4. 生成个人与公司档案

    配置 Person + Company Profile OpenAI 节点:选择 o1-mini 模型(或替换为可用的 GPT 模型),连接 OpenAI API 凭证。该节点接收 LinkedIn 简介、最近 30 天帖子(经 Posts 节点转换)和 Perplexity 研究结果,生成包含个人档案、兴趣、独特事实、公司档案的 HTML 片段。

    运行提示词 · 来源原文。Person + Company Profile OpenAI 节点的 messages.values[0].content 字段

    =You are part of the business development team at Built by Abdul which is an AI Automation Agency.
    
    When a new leads book a consultation with Built by Abdul, your team researches the leads and provides the research + extracted insights to the consultants so they can read it prior to the consult. 
    
    Your job is to create the following sections from the research:
    
    - Personal Profile: The personal profile is a one paragraph summary of the person (lead) extracted from researching their LinkedIn profile.
    - Interests: In this section you must identify a few of the leads interests from their most recent LinkedIn posts + their LinkedIn profile. 
    - Unique Facts: In this section you must extract at least 2 unique facts about the lead that tells them you've really put time to research who they are. These facts should be things that are unique to the lead and out of the ordinary.
    - Company Profile: The company profile is a one paragraph summary of the company the person represents, extracted from researching their company LinkedIn profile and available information on the web. 
    
    Your output must be in HTML, following this format: 
    
    Person Profile (Heading 2)
    [Details]
    
    Company Profile (Heading 2)
    [Details]
    
    Interests (Heading 2)
    [List of interests in dot point format]
    
    Unique Facts (Heading 2)
    [List of unique facts in dot point format]
    
    
    - Don't wrap the output in ```html``` since the output will go into the middle of another HTML document. Just make sure its in HTML language.
    
    Create this output for the following research: 
    
    LinkedIn Profile About:
    {{ $('Scrape Profiles + Posts - Relevance AI').item.json.linkedin_profile_details_data.about }}
    
    Most Recent LinkedIn Posts: 
    {{ $('Scrape Profiles + Posts - Relevance AI').item.json.last_30_days_posts_transformed.toJsonString() }}
    
    Web Research: 
    {{ $('Perplexity').last().json.choices[0].message.content }}
  5. 生成痛点分析与高 ROI 建议

    配置 Pain Points + Solutions OpenAI 节点:同样使用 o1-mini 模型。该节点接收上一步生成的档案摘要和 Perplexity 公司研究,输出包含痛点证据表与 5 个最高 ROI 自动化机会的 HTML 片段。注意:提示词中的 "Built by Abdul" 和 "Kamexa" 需替换为你的实际公司与服务名称。

    运行提示词 · 来源原文。Pain Points + Solutions OpenAI 节点的 messages.values[0].content 字段

    =You are part of the business development team at Built by Abdul which is an AI Automation agency that provides the following services: 
    
    -AI-powered personalized lead generation systems
    -Automated ClickUp CRMs and project management workflows
    -AI Content agents that repurpose and schedule high-volume content
    -Client onboarding automations (proposals, forms, contracts, etc.)
    -Other AI workflows that save founders dozens of hours per month
    
    Built by Abdul's consultants are the first point of contact for a new lead. So when a new lead is interested in their solutions, they book a free call with their consultants. The consultants are then responsible for exploring the highest ROI opportunities for automation.
    
    Once a call is booked, your team does in depth research on the lead so that the consultants can read through it in preparation for the consultation. 
    
    As part of the business development team you are provided with the following research: 
    
    - LinkedIn Profile: This is the result of scraping the leads LinkedIn profile. This will give you the leads bio, experiences, education and company description.
    - LinkedIn Posts: This gives you the leads LinkedIn posts over the past 30 days. 
    - Company Google Search: This gives you the research found from searching the leads company on Google and their website. 
    - Reviews: This gives you the most recent bad reviews the leads company received on TrustPilot.
    
    
    Your job is to analyse the research and extract following information: 
    
    - Pain Points: By looking through the companies negative reviews and also considering their line of business and the leads position in the company, you must identify the biggest pain points the leads company could be facing. 
    - Solutions to Pain Points: In this section you must come up with solutions Built by Abdul can offer to solve each of the pain points completely. 
    - Highest ROI Opportunities: Considering the info you have about the lead and his company, you must come up with the 5 highest ROI opportunities that Built by Abdul can offer them. These automations have to be realisitic, yet extremely high ROI. Sort them in order of best opportunity at the top of the list.  
    
    The insights you extract must be in HTML format as they will be going in the middle of a HTML document. 
    
    Please use the following output format: 
    
    Opportunities (Heading 1)
    
    Pain Points and Solutions: (Heading 2)
    [Table with 3 columns: 
    1. Pain Point: Explains the pain point theyre facing. 
    2. Evidence: Explains why we think this is the case. 
    3. Solution: Explains the solution to the pain point by Kamexa.
    Each row is a new pain point.]
    
    Opportunities: (Heading 2)
    [5 Highest ROI automation opportunities for the leads company sorted with the best solution at the top. This must be in dotpoint format:
    - Opportunity#1 Name: Details
    - Opportunity#2 Name: Details
    ...
    
    - Don't wrap the output in ```html``` since the output will go into the middle of another HTML document.
    
    Someone just booked a call. Here's the research your team found. Create the output as per the above requirements: 
    
    LinkedIn Profile Scraped Summary in HTML format: 
    {{ $('Person + Company Profile').last().json.message.content }}
    
    Web Research Results for Leads Company: 
    {{ $('Perplexity').last().json.choices[0].message.content }}
  6. 组装 HTML 报告

    Create HTML Report 节点使用 HTML 模板引擎,将前述所有节点的输出(档案、痛点、LinkedIn 详情、教育、经历、帖子、研究、引用)整合为完整 HTML 文档。模板内含 CSS 样式与 n8n 表达式语法,引用各上游节点的 json 输出。需确认所有上游节点名称与模板中的 $node['NodeName'] 引用一致。 邮件 HTML 模板: ```html <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Consultant Research Report</title> <style> body { font-family: Arial, sans-serif; margin: 20px; line-height: 1.6; color: #333; } h1, h2, h3 { color: #222; } .section { margin-bottom: 40px; } .profile-details p { margin: 5px 0; } table { width: 100%; border-collapse: collapse; margin-top: 10px; } th, td { border: 1px solid #ddd; padding: 8px; vertical-align: top; } th { background-color: #f2f2f2; } .card { border: 1px solid #ddd; padding: 10px; margin-bottom: 10px; border-radius: 4px; } a { color: #1a0dab; text-decoration: none; } a:hover { text-decoration: underline; } /* New styles for the header images container */ .header-images { display: flex; margin-bottom: 20px; } .header-images img { width: 50%; height: auto; max-width: 300px; } </style> </head> <body> <!-- Header Images --> <div class="header-images"> <img src="{{ $('Scrape Profiles + Posts - Relevance AI').item.json.linkedin_profile_details_data.profile_image_url }}" alt="Profile Picture"> <img src="{{ $('Scrape Profiles + Posts - Relevance AI').item.json.linkedin_profile_details_data.company_logo_url }}" alt="Company Logo"> </div> <!-- Analysis & Key Facts --> <div class="section" id="analysis"> <h1>Analysis & Key Facts</h1> {{ $('Person + Company Profile').last().json.message.content }} {{ $('Pain Points + Solutions').last().json.message.content }} </div> <!-- Detailed Research Report --> <div class="section" id="research-report"> <h1>Research Report</h1> <!-- LinkedIn Profile Details --> <div id="linkedin-profile" class="profile-details"> <h2>LinkedIn Profile Details</h2> <p><strong>Name:</strong> {{ $('Scrape Profiles + Posts - Relevance AI').item.json.linkedin_profile_details_data.full_name }}</p> <p><strong>Headline:</strong> {{ $('Scrape Profiles + Posts - Relevance AI').item.json.linkedin_profile_details_data.headline }}</p> <p><strong>Location:</strong> {{ $('Scrape Profiles + Posts - Relevance AI').item.json.linkedin_profile_details_data.location }}</p> <p><strong>About:</strong> {{ $('Scrape Profiles + Posts - Relevance AI').item.json.linkedin_profile_details_data.about }}</p> <p><strong>City:</strong> {{ $('Scrape Profiles + Posts - Relevance AI').item.json.linkedin_profile_details_data.city }}</p> <p><strong>Country:</strong> {{ $('Scrape Profiles + Posts - Relevance AI').item.json.linkedin_profile_details_data.country }}</p> <p><strong>Job Title:</strong> {{ $('Scrape Profiles + Posts - Relevance AI').item.json.linkedin_profile_details_data.job_title }}</p> <p><strong>Company:</strong> {{ $('Scrape Profiles + Posts - Relevance AI').item.json.linkedin_profile_details_data.company }}</p> <p><strong>Company Description:</strong> {{ $('Scrape Profiles + Posts - Relevance AI').item.json.linkedin_profile_details_data.company_description }}</p> <p> <strong>Company Website:</strong> <a href="{{ $('Scrape Profiles + Posts - Relevance AI').item.json.linkedin_profile_details_data.company_website }}"> {{ $('Scrape Profiles + Posts - Relevance AI').item.json.linkedin_profile_details_data.company_website }} </a> </p> <p><strong>Industry:</strong> {{ $('Scrape Profiles + Posts - Relevance AI').item.json.linkedin_profile_details_data.company_industry }}</p> <p> <strong>LinkedIn URL:</strong> <a href="{{ $('Scrape Profiles + Posts - Relevance AI').item.json.linkedin_profile_details_data.linkedin_url }}"> {{ $('Scrape Profiles + Posts - Relevance AI').item.json.linkedin_profile_details_data.linkedin_url }} </a> </p> </div> <!-- Education --> <div id="education"> <h2>Education</h2> <table> <thead> <tr> <th>School</th> <th>Degree</th> <th>Field of Study</th> </tr> </thead> <tbody> {{ $node["Education"].json.educationTable }} </tbody> </table> </div> <!-- Experience --> <div id="experience"> <h2>Experience</h2> <table> <thead> <tr> <th>Company</th> <th>Title</th> <th>Date Range</th> <th>Location</th> </tr> </thead> <tbody> {{ $node["Experiences"].json.experiencesTable }} </tbody> </table> </div> <!-- Recent LinkedIn Posts --> <div id="linkedin-posts"> <h2>Recent LinkedIn Posts</h2> {{ $node["Posts"].json.postsHTML }} </div> <!-- Google Research Analysis --> <div id="google-research"> <h2>Google Research Analysis</h2> <p>{{ $node["Perplexity"].json.choices[0].message.content.removeMarkdown().removeMarkdown() }}</p> </div> <!-- Citations --> <div id="citations"> <h2>Citations</h2> {{ $node["Citations"].json.citationsHTML }} </div> </div> </body> </html> ```

  7. 发送邮件报告

    配置 Email Report Gmail 节点:连接 Gmail OAuth2 凭证,将 sendTo 从 [email protected] 改为你的接收邮箱。subject 使用 n8n 表达式动态填入客户姓名,message 引用上游 HTML 节点的输出。建议先手动测试一次再启用自动发送。【首次测试安全】首次测试前,将 Email Report 节点的 sendTo 改为测试邮箱,或临时断开 Email Report 与 Create HTML Report 的连接,或加条件仅对测试邮箱发送。

可复制提示词

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

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

导入模板后,优先替换所有凭证、修改 Filter 邮箱、将多个 Google Sheets 合并为你的数据库、把提示词中的 Built by Abdul/Kamexa 替换为你的公司名

来源

Lead research report emails · abdulmir · n8n.io · 2025-07-27

留言与反馈

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

正在加载…

    相关用例