使用OpenAI、Firecrawl和gotoHuman的线索分析与个性化邮件生成
高级
这是一个Miscellaneous, Multimodal AI领域的自动化工作流,包含 22 个节点。主要使用 If, Code, Gmail, GoogleDocsTool, Agent 等节点。 使用OpenAI、Firecrawl和gotoHuman的线索分析与个性化邮件生成
前置要求
- •Google 账号和 Gmail API 凭证
- •可能需要目标 API 的认证凭证
- •OpenAI API Key
使用的节点 (22)
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"meta": {
"instanceId": "8267d3569bda2c6f198d17726ec68a346675a4cca67a114822601a01c8893f9b"
},
"nodes": [
{
"id": "765f12b4-f9cd-4824-a0e2-6236b730fa49",
"name": "Typeform 触发器",
"type": "n8n-nodes-base.typeformTrigger",
"position": [
-1024,
-448
],
"webhookId": "540469cf-baae-48c0-af23-aaca1b30ee66",
"parameters": {
"formId": "tcNgdBxH"
},
"credentials": {},
"typeVersion": 1.1
},
{
"id": "718dcac5-5244-4b89-829a-fe155a40922c",
"name": "提取域名",
"type": "n8n-nodes-base.code",
"position": [
-816,
-448
],
"parameters": {
"mode": "runOnceForEachItem",
"jsCode": "// Extract domain from email and convert to website URL\nconst email = $input.item.json['Work Email']; // Adjust this path based on your input data structure\n\n// Extract domain from email (part after @)\nconst domain = email.split('@')[1];\n\n// Convert to website URL (assuming https)\nconst websiteUrl = `https://${domain}`;\n\n$input.item.json.domain = domain\n$input.item.json.websiteUrl = websiteUrl\n\n// Return the result\nreturn $input.item;"
},
"typeVersion": 2
},
{
"id": "2a4a1c0f-82cd-4855-a781-191e3d66efa5",
"name": "标记个人邮箱地址",
"type": "n8n-nodes-base.code",
"position": [
-608,
-448
],
"parameters": {
"mode": "runOnceForEachItem",
"jsCode": "// Flag items based on common email providers\nconst commonProviders = [\n 'gmail', 'yahoo', 'ymail', 'rocketmail',\n 'outlook', 'hotmail', 'live', 'msn',\n 'icloud', 'me', 'mac', 'aol',\n 'zoho', 'protonmail', 'mail', 'gmx'\n];\n\n// Get the domain from the input\nconst domain = $input.item.json.domain;\n\n// Extract the main domain part (remove .com, .net, etc.)\nconst domainParts = domain.split('.');\nconst mainDomain = domainParts[0].toLowerCase();\n\n// Check if it's a common provider\nconst isCommonProvider = commonProviders.includes(mainDomain);\n\n$input.item.json.isPersonalEmail = isCommonProvider;\n\nreturn $input.item;"
},
"typeVersion": 2
},
{
"id": "9383f89d-befe-4a0e-b645-85bc97d4c6a3",
"name": "是个人邮箱吗?",
"type": "n8n-nodes-base.if",
"position": [
-400,
-448
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "d7f56829-f0e9-4271-b981-0800d8faad1e",
"operator": {
"type": "boolean",
"operation": "true",
"singleValue": true
},
"leftValue": "={{ $json.isPersonalEmail }}",
"rightValue": ""
}
]
}
},
"typeVersion": 2.2
},
{
"id": "a5a9eea3-a479-4783-b663-b0ae2ed4363f",
"name": "抓取网站",
"type": "@mendable/n8n-nodes-firecrawl.firecrawl",
"position": [
-992,
-32
],
"parameters": {
"url": "={{ $json.websiteUrl }}",
"operation": "scrape",
"requestOptions": {}
},
"credentials": {},
"typeVersion": 1
},
{
"id": "90494bf7-7ca2-476c-a403-dcc21a9d9da6",
"name": "AI销售代理",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
-816,
432
],
"parameters": {
"text": "=We have a new inbound lead as someone left their email address on our landing page. We already scraped their website, find it below, and I now need you to analyze this prospect and help me write an initial outreach email.\n\nFetch our own company description as well as our ICP description with the given tools to make a proper lead assessment, reason about why they might be interested in our offering, what would be a good unique angle/hook to reach out, and write an accurate personalized outreach email.\nUse Github-flavored-markdown for interest, ICP and personalization reasoning.\nThe email draft needs to be in plain text though!\nAlso fetch previous positive examples to use as a reference of what is a good analysis and email draft.\n\n<Lead Info>\nEmail: {{ $('Is Personal Email?').item.json['Work Email'] }}\nCompany: {{ $('Is Personal Email?').item.json.Company }}\nWebsite: {{ $('Is Personal Email?').item.json.websiteUrl }}\n</Lead Info>\n\n<Website Summary>\n{{ $json.message.content }}\n</Website Summary>\n\nToday is {{ $today }}.",
"options": {},
"promptType": "define",
"hasOutputParser": true
},
"typeVersion": 2.2
},
{
"id": "246927ff-c4bf-4262-bde5-633c5ac58094",
"name": "OpenAI 聊天模型",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
-992,
656
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4.1-mini"
},
"options": {}
},
"credentials": {},
"typeVersion": 1.2
},
{
"id": "c165c375-74ec-4537-a525-97e9d78ae00d",
"name": "结构化输出解析器",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
-432,
656
],
"parameters": {
"schemaType": "manual",
"inputSchema": "{\n\t\"type\": \"object\",\n \"required\": [\n \"industry\",\n \"reasoningForInterestInOurProduct_markdown\",\n \"reasoningIfIdealCustomerProfile_markdown\",\n \"personalizationHook_markdown\",\n \"companyBudgetAssessment\",\n \"priorityRating\",\n \"emailDraftSubject\",\n \"emailDraftBodyPlainText\"\n ],\n\t\"properties\": {\n \"industry\": {\n\t\t\t\"type\": \"string\"\n\t\t},\n \"reasoningForInterestInOurProduct_markdown\": {\n\t\t\t\"type\": \"string\"\n\t\t},\n \"reasoningIfIdealCustomerProfile_markdown\": {\n\t\t\t\"type\": \"string\"\n\t\t},\n\t\t\"reasoningPersonalizationHook_markdown\": {\n\t\t\t\"type\": \"string\"\n\t\t},\n\t\t\"companyBudgetAssessment\": {\n\t\t\t\"enum\": [\"high\", \"medium\", \"low\"]\n\t\t},\n\t\t\"priorityRating\": {\n\t\t\t\"type\": \"integer\",\n \"minimum\": 0,\n \"maximum\": 10\n\t\t},\n\t\t\"emailDraftSubject\": {\n\t\t\t\"type\": \"string\"\n\t\t},\n\t\t\"emailDraftBodyPlainText\": {\n\t\t\t\"type\": \"string\"\n\t\t}\n\t}\n}"
},
"typeVersion": 1.3
},
{
"id": "e57e25f5-3a90-45c0-8dc9-6e1a31f8537c",
"name": "获取我们的公司简介",
"type": "n8n-nodes-base.googleDocsTool",
"position": [
-848,
656
],
"parameters": {
"operation": "get",
"documentURL": ""
},
"credentials": {},
"typeVersion": 2
},
{
"id": "952dec83-6929-452c-b6ef-2c623b776a88",
"name": "获取我们的ICP描述",
"type": "n8n-nodes-base.googleDocsTool",
"position": [
-720,
656
],
"parameters": {
"operation": "get",
"documentURL": ""
},
"credentials": {},
"typeVersion": 2
},
{
"id": "01b6354c-c7c6-4bba-83d5-b97d96a28e15",
"name": "获取已批准历史",
"type": "n8n-nodes-base.httpRequestTool",
"position": [
-576,
656
],
"parameters": {
"url": "https://api.gotohuman.com/queryResponses",
"options": {},
"sendQuery": true,
"authentication": "predefinedCredentialType",
"queryParameters": {
"parameters": [
{
"name": "formId",
"value": ""
},
{
"name": "fieldIds",
"value": "companySummary,reasoningInterest,reasoningIcp,personalizationHook,budget,priorityRating,emailToSendSubject,emailToSendBody"
},
{
"name": "approvedValuesOnly",
"value": "true"
}
]
},
"toolDescription": "Fetches positive human-approved examples from past runs to use as orientation for your own reasoning and generating the output.",
"nodeCredentialType": "gotoHumanApi"
},
"credentials": {},
"typeVersion": 4.2
},
{
"id": "ffb75d90-cff6-4db8-b9fb-6ff162e8edd2",
"name": "总结网站",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
-784,
-32
],
"parameters": {
"modelId": {
"__rl": true,
"mode": "list",
"value": "gpt-4.1-mini",
"cachedResultName": "GPT-4.1-MINI"
},
"options": {},
"messages": {
"values": [
{
"content": "=We scraped a website. Please summarize the content in markdown (gfm) in 2-3 paragraphs highlighting their industry, positioning, service or product offerings and any hints on recent activities and strategic moves.\n\n<ScrapingResult>\n{{ $json.data.markdown }}\n</ScrapingResult>"
}
]
}
},
"credentials": {},
"typeVersion": 1.8
},
{
"id": "0373be96-43e3-419b-9d7d-31360be25113",
"name": "等待人工批准",
"type": "@gotohuman/n8n-nodes-gotohuman.gotoHuman",
"position": [
272,
496
],
"webhookId": "7b2542b6-2ae7-489c-bcfd-83c07f480ec5",
"parameters": {
"fields": {
"value": {
"budget": "={{\n{\ndefault: $json.output.companyBudgetAssessment\n}\n}}",
"industry": "={{ $json.output.industry }}",
"leadEmail": "={{ $('Flag personal email addresses').item.json['Work Email'] }}",
"leadCompany": "={{ $('Flag personal email addresses').item.json.Company }}",
"reasoningIcp": "={{ $json.output.reasoningIfIdealCustomerProfile_markdown }}",
"websiteLinks": "={{\n[\n{\n\"url\": $('Flag personal email addresses').item.json.websiteUrl\n}\n]\n}}",
"companySummary": "={{ $('Summarize website').item.json.message.content }}",
"priorityRating": "={{ $json.output.priorityRating }}",
"emailToSendBody": "={{ $json.output.emailDraftBodyPlainText }}",
"reasoningInterest": "={{ $json.output.reasoningForInterestInOurProduct_markdown }}",
"emailToSendSubject": "={{ $json.output.emailDraftSubject }}",
"personalizationHook": "={{ $json.output.reasoningPersonalizationHook_markdown }}"
},
"schema": [
{
"id": "leadEmail",
"type": "string",
"display": true,
"required": false,
"displayName": "leadEmail (textShort)",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "leadCompany",
"type": "string",
"display": true,
"required": false,
"displayName": "leadCompany (textShort)",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "websiteLinks",
"type": "array",
"display": true,
"required": false,
"displayName": "websiteLinks (urlLinks)",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "industry",
"type": "string",
"display": true,
"required": false,
"displayName": "industry (textShort)",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "companySummary",
"type": "string",
"display": true,
"required": false,
"displayName": "companySummary (text)",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "reasoningInterest",
"type": "string",
"display": true,
"required": false,
"displayName": "reasoningInterest (markdown)",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "reasoningIcp",
"type": "string",
"display": true,
"required": false,
"displayName": "reasoningIcp (markdown)",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "personalizationHook",
"type": "string",
"display": true,
"required": false,
"displayName": "personalizationHook (markdown)",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "budget",
"type": "object",
"display": true,
"required": false,
"displayName": "budget (buttonSelect)",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "priorityRating",
"type": "number",
"display": true,
"required": false,
"displayName": "priorityRating (rating)",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "emailToSendSubject",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "emailToSendSubject (textShort)",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "emailToSendBody",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "emailToSendBody (text)",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"additionalFields": {},
"reviewTemplateID": {
"__rl": true,
"mode": "list"
}
},
"credentials": {},
"typeVersion": 1
},
{
"id": "79fc41ac-2357-49f2-9fef-abc0dd995efc",
"name": "发送消息",
"type": "n8n-nodes-base.gmail",
"position": [
1104,
448
],
"webhookId": "0c705542-8d7b-406a-9f88-24b859c6d4cd",
"parameters": {
"sendTo": "={{ $json.responseValues.leadEmail.value }}",
"message": "={{ $json.responseValues.emailToSendBody.value }}",
"options": {
"appendAttribution": false
},
"subject": "={{ $json.responseValues.emailToSendSubject }}",
"emailType": "text"
},
"credentials": {},
"typeVersion": 2.1
},
{
"id": "eacf795f-111e-4e09-9e27-cc87f08c38e4",
"name": "是否已批准?",
"type": "n8n-nodes-base.if",
"position": [
880,
448
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "4a2c31a4-ba0e-46de-a4b1-8f8488d841cd",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.response }}",
"rightValue": "approved"
}
]
}
},
"typeVersion": 2.2
},
{
"id": "12907535-d4bd-427f-9e3b-aba347c95d8f",
"name": "便签",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1952,
-704
],
"parameters": {
"width": 704,
"height": 832,
"content": "## 💼 潜在客户外联代理"
},
"typeVersion": 1
},
{
"id": "cac04e35-b084-4737-b201-0baa711bd87e",
"name": "便签 1",
"type": "n8n-nodes-base.stickyNote",
"position": [
32,
-736
],
"parameters": {
"width": 560,
"height": 1040,
"content": ""
},
"typeVersion": 1
},
{
"id": "d8d24fc1-ab4e-4f9f-a3b1-7dbd1ce0bac9",
"name": "便签 2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1136,
-576
],
"parameters": {
"color": 7,
"width": 992,
"height": 368,
"content": "## 接收潜在客户并检查邮箱"
},
"typeVersion": 1
},
{
"id": "7f8bbfae-cfd6-4f2f-977e-6c1758e31dbd",
"name": "便签 3",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1136,
-176
],
"parameters": {
"color": 7,
"width": 992,
"height": 368,
"content": "## 抓取并总结公司网站"
},
"typeVersion": 1
},
{
"id": "72c21482-fe16-42b5-be80-fdca47f14c48",
"name": "便签 4",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1136,
240
],
"parameters": {
"color": 7,
"width": 992,
"height": 640,
"content": "## AI分析与外联草稿"
},
"typeVersion": 1
},
{
"id": "5d671365-1e9d-457a-b56f-b50c31165e22",
"name": "便签 5",
"type": "n8n-nodes-base.stickyNote",
"position": [
144,
368
],
"parameters": {
"color": 7,
"width": 336,
"height": 336,
"content": ""
},
"typeVersion": 1
},
{
"id": "58b912fb-6ed1-4c5f-a847-67e6175ce169",
"name": "便签6",
"type": "n8n-nodes-base.stickyNote",
"position": [
752,
256
],
"parameters": {
"color": 7,
"width": 560,
"height": 544,
"content": "## 发送人工批准的邮件"
},
"typeVersion": 1
}
],
"pinData": {
"Typeform Trigger": [
{
"Company": "Air Canada",
"Work Email": "fred.moltens@aircanada.com"
}
]
},
"connections": {
"Is approved?": {
"main": [
[
{
"node": "Send a message",
"type": "main",
"index": 0
}
]
]
},
"AI Sales Agent": {
"main": [
[
{
"node": "Wait for Human Approval",
"type": "main",
"index": 0
}
]
]
},
"Extract Domain": {
"main": [
[
{
"node": "Flag personal email addresses",
"type": "main",
"index": 0
}
]
]
},
"Typeform Trigger": {
"main": [
[
{
"node": "Extract Domain",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "AI Sales Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Summarize website": {
"main": [
[
{
"node": "AI Sales Agent",
"type": "main",
"index": 0
}
]
]
},
"Is Personal Email?": {
"main": [
[],
[
{
"node": "Scrape the website",
"type": "main",
"index": 0
}
]
]
},
"Scrape the website": {
"main": [
[
{
"node": "Summarize website",
"type": "main",
"index": 0
}
]
]
},
"Fetch approved history": {
"ai_tool": [
[
{
"node": "AI Sales Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Get our ICP description": {
"ai_tool": [
[
{
"node": "AI Sales Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Get our company profile": {
"ai_tool": [
[
{
"node": "AI Sales Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Wait for Human Approval": {
"main": [
[
{
"node": "Is approved?",
"type": "main",
"index": 0
}
]
]
},
"Structured Output Parser": {
"ai_outputParser": [
[
{
"node": "AI Sales Agent",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"Flag personal email addresses": {
"main": [
[
{
"node": "Is Personal Email?",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
高级 - 杂项, 多模态 AI
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
使用gotoHuman将AI生成的Markdown保存到Google Docs进行审批
使用gotoHuman将AI生成的Markdown保存到Google Docs进行审批
If
Code
Google Drive
+8
15 节点gotoHuman
杂项
使用 GPT-4o、Fal.ai 和人工监督生成产品 AI 宣传视频
使用 GPT-4o、Fal.ai 和人工监督生成产品 AI 宣传视频
If
Set
Code
+12
72 节点gotoHuman
内容创作
使用 GPT-4o 和 gotoHuman 监督分类邮件并发送回复
使用 GPT-4o 和 gotoHuman 监督分类邮件并发送回复
Set
Gmail
Switch
+7
24 节点gotoHuman
工单管理
💥 使用 NanoBanana 和 Seedance 创建病毒式广告,通过 upload-post 在社交媒体发布 VIDE II
使用 AI 创建病毒式多媒体广告:NanoBanana、Seedance 和 Suno 用于社交媒体
If
Set
Code
+13
45 节点Dr. Firas
杂项
使用 GPT-5、gotoHuman 和人工审核从 Gmail 自动回复并创建 Linear 工单
使用 GPT-5、gotoHuman 和人工审核从 Gmail 自动回复并创建 Linear 工单
Set
Code
Gmail
+13
37 节点gotoHuman
工单管理
基于 YouTube 视频的自主博客发布
使用 ChatGPT、Sheets、Apify、Pexels 和 WordPress 从 YouTube 视频自主发布博客
If
Set
Code
+18
80 节点Oriol Seguí
内容创作
工作流信息
难度等级
高级
节点数量22
分类2
节点类型13
作者
gotoHuman
@gotohumanApprove critical actions in gotoHuman’s customizable review interface and edit AI outputs manually or by looping back to your workflow. Ensure AI-generated content is on-brand, messages to customers are accurate, and high-stakes decisions are made by humans.
外部链接
在 n8n.io 查看 →
分享此工作流