一般的外展活动被忽视。预订 2026 年会议的 SDR 会发送个性化备注,其中引用了潜在客户最近在 LinkedIn 上发布的帖子、公司的最新新闻或他们空间中的 Reddit 帖子。本教程将逐步介绍如何构建一个 SDR 研究代理,该代理可以自动为每个潜在客户提取所有三个信号。
前置条件
- Python 3.8+
- Scavio API 密钥
- Apollo 或 HubSpot 潜在客户列表
- 用于个性化草案的 OpenAI 或 Claude API
操作指南
步骤 1: 加载潜在客户
从潜在客户的姓名和公司开始。
Python
prospect = {'name': 'Jane Doe', 'company': 'Acme Corp', 'title': 'Head of Growth'}步骤 2: 获取最近的 LinkedIn 帖子
使用 Google SERP 查找潜在客户最近发布的 LinkedIn 帖子。
Python
import requests, os
API_KEY = os.environ['SCAVIO_API_KEY']
def linkedin_posts(name):
r = requests.post('https://api.scavio.dev/api/v1/search',
headers={'x-api-key': API_KEY},
json={'query': f'site:linkedin.com/posts "{name}"', 'num_results': 5})
return r.json().get('organic_results', [])步骤 3: 获取最近的公司新闻
Google 新闻了解该公司的最新提及。
Python
def company_news(company):
r = requests.post('https://api.scavio.dev/api/v1/search',
headers={'x-api-key': API_KEY},
json={'query': f'"{company}"', 'tbm': 'nws'})
return r.json().get('news_results', [])[:3]步骤 4: 获取潜在客户空间中的 Reddit 讨论
拉取与潜在客户角色相关的最新 Reddit 主题。
Python
def reddit_signals(title, company):
r = requests.post('https://api.scavio.dev/api/v1/search',
headers={'x-api-key': API_KEY},
json={'platform': 'reddit', 'query': f'{title} {company}', 'time': 'month'})
return r.json().get('posts', [])[:3]步骤 5: 草拟个性化电子邮件
将所有信号输入 Claude 或 GPT 以起草个性化冷电子邮件。
Python
import anthropic
client = anthropic.Anthropic()
def draft_email(prospect, posts, news, reddit):
context = f'LinkedIn: {posts}\nNews: {news}\nReddit: {reddit}'
resp = client.messages.create(
model='claude-sonnet-4-6',
max_tokens=500,
messages=[{'role': 'user', 'content': f'Write a 3-sentence cold email to {prospect["name"]} at {prospect["company"]}. Context: {context}'}]
)
return resp.content[0].textPython 示例
Python
import os, requests
import anthropic
API_KEY = os.environ['SCAVIO_API_KEY']
claude = anthropic.Anthropic()
def research(prospect):
posts = requests.post('https://api.scavio.dev/api/v1/search', headers={'x-api-key': API_KEY},
json={'query': f'site:linkedin.com/posts "{prospect["name"]}"'}).json().get('organic_results', [])[:3]
news = requests.post('https://api.scavio.dev/api/v1/search', headers={'x-api-key': API_KEY},
json={'query': f'"{prospect["company"]}"', 'tbm': 'nws'}).json().get('news_results', [])[:3]
reddit = requests.post('https://api.scavio.dev/api/v1/search', headers={'x-api-key': API_KEY},
json={'platform': 'reddit', 'query': prospect['title'], 'time': 'month'}).json().get('posts', [])[:3]
return {'posts': posts, 'news': news, 'reddit': reddit}
prospect = {'name': 'Jane Doe', 'company': 'Acme Corp', 'title': 'Head of Growth'}
signals = research(prospect)
print(signals)JavaScript 示例
JavaScript
const API_KEY = process.env.SCAVIO_API_KEY;
async function scavio(body) {
const r = await fetch('https://api.scavio.dev/api/v1/search', {
method: 'POST',
headers: { 'x-api-key': API_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify(body)
});
return r.json();
}
const prospect = { name: 'Jane Doe', company: 'Acme Corp', title: 'Head of Growth' };
const [posts, news, reddit] = await Promise.all([
scavio({ query: `site:linkedin.com/posts "${prospect.name}"` }),
scavio({ query: `"${prospect.company}"`, tbm: 'nws' }),
scavio({ platform: 'reddit', query: prospect.title, time: 'month' })
]);
console.log({ posts: posts.organic_results?.slice(0, 3), news: news.news_results?.slice(0, 3), reddit: reddit.posts?.slice(0, 3) });预期输出
JSON
For each prospect, the agent returns 3 LinkedIn posts, 3 company news items, and 3 Reddit threads in the prospect's space. Claude then drafts a 3-sentence cold email that references the most specific signal (e.g. 'Saw your post about Q4 pipeline hitting plan...').