使用AI和Google日历为销售会议自动生成社交媒体简报
这是一个CRM, AI Summarization领域的自动化工作流,包含 19 个节点。主要使用 Set, Html, Wait, Gmail, Merge 等节点。 使用GPT-4、LinkedIn数据和WhatsApp发送自动生成销售会议简报
- •Google 账号和 Gmail API 凭证
- •OpenAI API Key
- •可能需要目标 API 的认证凭证
使用的节点 (19)
{
"id": "PfcCFOFQlF2xlsT2",
"meta": {
"instanceId": "dd69efaf8212c74ad206700d104739d3329588a6f3f8381a46a481f34c9cc281",
"templateCredsSetupCompleted": true
},
"name": "使用 AI 和 Google Calendar 为销售会议自动生成社交媒体简报",
"tags": [],
"nodes": [
{
"id": "0fa99817-27e1-4e25-a643-7f22ce1099d2",
"name": "丰富与会者公司信息",
"type": "n8n-nodes-base.clearbit",
"position": [
900,
400
],
"parameters": {
"domain": "{{json.domain_name}}",
"additionalFields": {}
},
"credentials": {
"clearbitApi": {
"id": "hbibCxmRK07dTKd3",
"name": "Clearbit account - test"
}
},
"typeVersion": 1
},
{
"id": "4a8985d8-0e0d-4dd4-be7e-a2d853842eb7",
"name": "计划触发器 – 早上 5 点",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
-420,
400
],
"parameters": {
"rule": {
"interval": [
{
"triggerAtHour": 5
}
]
}
},
"typeVersion": 1.1
},
{
"id": "639411ec-4cf6-4caa-b333-fc5b02d72e12",
"name": "初始化工作流",
"type": "n8n-nodes-base.set",
"position": [
-200,
400
],
"parameters": {
"fields": {
"values": [
{
"name": "linkedIn_API_Key"
},
{
"name": "emails"
}
]
},
"options": {}
},
"typeVersion": 3.2
},
{
"id": "93c5de17-7e38-4590-bd76-d4b2836971e9",
"name": "从 Google Calendar 获取今日会议",
"type": "n8n-nodes-base.googleCalendar",
"position": [
20,
400
],
"parameters": {
"limit": 150,
"options": {
"timeMax": "={{ $today.plus({ days: 10 }) }}",
"timeMin": "={{ $today.minus({ days: 5 }) }}",
"singleEvents": true
},
"calendar": {
"__rl": true,
"mode": "id",
"value": "=abc@gmail.com"
},
"operation": "getAll"
},
"credentials": {
"googleCalendarOAuth2Api": {
"id": "6ldLmzzYtaqng4pw",
"name": "Google Calendar account - test"
}
},
"typeVersion": 1
},
{
"id": "25033b38-0417-4484-b783-f33aba39f74e",
"name": "提取与会者电子邮件域名",
"type": "n8n-nodes-base.set",
"position": [
240,
400
],
"parameters": {
"fields": {
"values": [
{
"name": "domain_name",
"type": "arrayValue",
"arrayValue": "={{ $json.attendees.filter(a => !a.organizer).map(a => a.email.split('@').pop()) }}"
},
{
"name": "attend_Emails",
"type": "arrayValue",
"arrayValue": "={{ $json.attendees.filter(a => !a.organizer).map(a => a.email) }}"
}
]
},
"options": {}
},
"typeVersion": 3.2
},
{
"id": "4718c1f2-2eb6-4ab1-9a55-255f735289ab",
"name": "遍历与会者",
"type": "n8n-nodes-base.splitInBatches",
"position": [
460,
400
],
"parameters": {
"options": {}
},
"typeVersion": 3
},
{
"id": "21f81aac-27a6-4d95-8581-114444fbd330",
"name": "拆分与会者详情",
"type": "n8n-nodes-base.splitOut",
"position": [
680,
400
],
"parameters": {
"include": "selectedOtherFields",
"options": {},
"fieldToSplitOut": "domain_name",
"fieldsToInclude": "attend_Emails, start"
},
"typeVersion": 1
},
{
"id": "d9b3fd55-f54a-4a8c-a503-75e2ef0e6d06",
"name": "等待公司信息丰富",
"type": "n8n-nodes-base.wait",
"position": [
1120,
400
],
"webhookId": "9539ad1e-57c4-4420-95a7-b94b0d53d828",
"parameters": {},
"typeVersion": 1.1
},
{
"id": "70f9669b-ccbd-48cd-b8b3-0402708ef693",
"name": "检查丰富状态",
"type": "n8n-nodes-base.switch",
"position": [
1340,
400
],
"parameters": {
"rules": {
"values": [
{
"outputKey": "linkedin",
"conditions": {
"options": {
"version": 1,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "4f3acc06-a758-4334-abf6-ce49e44f9300",
"operator": {
"type": "boolean",
"operation": "true",
"singleValue": true
},
"leftValue": "={{ $json.linkedin.handle !== null }}",
"rightValue": ""
}
]
},
"renameOutput": true
}
]
},
"options": {
"allMatchingOutputs": true,
"looseTypeValidation": false
}
},
"typeVersion": 3
},
{
"id": "6545f48f-701c-4276-a56f-0e0b9d595bc8",
"name": "获取最新 LinkedIn 帖子",
"type": "n8n-nodes-base.httpRequest",
"position": [
1560,
400
],
"parameters": {
"url": "https://fresh-linkedin-profile-data.p.rapidapi.com/get-company-posts",
"options": {
"batching": {
"batch": {
"batchSize": 150
}
}
},
"sendQuery": true,
"sendHeaders": true,
"queryParameters": {
"parameters": [
{
"name": "linkedin_url",
"value": "=https://www.linkedin.com/{{ $json.linkedin.handle }}"
},
{
"name": "sort_by",
"value": "recent"
}
]
},
"headerParameters": {
"parameters": [
{
"name": "X-RapidAPI-Key",
"value": "={{ $('Initialize Workflow').item.json.linkedInAPIKey }}"
},
{
"name": "X-RapidAPI-Host",
"value": "fresh-linkedin-profile-data.p.rapidapi.com"
}
]
}
},
"typeVersion": 4.1
},
{
"id": "f09f953e-3ec2-4e87-8d18-6b90b14a1f9e",
"name": "提取关键帖子洞察",
"type": "n8n-nodes-base.set",
"position": [
1780,
400
],
"parameters": {
"fields": {
"values": [
{
"name": "linkedin_posts",
"type": "arrayValue",
"arrayValue": "={{ $input.item.json.data.slice(0, 10).map(d => { return { text: d.text, likes: d.num_likes, comments: d.num_comments, postedAt: d.posted } } ) }}"
},
{
"name": "name",
"stringValue": "={{ $('Check Enrichment Status').item.json.name }}"
},
{
"name": "meeting",
"type": "objectValue",
"objectValue": "={{ $('Split Attendee Details').item.json }}"
}
]
},
"include": "none",
"options": {}
},
"typeVersion": 3.2
},
{
"id": "2a8b6c8f-5964-4b07-8768-0a6cfeb1dceb",
"name": "使用 AI 总结社交活动",
"type": "n8n-nodes-base.set",
"position": [
2000,
500
],
"parameters": {
"fields": {
"values": [
{
"name": "attendeeEmail",
"stringValue": "={{ $json.meeting.attendeeEmails.find(a => a.endsWith($json.meeting.domain)) }}"
},
{
"name": "startHour",
"type": "numberValue",
"numberValue": "={{ DateTime.fromISO($json.meeting.start.dateTime).hour }}"
},
{
"name": "startMinute",
"type": "numberValue",
"numberValue": "={{ DateTime.fromISO($json.meeting.start.dateTime).minute }}"
}
]
},
"include": "selected",
"options": {},
"includeFields": "name, html_linkedin"
},
"typeVersion": 3.2
},
{
"id": "29d13d05-6525-4f4c-8b09-f81892ab3138",
"name": "格式化摘要用于邮件",
"type": "n8n-nodes-base.openAi",
"position": [
2000,
300
],
"parameters": {
"prompt": {
"messages": [
{
"content": "=Please paste the actual JSON data (not {{ JSON.stringify($json) }}) so I can generate the summary based on the real company name and post content.\n\nOnce you provide the JSON, I’ll return a short, impersonal email-style summary focusing on key sales-relevant insights from LinkedIn posts."
}
]
},
"options": {},
"resource": "chat",
"chatModel": "gpt-4",
"requestOptions": {}
},
"credentials": {
"openAiApi": {
"id": "CDQ16eImh6D4tY15",
"name": "OpenAi account 2 - test"
}
},
"typeVersion": 1.1
},
{
"id": "0a1d2f8f-99b6-41f7-b2f2-b9e9b36b9db7",
"name": "将摘要与上下文合并",
"type": "n8n-nodes-base.merge",
"disabled": true,
"position": [
2220,
400
],
"parameters": {
"mode": "combine",
"options": {},
"combinationMode": "mergeByPosition"
},
"typeVersion": 2.1
},
{
"id": "0d8e7b58-ce7b-4704-9a06-4a1aceddfc7d",
"name": "发送前等待",
"type": "n8n-nodes-base.wait",
"position": [
2440,
400
],
"webhookId": "a823988b-ccd5-4c08-8cea-3f6eea7dff47",
"parameters": {
"amount": 2
},
"typeVersion": 1.1
},
{
"id": "e9fe48eb-8297-4023-8d89-f4bc9b38974b",
"name": "生成 HTML 邮件模板",
"type": "n8n-nodes-base.html",
"position": [
2660,
400
],
"parameters": {
"html": "<!DOCTYPE html>\n<html>\n<head>\n <meta charset=\"UTF-8\" />\n <style>\n body {\n font-family: sans-serif;\n margin: 1em;\n }\n .summary {\n background-color: #f7f9fc;\n padding: 0.5em 1em;\n border-left: 4px solid #0073e6;\n margin-top: 0.5em;\n }\n </style>\n</head>\n<body>\n <h3>Meeting with {{ $json.attendeeEmail }} at {{ $json.startHour }}:{{ $json.startMinute < 10 ? `0${$json.startMinute}` : $json.startMinute }}h</h3>\n <p><strong>Quick summary of {{ $json.name }}'s social media activity:</strong></p>\n <div class=\"summary\">\n {{ $json.message.content }}\n </div>\n</body>\n</html>\n"
},
"typeVersion": 1.1
},
{
"id": "b12bf591-6975-4b7f-b01a-d02ccbb33243",
"name": "通过 WhatsApp 发送",
"type": "n8n-nodes-base.whatsApp",
"position": [
2880,
300
],
"webhookId": "cffafb97-667e-4e19-addc-7a902e850e88",
"parameters": {
"textBody": "={{ $json.html }}",
"operation": "send",
"phoneNumberId": "=+91993388337733",
"additionalFields": {},
"recipientPhoneNumber": "+9198763322444"
},
"credentials": {
"whatsAppApi": {
"id": "b0PxTDPdWzznWnfG",
"name": "WhatsApp-test "
}
},
"typeVersion": 1
},
{
"id": "b033a15f-4a08-4580-863a-67c78cb9d59b",
"name": "通过 Gmail 发送",
"type": "n8n-nodes-base.gmail",
"position": [
2880,
500
],
"webhookId": "5970219d-6107-437f-b590-e0936e28b80c",
"parameters": {
"sendTo": "={{ $('Initialize Workflow').first().json.emails }}",
"message": "={{ $json.html }}",
"options": {},
"subject": "=Latest social activity for: {{ $('Merge Summary with Context').item.json.name }}"
},
"credentials": {
"gmailOAuth2": {
"id": "PcTqvGU9uCunfltE",
"name": "Gmail account - test"
}
},
"typeVersion": 2.1
},
{
"id": "551f69af-a07a-4b7a-9021-29810f9995b6",
"name": "便签",
"type": "n8n-nodes-base.stickyNote",
"position": [
-80,
-1440
],
"parameters": {
"color": 2,
"width": 1000,
"height": 1420,
"content": "## 工作流目的(逐步说明)"
},
"typeVersion": 1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "85e779a0-cba0-4c00-bcf0-740f108c3032",
"connections": {
"Send via WhatsApp": {
"main": [
[]
]
},
"Initialize Workflow": {
"main": [
[
{
"node": "Fetch Today’s Meetings from Google Calendar",
"type": "main",
"index": 0
}
]
]
},
"Wait Before Sending": {
"main": [
[
{
"node": "Generate HTML Email Template",
"type": "main",
"index": 0
}
]
]
},
"Loop Through Attendees": {
"main": [
[
{
"node": "Split Attendee Details",
"type": "main",
"index": 0
}
],
[
{
"node": "Loop Through Attendees",
"type": "main",
"index": 0
}
]
]
},
"Split Attendee Details": {
"main": [
[
{
"node": "Enrich attendee company",
"type": "main",
"index": 0
}
]
]
},
"Check Enrichment Status": {
"main": [
[
{
"node": "Fetch Latest LinkedIn Posts",
"type": "main",
"index": 0
}
]
]
},
"Enrich attendee company": {
"main": [
[
{
"node": "Wait for Company Enrichment",
"type": "main",
"index": 0
}
]
]
},
"Format Summary for Email": {
"main": [
[
{
"node": "Merge Summary with Context",
"type": "main",
"index": 0
}
]
]
},
"Extract Key Post Insights": {
"main": [
[
{
"node": "Format Summary for Email",
"type": "main",
"index": 0
},
{
"node": "Summarize Social Activity with AI",
"type": "main",
"index": 0
}
]
]
},
"Schedule Trigger – 5 AM": {
"main": [
[
{
"node": "Initialize Workflow",
"type": "main",
"index": 0
}
]
]
},
"Merge Summary with Context": {
"main": [
[
{
"node": "Wait Before Sending",
"type": "main",
"index": 0
}
]
]
},
"Fetch Latest LinkedIn Posts": {
"main": [
[
{
"node": "Extract Key Post Insights",
"type": "main",
"index": 0
}
]
]
},
"Wait for Company Enrichment": {
"main": [
[
{
"node": "Check Enrichment Status",
"type": "main",
"index": 0
}
]
]
},
"Generate HTML Email Template": {
"main": [
[
{
"node": "Send via WhatsApp",
"type": "main",
"index": 0
},
{
"node": "Send via Gmail",
"type": "main",
"index": 0
}
]
]
},
"Extract Attendee Email Domains": {
"main": [
[
{
"node": "Loop Through Attendees",
"type": "main",
"index": 0
}
]
]
},
"Summarize Social Activity with AI": {
"main": [
[
{
"node": "Merge Summary with Context",
"type": "main",
"index": 1
}
]
]
},
"Fetch Today’s Meetings from Google Calendar": {
"main": [
[
{
"node": "Extract Attendee Email Domains",
"type": "main",
"index": 0
}
]
]
}
}
}如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
高级 - 客户关系管理, AI 摘要总结
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
Oneclick AI Squad
@oneclick-aiThe AI Squad Initiative is a pioneering effort to build, automate and scale AI-powered workflows using n8n.io. Our mission is to help individuals and businesses integrate AI agents seamlessly into their daily operations from automating tasks and enhancing productivity to creating innovative, intelligent solutions. We design modular, reusable AI workflow templates that empower creators, developers and teams to supercharge their automation with minimal effort and maximum impact.
分享此工作流