基于 JotForm、GPT-4o 和 Perplexity AI 的个性化 B2B/B2C 欢迎邮件
中级
这是一个自动化工作流,包含 11 个节点。主要使用 If, Set, Gmail, Merge, Perplexity 等节点。 通过 Gmail 使用 JotForm、GPT-4o 和 Perplexity AI 的个性化 B2B/B2C 欢迎邮件
前置要求
- •Google 账号和 Gmail API 凭证
- •OpenAI API Key
分类
-
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"meta": {
"instanceId": "689fa22e68cd4198e4ae37f3cc44f498087edd235a867e22515be823bab694c7",
"templateCredsSetupCompleted": true
},
"nodes": [
{
"id": "b5a08019-8bf0-4413-b25f-e731aa71b627",
"name": "OpenAI 聊天模型",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
976,
224
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4o",
"cachedResultName": "gpt-4o"
},
"options": {}
},
"credentials": {
"openAiApi": {
"id": "cvoaGpSHxIHlkPx2",
"name": "said"
}
},
"typeVersion": 1.2
},
{
"id": "af8f0e58-297f-482e-ac9b-32dc2ff19eff",
"name": "发送欢迎邮件",
"type": "n8n-nodes-base.gmail",
"position": [
1472,
304
],
"webhookId": "c0990a65-14ba-476c-8c9d-6029e45c15a1",
"parameters": {
"sendTo": "={{ $('On New JotForm Submission').item.json.email }}",
"message": "={{ $json.output }}",
"options": {
"appendAttribution": false
},
"subject": "=Welcome to Our Platform, {{ $('On New JotForm Submission').item.json.name.split(' ')[0] }}!"
},
"credentials": {
"gmailOAuth2": {
"id": "elmXkjoc2rihm2L8",
"name": "yemsy-test"
}
},
"typeVersion": 2.1
},
{
"id": "dced7d8d-7511-48a9-9739-3591ed4ccbc6",
"name": "当有新 JotForm 提交时",
"type": "n8n-nodes-base.jotFormTrigger",
"position": [
0,
304
],
"webhookId": "14e24b7a-6b4a-403c-b7d6-76593aa9627f",
"parameters": {
"form": "="
},
"credentials": {
"jotFormApi": {
"id": "dpLsZVpbiRjHdeDM",
"name": "JotForm account"
}
},
"typeVersion": 1
},
{
"id": "685bbdaa-c187-4a92-b2b9-4319352b1043",
"name": "通过 Perplexity AI 研究公司",
"type": "n8n-nodes-base.perplexity",
"position": [
672,
112
],
"parameters": {
"model": "sonar-pro",
"options": {},
"messages": {
"message": [
{
"content": "=Research the company with domain {{ $json.domain_name }}. Provide a comprehensive overview including:\n\n1. Company name and overview\n2. Industry and market position\n3. Key products or services\n4. Recent news or developments\n5. Company culture and values\n6. Any notable achievements or recognition\n\nProvide detailed, accurate information that would help personalize a welcome email."
}
]
},
"requestOptions": {}
},
"credentials": {
"perplexityApi": {
"id": "JChY8irnggxVhE2E",
"name": "Perplexity account 2"
}
},
"typeVersion": 1
},
{
"id": "fd7d1e5f-8a21-42f4-84d8-7aba61854782",
"name": "便签",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1184,
-880
],
"parameters": {
"width": 1024,
"height": 1040,
"content": "## 向任何 JotForm 线索发送智能、个性化的欢迎邮件"
},
"typeVersion": 1
},
{
"id": "ab0b495c-e41c-4cc8-8ee7-0f8b796d83a6",
"name": "从电子邮件中提取域名",
"type": "n8n-nodes-base.set",
"position": [
224,
304
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "domain-extract-field",
"name": "domain_name",
"type": "string",
"value": "={{ $json.email.split('@')[1] }}"
}
]
},
"includeOtherFields": true
},
"typeVersion": 3.4
},
{
"id": "62e2921d-1a46-40e6-be0e-e553af3fbd95",
"name": "如果是工作邮箱",
"type": "n8n-nodes-base.if",
"position": [
448,
304
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "e3e98824-2a5a-4517-8f5b-5250e84c2839",
"operator": {
"type": "array",
"operation": "notContains",
"rightType": "any"
},
"leftValue": "={{ [\"gmail.com\",\"yahoo.com\", \"outlook.com\", \"yopmail.com\"] }}",
"rightValue": "={{$json.domain_name}}"
}
]
}
},
"typeVersion": 2.2
},
{
"id": "ab0b4fc3-a515-4d0f-abe3-cabd7bf50840",
"name": "合并",
"type": "n8n-nodes-base.merge",
"position": [
1248,
304
],
"parameters": {},
"typeVersion": 3.2
},
{
"id": "8286a881-99c6-42a2-9765-b40dfd9a7d6a",
"name": "OpenAI 聊天模型1",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
976,
736
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4o",
"cachedResultName": "gpt-4o"
},
"options": {}
},
"credentials": {
"openAiApi": {
"id": "cvoaGpSHxIHlkPx2",
"name": "said"
}
},
"typeVersion": 1.2
},
{
"id": "da8c05f2-dece-4320-821c-d486a19b39d8",
"name": "AI 公司邮件撰写器",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
896,
0
],
"parameters": {
"text": "=Create a highly personalized welcome onboarding email for:\n\n**Lead Information:**\n- Name: {{ $('On New JotForm Submission').item.json.name }}\n- Email: {{ $('On New JotForm Submission').item.json.email }}\n- Company Domain: {{ $('Extract Domain from Email').item.json.domain_name }}\n\n**Company Research:**\n{{ $('Research Company via Perplexity AI').item.json.message.content }}\n\n**Additional Form Data:**\n{{ JSON.stringify($('On New JotForm Submission').item.json, null, 2) }}\n\n---\n\nCreate a warm, professional welcome email that:\n1. Addresses them by name\n2. Shows we've researched their company\n3. Demonstrates understanding of their industry/challenges\n4. Provides clear next steps\n5. Makes them excited to get started\n6. Includes a compelling subject line\n\nFormat the output as HTML email content with a subject line at the top.",
"options": {
"systemMessage": "=You are an expert email copywriter specializing in personalized B2B onboarding communications. Your emails are:\n\n- Warm yet professional\n- Highly personalized based on company research\n- Engaging and conversational\n- Clear about next steps\n- Focused on value and relevance to their business\n\nCreate emails that make recipients feel valued and understood. Use the company research to demonstrate genuine interest in their business. Keep the tone friendly but professional, and always include actionable next steps.\n\nOnly output the response in HTML and nothing else."
},
"promptType": "define"
},
"typeVersion": 2.2
},
{
"id": "5cf08a12-c83f-43f9-858a-2e830eabf11d",
"name": "AI 个人邮件撰写器",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
896,
512
],
"parameters": {
"text": "=Create a highly personalized welcome onboarding email for:\n\n**Lead Information:**\n- Name: {{ $('On New JotForm Submission').item.json.name }}\n- Email: {{ $('On New JotForm Submission').item.json.email }}\n\n**Additional Form Data:**\n{{ JSON.stringify($('On New JotForm Submission').item.json, null, 2) }}\n\n---\n\nCreate a warm, professional personal welcome email that:\n1. Addresses them by name\n2. Demonstrates understanding of their challenges\n3. Provides clear next steps\n4. Makes them excited to get started\n5. Includes a compelling subject line\n\nFormat the output as HTML email content with a subject line at the top.",
"options": {
"systemMessage": "=You are an expert email copywriter specializing in personalized B2B onboarding communications. Your emails are:\n\n- Warm yet professional\n- Highly personalized based on company research\n- Engaging and conversational\n- Clear about next steps\n- Focused on value and relevance to their business\n\nCreate emails that make recipients feel valued and understood. Use the company research to demonstrate genuine interest in their business. Keep the tone friendly but professional, and always include actionable next steps.\n\nOnly output the response in HTML and nothing else."
},
"promptType": "define"
},
"typeVersion": 2.2
}
],
"pinData": {},
"connections": {
"Merge": {
"main": [
[
{
"node": "Send Welcome Email",
"type": "main",
"index": 0
}
]
]
},
"If Work Email": {
"main": [
[
{
"node": "Research Company via Perplexity AI",
"type": "main",
"index": 0
}
],
[
{
"node": "AI Personal Email Writer",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "AI Company Email Writer",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"OpenAI Chat Model1": {
"ai_languageModel": [
[
{
"node": "AI Personal Email Writer",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"AI Company Email Writer": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 0
}
]
]
},
"AI Personal Email Writer": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 1
}
]
]
},
"Extract Domain from Email": {
"main": [
[
{
"node": "If Work Email",
"type": "main",
"index": 0
}
]
]
},
"On New JotForm Submission": {
"main": [
[
{
"node": "Extract Domain from Email",
"type": "main",
"index": 0
}
]
]
},
"Research Company via Perplexity AI": {
"main": [
[
{
"node": "AI Company Email Writer",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
中级
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
使用Gemini AI和Decodo爬虫自动匹配简历与职位
使用Gemini AI和Decodo爬虫自动匹配简历与职位
Set
Gmail
Merge
+9
20 节点Fahmi Fahreza
人力资源
自动博客推广器 - 社交媒体帖子发布器
基于GPT的AI驱动博客文章推广器,用于Instagram、Facebook和X平台
If
Set
Code
+12
44 节点LukaszB
人工智能
基于AI的MIS代理
基于AI的管理信息系统代理
If
Set
Code
+29
129 节点Kumar Shivam
客户支持
✨🩷自动化社交媒体内容发布工厂 + 系统提示组合
基于动态系统提示和GPT-4o的AI驱动多平台社交媒体内容工厂
If
Set
Code
+20
100 节点Amit Mehta
内容创作
MailChimp自动化
基于AI的餐厅通讯生成器,集成Mailchimp和Telegram审批
If
Set
Code
+16
43 节点Femi Ad
人工智能
社交媒体工厂
基于AI的社交媒体内容创建器,支持多平台发布与审批
If
Set
Gmail
+15
48 节点Taiki
社交媒体