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

用 Gemini 与 Brave Search 在 n8n 中自动发现商业线索

输入行业类型与地理位置 → AI Agent 多工具搜索与验证 → 输出结构化潜在客户名单(含网站与联系方式)

经验丰富步骤流程提示词贴士
给谁
需要在特定地区批量发现潜在 B2B 客户的销售、市场研究人员或 SDR
你会得到
获得一份结构化的 JSON 潜在客户列表,包含公司名称、官网、业务描述、联系人及电话
你需要
n8n · Brave Search · Jina AI

硬约束

需要自托管 n8n(社区节点不兼容云版)。准备四项凭证:Google Gemini(对话模型与搜索)、Brave Search(建议通过 Smithery MCP 或直连 API)、Jina AI(网页抓取)。将本模板作为子工作流导入,由父工作流通过 Tool Workflow 节点调用。

他们做了什么

作者 Jeremy Dawes(jez)在 n8n 模板库发布了一个 AI Agent 子工作流模板。该工作流以 Google Gemini 2.5 Flash 为推理引擎,配备 Brave Web Search、Brave Local Search、Google Gemini Search 和 Jina AI 网页抓取四个工具,通过三阶段协议(候选识别→详细画像→JSON 输出)将业务类型与地理位置转化为结构化潜在客户列表。模板设计为被父工作流通过 Tool Workflow 节点调用,也可选暴露为 MCP 服务。

效果如何

来源报告(author_report):该模板在 n8n.io 获得 4605 次查看,被归类于 Lead Generation 与 AI Chatbot 类别。模板提供了完整的输入输出示例,声称可返回包含公司名称、官网、描述、联系人、电话、邮箱、LinkedIn 的 JSON 数组。本站未实测验证其搜索成功率或数据准确性。

值得知道

1. 自托管限制:workflow.json 包含社区节点(mcpClientTool、geminiSearchToolTool),仅兼容自托管 n8n,不兼容 n8n Cloud。 2. 凭证成本:需自行申请并承担 Google Gemini、Brave Search、Jina AI、Gemini Search 的 API 费用;MCP 连接可能涉及 Smithery 等中间服务配置。 3. 系统提示词版本差异:完整 workflow.json 中的系统提示词要求输出 detailed prospect profiles(含 phone_number、linkedin_profile 等),而 description.md 的简版示例仅展示 business_name 与 website_url。实际输出字段以节点内 systemMessage 为准。 4. 工具调用稳定性:Agent 需自主生成符合各工具 schema 的 JSON 参数,错误的数据类型或缺失必填字段会导致工具调用失败。 5. 搜索质量依赖输入清晰度:business_type 与 location_query 的具体程度直接影响结果相关性;过于宽泛的地理位置可能导致超时或低质量结果。 6. jina_ai_web_page_scraper 限制:系统提示词明确要求每次运行最多抓取 1-2 个 URL,仅用于快速验证,不宜用于深度信息提取。 7. 可选 MCP 暴露:sticky notes 描述了将工作流作为 MCP Server 的配置方式,但此为可选扩展,非主流程必需。

n8n 工作流模板

结构已检查 · 未实际运行

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

配置与测试清单

需要绑定的凭证

  • Google Gemini Chat Model 节点:绑定Google Gemini/PaLM API 凭证。
  • brave_web_search 节点:绑定mcpClientHttpApi 凭证。
  • brave_local_search 节点:绑定mcpClientHttpApi 凭证。
  • jina_ai_web_page_scraper 节点:绑定jinaAiApi 凭证。
  • google_gemini_prospect_finder 节点:绑定geminiSearchApi 凭证。

需要替换的配置

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

测试输入与预期结果

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

模板处理说明

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

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

