利用运行时上下文和外部数据生成动态邮件序列
中级
这是一个Lead Nurturing, Multimodal AI领域的自动化工作流,包含 11 个节点。主要使用 Webhook, Octave, HttpRequest, Agent, LmChatAnthropic 等节点。 使用Octave、LLM和外部数据生成个性化邮件序列
前置要求
- •HTTP Webhook 端点(n8n 会自动生成)
- •可能需要目标 API 的认证凭证
- •Anthropic API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"name": "利用运行时上下文和外部数据生成动态邮件序列",
"tags": [],
"nodes": [
{
"id": "sticky-note-main",
"name": "便利贴 - 主要概览",
"type": "n8n-nodes-base.stickyNote",
"position": [
450,
-700
],
"parameters": {
"color": 1,
"width": 450,
"height": 500,
"content": "🎯 具备运行时上下文的动态邮件序列"
},
"typeVersion": 1
},
{
"id": "sticky-note-webhook",
"name": "便利贴 - Webhook设置",
"type": "n8n-nodes-base.stickyNote",
"position": [
40,
-150
],
"parameters": {
"color": 2,
"width": 190,
"height": 100,
"content": "🚀 由此开始"
},
"typeVersion": 1
},
{
"id": "sticky-note-research",
"name": "便利贴 - 上下文研究",
"type": "n8n-nodes-base.stickyNote",
"position": [
240,
-150
],
"parameters": {
"color": 4,
"width": 190,
"height": 100,
"content": "🔍 上下文研究"
},
"typeVersion": 1
},
{
"id": "sticky-note-llm",
"name": "便利贴 - LLM处理",
"type": "n8n-nodes-base.stickyNote",
"position": [
140,
-300
],
"parameters": {
"color": 5,
"width": 190,
"height": 100,
"content": "🧠 LLM处理"
},
"typeVersion": 1
},
{
"id": "sticky-note-octave",
"name": "便利贴 - Octave运行时",
"type": "n8n-nodes-base.stickyNote",
"position": [
740,
-150
],
"parameters": {
"color": 3,
"width": 190,
"height": 100,
"content": "⚡ 运行时上下文"
},
"typeVersion": 1
},
{
"id": "sticky-note-email",
"name": "便利贴 - 邮件平台",
"type": "n8n-nodes-base.stickyNote",
"position": [
1040,
-150
],
"parameters": {
"color": 6,
"width": 190,
"height": 100,
"content": "📧 邮件平台"
},
"typeVersion": 1
},
{
"id": "07920827-9d73-4099-8b6f-d599be97b929",
"name": "潜在客户数据Webhook",
"type": "n8n-nodes-base.webhook",
"position": [
120,
0
],
"webhookId": "your-webhook-id-here",
"parameters": {
"path": "your-webhook-path-here",
"options": {}
},
"typeVersion": 2
},
{
"id": "4dc666e8-89dd-4647-8aeb-3880fd4aa59e",
"name": "研究公司上下文",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
320,
0
],
"parameters": {
"text": "=Output the name of an open role that {{ $json.body.companyDomain }} is hiring for. If you can't find a role they are hiring for, make up a basic one that would make sense for them to hire for. Normalize the job title to something that would be used in an internal email (i.e \"software engineer\" instead of \"Sr. Software Engineer II\"). Output just the name of the role and nothing else, with no pretext or posttext. Do NOT make any justification if you can't find a role, just give a dummy role and nothing else. No \"I wasn't able to find...\" BS.",
"options": {},
"promptType": "define"
},
"typeVersion": 2.1
},
{
"id": "45c0b9e7-a035-4469-8a61-7e919502e715",
"name": "LLM模型",
"type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
"position": [
220,
200
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "your-llm-model",
"cachedResultName": "Your LLM Model"
},
"options": {}
},
"credentials": {
"anthropicApi": {
"name": "Your LLM API Credentials"
}
},
"typeVersion": 1.3
},
{
"id": "5a08a3b4-4a19-4112-b97c-b100db4eefd8",
"name": "使用运行时上下文生成序列",
"type": "n8n-nodes-octavehq.octave",
"position": [
820,
0
],
"parameters": {
"agentOId": "your-octave-sequence-agent-id",
"jobTitle": "={{ $('Lead Data Webhook').item.json.body.jobTitle }}",
"firstName": "={{ $('Lead Data Webhook').item.json.body.firstName }}",
"operation": "runSequence",
"companyName": "={{ $('Lead Data Webhook').item.json.body.companyName }}",
"companyDomain": "={{ $('Lead Data Webhook').item.json.body.companyDomain }}",
"linkedInProfile": "={{ $('Lead Data Webhook').item.json.body.profileURL }}",
"runtimeContextStep1": "=they are hiring a {{ $json.output }}",
"runtimeInstructionsStep1": "mention the role they're hiring for and that's why you reached out"
},
"credentials": {
"octaveApi": {
"name": "Octave API Credentials"
}
},
"typeVersion": 1
},
{
"id": "4ae4986a-547e-4d67-9d68-0774c1dc9ab7",
"name": "将潜在客户添加至邮件营销活动",
"type": "n8n-nodes-base.httpRequest",
"position": [
1120,
0
],
"parameters": {
"url": "https://api.instantly.ai/api/v2/leads",
"method": "POST",
"options": {},
"sendBody": true,
"sendHeaders": true,
"authentication": "genericCredentialType",
"bodyParameters": {
"parameters": [
{
"name": "campaign",
"value": "your-campaign-id-here"
},
{
"name": "email",
"value": "={{ $('Lead Data Webhook').item.json.body.email }}"
},
{
"name": "first_name",
"value": "={{ $('Lead Data Webhook').item.json.body.firstName }}"
},
{
"name": "last_name",
"value": "={{ $('Lead Data Webhook').item.json.body.lastName }}"
},
{
"name": "company_name",
"value": "={{ $('Lead Data Webhook').item.json.body.companyName }}"
},
{
"name": "custom_variables",
"value": "={{ { \"email1\": $json.emails[0].email || \"\", \"subject1\": $json.emails[0].subject || \"\", \"email2\": $json.emails[1].email || \"\", \"subject2\": $json.emails[1].subject || \"\", \"email3\": $json.emails[2].email || \"\", \"subject3\": $json.emails[2].subject || \"\" } }}"
}
]
},
"genericAuthType": "httpBearerAuth",
"headerParameters": {
"parameters": [
{
"name": "Content-Type",
"value": "application/json"
}
]
}
},
"credentials": {
"httpBearerAuth": {
"name": "Email Platform API Key"
}
},
"typeVersion": 4.2
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"connections": {
"LLM Model": {
"ai_languageModel": [
[
{
"node": "Research Company Context",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Lead Data Webhook": {
"main": [
[
{
"node": "Research Company Context",
"type": "main",
"index": 0
}
]
]
},
"Research Company Context": {
"main": [
[
{
"node": "Generate Sequence with Runtime Context",
"type": "main",
"index": 0
}
]
]
},
"Generate Sequence with Runtime Context": {
"main": [
[
{
"node": "Add Lead to Email Campaign",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
中级 - 客户培育, 多模态 AI
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
基于账户的完整触达自动化,搭载Octave上下文引擎
使用Octave、AI和Instantly.ai自动化从ABM研究到触达的流程
Filter
Webhook
Split Out
+5
19 节点Nalin
客户培育
AI驱动的食品订单处理系统,集成Facebook Messenger、Google表格和日历
AI驱动的食品订单处理系统,集成Facebook Messenger、Google表格和日历
If
Code
Webhook
+8
26 节点Hans Wilhelm Radam
客户培育
重新排名 #1
通过网页爬取、GPT-4o和WhatsApp自动化电话营销
Set
Code
Webhook
+18
48 节点Khaisa Studio
客户培育
智能活动跟进与社交助手
使用 GPT-4、LinkedIn 和 HubSpot 多渠道触达实现活动跟进自动化
Code
Filter
Hubspot
+8
25 节点Oneclick AI Squad
客户培育
09 - 潜在客户档案增强器
自动化潜在客户信息丰富与个性化外联:HubSpot、Phantombuster和GPT
If
Set
Code
+11
30 节点Avkash Kakdiya
客户培育
通过AI潜在客户生成的智能房地产电子邮件和电话营销
使用Llama AI、VAPI呼叫和Gmail营销活动自动化房地产营销
Code
Wait
Gmail
+8
23 节点Oneclick AI Squad
客户培育