n8n + Watch digest 公众号 cron
公众号 KOL 必看:cron 跑赛道 digest,自动生成日报草稿。
Step 1 - n8n 准备
- n8n self-hosted 或 cloud
- Credentials → Add → "HTTP Header Auth" → Name
AuthorizationValueBearer rp-...
Step 2 - Workflow 拓扑
Schedule (cron 7:00) →
HTTP Request (GET /v1/watch/{id}/digest) →
Set (extract executive_summary + top deals) →
HTTP Request (POST /v1/extract/research for top URL) →
Function (format as 公众号 markdown) →
Sticky Note: Manual review →
HTTP Request (公众号草稿 API)Step 3 - 创建 watchlist
curl -X POST https://rp.zgen.xin/v1/watch/create \
-H "Authorization: Bearer rp-..." \
-H "Content-Type: application/json" \
-d '{
"name": "AI 赛道日报",
"industries": ["人工智能"],
"company_ids": [],
"investor_ids": [],
"cron": "0 7 * * *"
}'
# → { "id": "watch_xyz123", ... }Step 4 - n8n HTTP node 取 digest
URL: https://rp.zgen.xin/v1/watch/{{$node.Schedule.json.watch_id}}/digest
Method: GET
Auth: 用 Step 1 的 credential
Step 5 - 公众号草稿格式化
// n8n Function node:
const digest = $input.first().json;
const md = `
# AI 赛道日报 ${new Date().toISOString().slice(0,10)}
## 昨日动态
${digest.summary}
## 重点 deal
${(digest.items || []).slice(0,5).map(d => `- ${d.company_name} ${d.round}`).join('\n')}
🔗 数据来源:投研派 ResearchPipe
`;
return [{ json: { content: md } }];成本估算
每次 digest = 10 credits ≈ ¥0.05。每天 1 次 × 30 天 = ¥1.5/月。