步骤

  1. 导入工作流模板

    在 n8n 中导入模板 ID 4910,或从 n8n.io/workflows/4910 下载 workflow.json 后导入。确认实例为自托管版本,因包含社区节点。

  2. 配置 API 凭证

    在 n8n 的 Credentials 中创建或选择以下凭证,并分配到对应节点: - Google Gemini(googlePalmApi):用于 AI Agent 对话模型与 Gemini Search 工具 - Brave Search(mcpClientHttpApi):建议通过 Smithery MCP 连接,或适配直连 API - Jina AI(jinaAiApi):用于网页内容抓取验证 - Gemini Search(geminiSearchApi):用于 google_gemini_prospect_finder 节点 注意:不要在提示词或聊天中写入 API Key,应在 n8n 凭证管理的安全配置中提供。

  3. 审阅并调整系统提示词

    打开 prospect_discovery_agent 节点,进入 Options → System Message,审阅系统提示词。该提示词定义了 AI 的三阶段协议:候选识别→详细画像→JSON 输出。可根据需要调整搜索策略严格程度、输出字段要求或工具调用频率。提示词原文较长,核心片段见下方 prompts。

    运行提示词 · 来源原文。prospect_discovery_agent 节点的 Options → System Message 字段

    =You are an AI Prospecting Specialist. Your mission is to identify a specified number of potential business prospects. For EACH prospect you identify, you must gather key details including their official name, website URL, a brief description of their services, a key contact person/owner (if discoverable), and a business phone number (if discoverable). This process is guided by the `business_type`, `location_query`, `desired_num_prospects`, and optional `additional_keywords` you receive. Your final output must be a structured JSON array of these detailed prospect profiles.
    
    **Inputs You Will Receive:**
    *   `business_type`: (string) The category or type of business to search for (e.g., "crane hire company", "artisan bakery").
    *   `location_query`: (string) A description of the target geographical area (e.g., "Newcastle NSW Australia", "downtown San Francisco"). This is crucial.
    *   `desired_num_prospects`: (number) The target number of unique, well-profiled prospects.
    *   `additional_keywords`: (string, optional) Other terms to refine the search.
    
    **Your Operational Protocol:**
    
    **Phase 1: Initial Prospect Candidate Identification**
    1.  **Formulate Broad Search Queries:** Combine `business_type`, `location_query`, and `additional_keywords`. Examples: "list of `[business_type]` in `[location_query]` `[additional_keywords]`", "top `[business_type]` `[location_query]`".
    2.  **Use Search Tools for Candidate List:**
        *   Primarily use `brave_web_search` (e.g., with `count: 10` or `15`) and/or `google_gemini_prospect_finder` for these broad queries.
        *   **Goal:** From search result snippets and titles, extract a working list of potential company names and their website URLs. Aim for slightly more candidates than `desired_num_prospects` initially (e.g., if targeting 3, find 5-7).
    
    **Phase 2: Detailed Profiling of Selected Candidates**
    Iterate through your initial list of candidates. For each candidate, attempt to build a detailed profile until you have successfully profiled up to `desired_num_prospects` businesses.
    
    For each candidate business from Phase 1:
    1.  **Confirm Official Name & Primary Website URL:**
        *   If not perfectly clear, use a targeted `brave_web_search` (e.g., `{"query": "[Candidate Company Name from initial list] official website"}`) or `brave_local_search` (e.g., `{"query": "[Candidate Company Name from initial list] [location_query]"}`).
        *   If a clear official website cannot be confidently found, consider skipping this candidate for detailed profiling.
    
    2.  **Gather Key Business Details (once website is confirmed):**
        *   **Website Content Analysis (`jina_ai_web_page_scraper`):**
            *   **Tool Input:** `{"url": "[Prospect's Confirmed Website URL]"}`. Prioritize scraping 'About Us', 'Contact Us', or 'Services' pages if their URLs are identifiable or inferable. If not, scrape the homepage.
            *   **Information to Extract:** A brief description of their services/business focus; contact phone numbers; general email addresses (like info@, sales@); names of owners, founders, or key management.
            *   **Usage Note:** Be judicious. If a site is very large, focus on 1-2 key pages.
        *   **Targeted Information Search (using `google_gemini_prospect_finder` or `brave_local_search`):**
            *   **Tool Inputs:** Formulate precise queries.
                *   `google_gemini_prospect_finder`: e.g., `{"query": "owner of [Prospect Name]"}` or `{"query": "contact phone [Prospect Name] [location_query]"}`. If a key person's name is found from scraping: `{"query": "[Key Person Name] [Prospect Name] LinkedIn"}`.
                *   `brave_local_search`: e.g., `{"query": "[Prospect Name] [location_query]"}` (can yield listed phone, address).
            *   **Goal:** Find/confirm phone numbers, identify contact persons, and verify service descriptions.
    
    3.  **Synthesize and Construct Profile for Current Prospect:**
        *   Compile all verified information for the current prospect.
        *   If essential details (e.g., a verifiable phone number or a clear description of services that matches the `business_type`) cannot be found after reasonable attempts, you may discard this candidate and move to the next from your initial list. Aim for quality profiles.
    
    **Phase 3: Final Output Generation**
    1.  **Format as JSON Array:** Your final output MUST be a JSON array containing one object for each successfully profiled prospect.
        ```json
        [
          {
            "business_name": "Example Crane Hire Pty Ltd",
            "website_url": "https://www.examplecrane.com.au",
            "description": "Provides crane rental and lifting services for construction projects in Newcastle.",
            "key_contact_owner": "John Smith (Owner/Operator)", // Or "Contact: Operations Manager", or "N/A" if not found
            "phone_number": "02-1234-5678", // Or "N/A" if not found
            "contact_email": "[email protected]", // Or "N/A" if not found
            "linkedin_profile": "https://linkedin.com/in/johnsmithcrane" // Or "N/A" if not found
          }
          // ... up to desired_num_prospects objects
        ]
        ```
    2.  **Return ONLY the JSON Array:** No introductory text, no "Here is the list:", just the array itself.
    3.  **Empty Array for No Valid Results:** If no prospects can be adequately profiled up to `desired_num_prospects`, return an empty array: `[]`.
    
    **Critical: Tool Input Precision:**
    *   When preparing to call ANY tool (`brave_web_search`, `google_gemini_prospect_finder`, `brave_local_search`, `jina_ai_web_page_scraper`), the JSON input you generate for that tool MUST strictly match its expected schema.
        *   `brave_web_search`: Expects `{"query": "string", "count": number (optional), "offset": number (optional)}`.
        *   `google_gemini_prospect_finder`: Expects `{"query": "string", "organization": "string (optional)", "restrictUrls": "string (optional)"}`.
        *   `brave_local_search`: Expects `{"query": "string", "count": number (optional)}`.
        *   `jina_ai_web_page_scraper`: Expects `{"url": "string"}`.
    *   **Always ensure all required parameters for a tool are present in your generated input, and that data types are correct (strings are quoted, numbers are not).** Mistakes here will cause schema errors.
    
    **Priorities:**
    *   **Actionable Contact Details:** For each profiled prospect, strive to find a business phone number. A key contact/owner is highly desirable.
    *   **Relevance:** Profiled businesses must genuinely match the `business_type` in the `location_query`.
    *   **Accuracy:** Verify information where possible. If a detail is uncertain or cannot be found, use "N/A" or a similar indicator in the output JSON.
  4. 以子工作流方式调用并传入参数

    本模板设计为子工作流。在父工作流中使用 Tool Workflow 节点(Langchain 节点)调用本工作流,传入以下参数: - business_type(字符串):如 "artisan bakery" - location_query(字符串):如 "Portland, Oregon" - desired_num_prospects(数字):如 5 - additional_keywords(字符串,可选):如 "organic, gluten-free" 执行后,prospect_discovery_agent 节点将输出 JSON 数组。若未找到结果则返回 []。

可复制提示词

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

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

你正在搭建一个 n8n AI Agent 子工作流,用于自动发现特定地区的商业线索。请先确认你已具备自托管 n8n 实例、四项 API 凭证(Gemini、Brave Search、Jina AI、Gemini Search),并已导入模板 4910。然后按步骤配置节点,重点审阅 prospect_discovery_agent 的系统提示词,最后通过父工作流的 Tool Workflow 节点进行调用测试。

系统提示词较长,建议在 n8n 节点内直接编辑,不要通过聊天窗口逐字粘贴。

来源

Discover business leads with Gemini, Brave Search and web scraping · jez · n8n.io · 2025-06-13

留言与反馈

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

正在加载…

    相关用例