为您的电子邮件生成可视化摘要和知识图谱洞察
高级
这是一个Other, AI领域的自动化工作流,包含 38 个节点。主要使用 If, Set, Code, Wait, Gmail 等节点,结合人工智能技术实现智能自动化。 为您的电子邮件生成可视化摘要和知识图谱洞察
前置要求
- •Google 账号和 Gmail API 凭证
- •Telegram Bot Token
- •可能需要目标 API 的认证凭证
- •Google Gemini API Key
使用的节点 (38)
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"id": "ddCCP7XAKuUqNKbU",
"meta": {
"instanceId": "2a26454b0172ffcb8d70ba77c235b1209f92cd71bf06c79ba609c7173b416d68",
"templateCredsSetupCompleted": true
},
"name": "为您的电子邮件生成可视化摘要和知识图谱洞察",
"tags": [
{
"id": "sJk9cUvmMU8FkJXv",
"name": "AI",
"createdAt": "2025-05-20T13:16:15.636Z",
"updatedAt": "2025-05-20T13:16:15.636Z"
}
],
"nodes": [
{
"id": "bb0edf9a-910c-41fc-bcc1-f09e162045c2",
"name": "便签",
"type": "n8n-nodes-base.stickyNote",
"position": [
-2040,
-240
],
"parameters": {
"width": 380,
"height": 1140,
"content": "## 1. 如何触发?"
},
"typeVersion": 1
},
{
"id": "3a974df3-2b2a-4ce2-aff4-74b3771d2e5d",
"name": "InfraNodus 问题生成器",
"type": "n8n-nodes-base.httpRequest",
"position": [
2460,
200
],
"parameters": {
"url": "https://infranodus.com/api/v1/graphAndAdvice?doNotSave=true&optimize=gap&includeGraph=false&includeGraphSummary=true",
"method": "POST",
"options": {},
"sendBody": true,
"authentication": "genericCredentialType",
"bodyParameters": {
"parameters": [
{
"name": "aiTopics",
"value": "true"
},
{
"name": "requestMode",
"value": "question"
},
{
"name": "name",
"value": "={{ $('Assign Processing Settings').item.json[\"Graph Name\"] }}"
}
]
},
"genericAuthType": "httpBearerAuth"
},
"credentials": {
"httpBearerAuth": {
"id": "FPDx6PA5CtzGEIQc",
"name": "InfraNodus DeeMeeTree API Key"
}
},
"typeVersion": 4.2
},
{
"id": "81a91a82-e1c5-4ff6-873a-3d70d4635637",
"name": "清理文本并组织成陈述",
"type": "n8n-nodes-base.code",
"position": [
1200,
200
],
"parameters": {
"jsCode": "\nlet statements = []\nfor (const item of $input.all()) {\n\n item.json.from?.forEach((emailOrigin, index) => {\n const textContent = item.json.text[index]?.split('\\n').join(' ');\n const cleanTextContent = removeHtmlCssScript(textContent)\n const cleanDate = new Date().toDateString()\n statements.push('[[' + emailOrigin + ']] ' + '[' + cleanDate + '] ' + cleanTextContent)\n })\n}\n\nreturn { statements: statements }\n\nfunction removeHtmlCssScript(text) {\n if (!text || typeof text !== 'string') {\n return '';\n }\n \n let cleanText = text;\n \n // Remove script tags and their content (case insensitive)\n cleanText = cleanText.replace(/<script[^>]*>[\\s\\S]*?<\\/script>/gi, '');\n \n // Remove style tags and their content (case insensitive)\n cleanText = cleanText.replace(/<style[^>]*>[\\s\\S]*?<\\/style>/gi, '');\n \n // Remove HTML comments\n cleanText = cleanText.replace(/<!--[\\s\\S]*?-->/g, '');\n \n // Remove all remaining HTML tags\n cleanText = cleanText.replace(/<[^>]*>/g, '');\n \n // Decode common HTML entities\n const htmlEntities = {\n '&': '&',\n '<': '<',\n '>': '>',\n '"': '\"',\n ''': \"'\",\n ' ': ' ',\n '©': '©',\n '®': '®',\n '™': '™'\n };\n \n Object.keys(htmlEntities).forEach(entity => {\n const regex = new RegExp(entity, 'g');\n cleanText = cleanText.replace(regex, htmlEntities[entity]);\n });\n \n // Clean up extra whitespace\n cleanText = cleanText.replace(/\\s+/g, ' ').trim();\n \n return cleanText;\n}"
},
"typeVersion": 2
},
{
"id": "7a1946fe-5e84-402a-a728-71288cc4b160",
"name": "便签1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-2040,
-880
],
"parameters": {
"color": 6,
"width": 1280,
"height": 600,
"content": "# 您的 Gmail 可视化摘要和知识图谱洞察"
},
"typeVersion": 1
},
{
"id": "599264b8-bd89-4ed9-8645-725ebd005747",
"name": "Google Gemini 聊天模型",
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
"position": [
120,
500
],
"parameters": {
"options": {},
"modelName": "models/gemini-2.5-flash-preview-04-17"
},
"credentials": {
"googlePalmApi": {
"id": "ivswOFTY8MYDbj5b",
"name": "Google Gemini(PaLM) Api account"
}
},
"typeVersion": 1
},
{
"id": "e7251d9c-e247-4b48-a7db-4b7bba057777",
"name": "是否提供了标签?",
"type": "n8n-nodes-base.if",
"position": [
-1080,
320
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "a8278945-a9a1-45c6-809f-b9282f6de0ed",
"operator": {
"type": "string",
"operation": "notEmpty",
"singleValue": true
},
"leftValue": "={{ $('Assign Processing Settings').item.json[\"Label Filter\"] }}",
"rightValue": ""
}
]
}
},
"typeVersion": 2.2
},
{
"id": "6a1fdf73-fa60-46d6-8980-e192735fbb54",
"name": "是否分析摘要?",
"type": "n8n-nodes-base.if",
"position": [
-620,
380
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "802f2028-04bb-43ad-befa-416c0afc5515",
"operator": {
"type": "string",
"operation": "empty",
"singleValue": true
},
"leftValue": "={{ $('Assign Processing Settings').item.json['Analyze Full Email Text?'] }}",
"rightValue": "Snippets"
}
]
}
},
"typeVersion": 2.2
},
{
"id": "daa2cf5f-e8b5-45a4-ab73-feb5981d665d",
"name": "是否分析过滤后邮件的摘要?",
"type": "n8n-nodes-base.if",
"position": [
-600,
60
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "82abd9a8-375b-4c3f-8f19-be6b3c1b8e80",
"operator": {
"type": "string",
"operation": "empty",
"singleValue": true
},
"leftValue": "={{ $('Assign Processing Settings').item.json['Analyze Full Email Text?'] }}",
"rightValue": "Snippets"
}
]
}
},
"typeVersion": 2.2
},
{
"id": "9cae8722-13c0-4090-81c3-ec60ced40ec4",
"name": "按标签过滤邮件",
"type": "n8n-nodes-base.filter",
"notes": "To only show personal mails, use CATEGORY_PERSONAL in the filters (or any other label you like)\nCATEGORY_PROMOTIONS - for promos\nSENT - for your sent messages",
"position": [
-880,
160
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "731d1986-b8e1-480f-b956-0e9e7d2b9df8",
"operator": {
"type": "array",
"operation": "contains",
"rightType": "any"
},
"leftValue": "={{ $json.labels.map(label => label.name) }}",
"rightValue": "={{ $('Assign Processing Settings').item.json['Label Filter'] }}"
}
]
}
},
"notesInFlow": true,
"typeVersion": 2.2
},
{
"id": "204e3171-f4bf-4c6f-a0a9-3ba9ae9f869d",
"name": "获取完整邮件内容",
"type": "n8n-nodes-base.gmail",
"position": [
-280,
380
],
"webhookId": "e79f9021-02a7-4506-8aa8-b21a6b823815",
"parameters": {
"simple": false,
"options": {},
"messageId": "={{ $json.id }}",
"operation": "get"
},
"credentials": {
"gmailOAuth2": {
"id": "pL8OjzEMWakSY1Nk",
"name": "Gmail paranyushkin"
}
},
"typeVersion": 2.1
},
{
"id": "825e11fe-5f2c-41ef-ade0-1136607decbd",
"name": "是否使用 AI 进一步过滤邮件?",
"type": "n8n-nodes-base.if",
"position": [
-20,
220
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "6ccf71c6-0f1b-4560-82c7-0185946af0a2",
"operator": {
"type": "string",
"operation": "notEmpty",
"singleValue": true
},
"leftValue": "={{ $('Assign Processing Settings').item.json['Email Type Description'] }}",
"rightValue": ""
}
]
}
},
"typeVersion": 2.2
},
{
"id": "f504bc20-2385-42f1-80da-f7129a4dcb6e",
"name": "是否存在消息文本或摘要?",
"type": "n8n-nodes-base.filter",
"position": [
160,
120
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "loose"
},
"combinator": "and",
"conditions": [
{
"id": "eaffd686-c04b-4327-b2c5-3b0da2eee00e",
"operator": {
"type": "string",
"operation": "exists",
"singleValue": true
},
"leftValue": "={{ $json.text || $json.snippet }}",
"rightValue": ""
}
]
},
"looseTypeValidation": true
},
"typeVersion": 2.2
},
{
"id": "52802d59-e9a0-44ec-9ffc-0ecd1ad60354",
"name": "分类邮件",
"type": "@n8n/n8n-nodes-langchain.textClassifier",
"position": [
300,
280
],
"parameters": {
"options": {},
"inputText": "={{ $json.text || $json.snippet }}",
"categories": {
"categories": [
{
"category": "Matched User's Condition",
"description": "={{ $('Assign Processing Settings').item.json['Email Type Description'] }}"
},
{
"category": "Spam and Notifications",
"description": "Spam, automatic notifications, generic, non-personalized emails, non-personalized commercial offers, promotions, discounts"
}
]
}
},
"typeVersion": 1
},
{
"id": "0fe84425-5e0b-4eb7-b8fa-f6e8cc0bfee2",
"name": "是否存在文本字段?",
"type": "n8n-nodes-base.if",
"position": [
760,
200
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "9448b606-0961-4852-8917-408e5fef7df9",
"operator": {
"type": "string",
"operation": "exists",
"singleValue": true
},
"leftValue": "={{ $json.text }}",
"rightValue": ""
}
]
}
},
"typeVersion": 2.2
},
{
"id": "5759e919-6f02-49c3-9012-c3bdfa29f5a3",
"name": "从完整邮件文本聚合",
"type": "n8n-nodes-base.aggregate",
"position": [
980,
80
],
"parameters": {
"options": {},
"fieldsToAggregate": {
"fieldToAggregate": [
{
"renameField": true,
"outputFieldName": "from",
"fieldToAggregate": "from.text"
},
{
"renameField": true,
"outputFieldName": "text",
"fieldToAggregate": "text"
},
{
"renameField": true,
"outputFieldName": "date",
"fieldToAggregate": "date"
}
]
}
},
"typeVersion": 1
},
{
"id": "d38a14d2-118b-45cd-b6fa-f7ef3811e9ea",
"name": "从邮件摘要聚合",
"type": "n8n-nodes-base.aggregate",
"position": [
980,
360
],
"parameters": {
"options": {},
"fieldsToAggregate": {
"fieldToAggregate": [
{
"renameField": true,
"outputFieldName": "from",
"fieldToAggregate": "From"
},
{
"renameField": true,
"outputFieldName": "text",
"fieldToAggregate": "snippet"
},
{
"renameField": true,
"outputFieldName": "date",
"fieldToAggregate": "internalDate"
}
]
}
},
"typeVersion": 1
},
{
"id": "bb3ff757-5cfc-4d1e-9544-0ae411978c9f",
"name": "生成问题前等待",
"type": "n8n-nodes-base.wait",
"position": [
1980,
160
],
"webhookId": "c6d4fa4d-223a-47c3-b026-a002daa05b3b",
"parameters": {
"amount": 60
},
"typeVersion": 1.1
},
{
"id": "3c912db2-015b-4284-9c12-7fd0891bf2a6",
"name": "通过 Telegram 发送图谱链接和摘要",
"type": "n8n-nodes-base.telegram",
"onError": "continueRegularOutput",
"maxTries": 2,
"position": [
2800,
420
],
"webhookId": "51b1be86-6889-420c-b0c6-e95f9b464b97",
"parameters": {
"text": "=🧬 The knowledge graph is ready at [https://infranodus.com/your_user_name/{{ $('Assign Processing Settings').item.json[\"Graph Name\"] }}/edit](https://infranodus.com/your_user_name/{{ $('Assign Processing Settings').item.json[\"Graph Name\"] }}/edit)\n\nTopical Summary: \n{{ $('InfraNodus AI Summary & Graph Link').item.json.aiAdvice[0].text }}",
"chatId": "use_get_id_bot_to_get_it",
"additionalFields": {
"appendAttribution": false
}
},
"credentials": {
"telegramApi": {
"id": "UXVSOiGwy2SPh7Du",
"name": "Gmail Talker Bot"
}
},
"retryOnFail": true,
"typeVersion": 1.2
},
{
"id": "3d9ac1ee-cf79-4f2d-930b-76f6b4eb80f5",
"name": "通过 Telegram 发送洞察问题",
"type": "n8n-nodes-base.telegram",
"onError": "continueRegularOutput",
"maxTries": 2,
"position": [
2800,
680
],
"webhookId": "690e527e-3085-4b32-b1d1-ea2f70aa403f",
"parameters": {
"text": "=💎 Insight Question: \n{{ $json.aiAdvice[0].text }}\n \nMore at [https://infranodus.com/your_user_name/{{ $('Assign Processing Settings').item.json[\"Graph Name\"] }}/edit](https://infranodus.com/your_user_name/{{ $('Assign Processing Settings').item.json[\"Graph Name\"] }}/edit)",
"chatId": "use_get_id_bot_to_get_it",
"additionalFields": {
"appendAttribution": false
}
},
"credentials": {
"telegramApi": {
"id": "UXVSOiGwy2SPh7Du",
"name": "Gmail Talker Bot"
}
},
"retryOnFail": true,
"typeVersion": 1.2
},
{
"id": "85e994c5-8762-4e07-89e0-a91742e1c4aa",
"name": "按搜索条件获取消息",
"type": "n8n-nodes-base.gmail",
"notes": "// use this is a filter to retrieve yesterday's date\n// change the number 1 below to the number of days to go behind\n{{ \n (() => {\n const yesterday = new Date();\n yesterday.setDate(yesterday.getDate() - 1);\n return `after:${yesterday.getFullYear()}/${(yesterday.getMonth() + 1).toString().padStart(2, '0')}/${yesterday.getDate().toString().padStart(2, '0')}`;\n })()\n}}",
"position": [
-1280,
320
],
"webhookId": "083fdee4-dcae-4366-8550-8df8dbe29fa2",
"parameters": {
"filters": {
"q": "={{ $json[\"Search Criteria\"] }}"
},
"operation": "getAll",
"returnAll": true
},
"credentials": {
"gmailOAuth2": {
"id": "pL8OjzEMWakSY1Nk",
"name": "Gmail paranyushkin"
}
},
"typeVersion": 2.1
},
{
"id": "229bf0ac-7371-443b-9d4c-c2774d184116",
"name": "用户提交表单",
"type": "n8n-nodes-base.formTrigger",
"disabled": true,
"position": [
-1940,
300
],
"webhookId": "84c4d21b-e825-42f0-a73b-c9a837ec8da3",
"parameters": {
"options": {
"appendAttribution": false,
"respondWithOptions": {
"values": {
"formSubmittedText": "Thank you, you will receive a summary via Telegram in a moment, once the analysis is ready."
}
}
},
"formTitle": "Generate a Visual Summary of Your Mailbox",
"formFields": {
"values": [
{
"fieldLabel": "Search Criteria",
"placeholder": "e.g. from:email@gmail.com after:2025/06/01 label:personal"
},
{
"fieldLabel": "Label Filter",
"placeholder": "SENT, CATEGORY_PERSONAL - for additional filtering"
},
{
"fieldLabel": "Email Type Description",
"placeholder": "Anything that relates to my work on various projects"
},
{
"fieldType": "dropdown",
"fieldLabel": "Analyze Full Email Text?",
"fieldOptions": {
"values": [
{
"option": "Yes"
}
]
}
},
{
"fieldType": "dropdown",
"fieldLabel": "Build a Social Graph?",
"fieldOptions": {
"values": [
{
"option": "Yes"
}
]
}
},
{
"fieldLabel": "Graph Name",
"placeholder": "e.g. n8n_gmail_search"
}
]
},
"authentication": "basicAuth",
"formDescription": "Build a knowledge graph from your Gmail mails based on search criteria, label, date, and email type. Generate topical summary and insight questions."
},
"credentials": {
"httpBasicAuth": {
"id": "dnRnDRFSRoubvTh8",
"name": "Basic n8n Form Auth"
}
},
"typeVersion": 2.2
},
{
"id": "423739ac-e4a8-4890-b1ef-851fb7b56e86",
"name": "InfraNodus AI 摘要和图谱链接",
"type": "n8n-nodes-base.httpRequest",
"position": [
2240,
200
],
"parameters": {
"url": "https://infranodus.com/api/v1/graphAndAdvice?doNotSave=true&optimize=summary&includeGraph=false&includeGraphSummary=true",
"method": "POST",
"options": {},
"sendBody": true,
"authentication": "genericCredentialType",
"bodyParameters": {
"parameters": [
{
"name": "aiTopics",
"value": "true"
},
{
"name": "requestMode",
"value": "graph summary"
},
{
"name": "name",
"value": "={{ $('Assign Processing Settings').item.json[\"Graph Name\"] }}"
}
]
},
"genericAuthType": "httpBearerAuth"
},
"credentials": {
"httpBearerAuth": {
"id": "FPDx6PA5CtzGEIQc",
"name": "InfraNodus DeeMeeTree API Key"
}
},
"typeVersion": 4.2
},
{
"id": "177e9479-176c-434b-8082-b7cebd315c4b",
"name": "要构建的图谱类型",
"type": "n8n-nodes-base.switch",
"position": [
1460,
260
],
"parameters": {
"rules": {
"values": [
{
"outputKey": "social knowledge graph",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "76bf82df-009a-4714-819c-ec9159f39f72",
"operator": {
"type": "string",
"operation": "notEmpty",
"singleValue": true
},
"leftValue": "={{ $('Assign Processing Settings').item.json['Build a Social Graph?'] }}",
"rightValue": ""
}
]
},
"renameOutput": true
},
{
"outputKey": "text knowledge graph",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "49ca2845-be5b-40ad-b6b4-c2a4e45f4f77",
"operator": {
"type": "string",
"operation": "empty",
"singleValue": true
},
"leftValue": "={{ $('Assign Processing Settings').item.json['Build a Social Graph?'] }}",
"rightValue": ""
}
]
},
"renameOutput": true
}
]
},
"options": {}
},
"typeVersion": 3.2
},
{
"id": "2b2b0d12-296d-4d11-9a5e-13c9b411f1bb",
"name": "InfraNodus 构建社交知识图谱",
"type": "n8n-nodes-base.httpRequest",
"position": [
1720,
160
],
"parameters": {
"url": "https://infranodus.com/api/v1/graphAndStatements?doNotSave=false&includeGraph=false&includeGraphSummary=true&includeStatements=false",
"method": "POST",
"options": {},
"sendBody": true,
"authentication": "genericCredentialType",
"bodyParameters": {
"parameters": [
{
"name": "name",
"value": "={{ $('Assign Processing Settings').item.json[\"Graph Name\"] }}"
},
{
"name": "statements",
"value": "={{ $json.statements }}"
},
{
"name": "contextSettings",
"value": "={{{ \"partOfSpeechToProcess\":\"HASHTAGS_AND_WORDS\", \"doubleSquarebracketsProcessing\":\"PROCESS_AS_MENTIONS\"} }}"
}
]
},
"genericAuthType": "httpBearerAuth"
},
"credentials": {
"httpBearerAuth": {
"id": "FPDx6PA5CtzGEIQc",
"name": "InfraNodus DeeMeeTree API Key"
}
},
"typeVersion": 4.2
},
{
"id": "8fec6156-93e0-410b-b91a-6d378b70d369",
"name": "InfraNodus 构建文本知识图谱",
"type": "n8n-nodes-base.httpRequest",
"position": [
1720,
460
],
"parameters": {
"url": "https://infranodus.com/api/v1/graphAndStatements?doNotSave=false&includeGraph=false&includeGraphSummary=true&includeStatements=false",
"method": "POST",
"options": {},
"sendBody": true,
"authentication": "genericCredentialType",
"bodyParameters": {
"parameters": [
{
"name": "name",
"value": "={{ $('Assign Processing Settings').item.json[\"Graph Name\"] }}"
},
{
"name": "statements",
"value": "={{ $json.statements }}"
},
{
"name": "contextSettings",
"value": "={{{ \"partOfSpeechToProcess\":\"HASHTAGS_AND_WORDS\", \"doubleSquarebracketsProcessing\":\"EXCLUDE\", \"mentionsProcessing\":\"EXCLUDE\"} }}"
}
]
},
"genericAuthType": "httpBearerAuth"
},
"credentials": {
"httpBearerAuth": {
"id": "FPDx6PA5CtzGEIQc",
"name": "InfraNodus DeeMeeTree API Key"
}
},
"typeVersion": 4.2
},
{
"id": "23d3c594-1416-486c-961e-55dbf0714b4d",
"name": "当点击\"测试工作流\"时",
"type": "n8n-nodes-base.manualTrigger",
"position": [
-1940,
720
],
"parameters": {},
"typeVersion": 1
},
{
"id": "be89719e-e217-4c28-9d71-ddcda1b4606d",
"name": "分配处理设置",
"type": "n8n-nodes-base.set",
"notes": "// script to generate a date \n// minus -1 is the days before\n\n(() => {\n const yesterday = new Date();\n yesterday.setDate(yesterday.getDate() - 7);\n return `after:${yesterday.getFullYear()}/${(yesterday.getMonth() + 1).toString().padStart(2, '0')}/${yesterday.getDate().toString().padStart(2, '0')}`;\n })()",
"position": [
-1560,
540
],
"parameters": {
"mode": "raw",
"options": {},
"jsonOutput": "={\n \"Label Filter\": \"{{ $json[\"Label Filter\"] !== undefined ? $json[\"Label Filter\"] : `CATEGORY_PERSONAL`}}\",\n \"Email Type Description\": \"{{ $json[\"Email Type Description\"] !== undefined ? $json[\"Email Type Description\"] : `Important personalized emails, exclude mailouts and non-urgent notifications` }}\",\n \"Analyze Full Email Text?\": \"{{ $json[\"Analyze Full Email Text?\"] !== undefined ? $json[\"Analyze Full Email Text?\"] : ``}}\",\n \"Build a Social Graph?\": \"{{ $json[\"Build a Social Graph?\"] !== undefined ? $json[\"Build a Social Graph?\"] : `Yes`}}\",\n \"Search Criteria\": \"{{ $json[\"Search Criteria\"] !== undefined ? $json[\"Search Criteria\"] :\n (() => {\n const yesterday = new Date();\n yesterday.setDate(yesterday.getDate() - 1);\n return `after:${yesterday.getFullYear()}/${(yesterday.getMonth() + 1).toString().padStart(2, '0')}/${yesterday.getDate().toString().padStart(2, '0')}`;\n })()\n}}\",\n \"Graph Name\": \"{{ $json[\"Graph Name\"] !== undefined ? $json[\"Graph Name\"] : `n8n_gmail_search_` + $now.toString().split('T')[0] }}\"\n}"
},
"typeVersion": 3.4
},
{
"id": "a1b0c1c6-efd1-4d77-91d3-6f29565ea3ed",
"name": "由 Github 模型提供支持",
"type": "n8n-nodes-base.scheduleTrigger",
"disabled": true,
"position": [
-1940,
500
],
"parameters": {
"rule": {
"interval": [
{
"triggerAtHour": 10
}
]
}
},
"typeVersion": 1.2
},
{
"id": "f2401504-38c5-4368-84bb-738082abd50c",
"name": "便签2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1620,
-240
],
"parameters": {
"width": 220,
"height": 960,
"content": "## 2. 过滤设置"
},
"typeVersion": 1
},
{
"id": "893fa8d1-935e-4671-83f5-a0fc5a5d2e7f",
"name": "便签3",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1360,
-240
],
"parameters": {
"width": 600,
"height": 960,
"content": "## 3. 获取 Gmail 消息"
},
"typeVersion": 1
},
{
"id": "a016b287-db0c-4ef7-ba73-381890c7a6a7",
"name": "便签4",
"type": "n8n-nodes-base.stickyNote",
"position": [
-660,
-240
],
"parameters": {
"width": 540,
"height": 960,
"content": "## 4. 分析摘要还是全文?"
},
"typeVersion": 1
},
{
"id": "298cf343-afb4-4c8f-b164-a0bb827c7d7c",
"name": "便签5",
"type": "n8n-nodes-base.stickyNote",
"position": [
-60,
-240
],
"parameters": {
"width": 660,
"height": 960,
"content": "## 5. 使用 AI 分类器过滤邮件?"
},
"typeVersion": 1
},
{
"id": "4306e643-4055-4f69-8393-322f70e5e035",
"name": "### 需要帮助?",
"type": "n8n-nodes-base.stickyNote",
"position": [
680,
-240
],
"parameters": {
"width": 660,
"height": 960,
"content": "## 6. 格式化文本或摘要"
},
"typeVersion": 1
},
{
"id": "ba5a3dbc-2502-46fd-8b66-c975b696bb15",
"name": "## 试试看!",
"type": "n8n-nodes-base.stickyNote",
"position": [
1380,
-240
],
"parameters": {
"width": 540,
"height": 1340,
"content": "## 7. 构建知识图谱"
},
"typeVersion": 1
},
{
"id": "42e1981f-2d8f-4260-b6df-8d625f7cab0a",
"name": "GET 模型",
"type": "n8n-nodes-base.stickyNote",
"position": [
2140,
-240
],
"parameters": {
"width": 480,
"height": 1340,
"content": "## 8. 使用 InfraNodus 生成主题摘要和洞察问题"
},
"typeVersion": 1
},
{
"id": "06c11eea-d17a-4342-990a-f3ecf978a594",
"name": "## 1. 创建新的自定义 OpenAI 凭据",
"type": "n8n-nodes-base.stickyNote",
"position": [
2720,
-240
],
"parameters": {
"width": 300,
"height": 1340,
"content": "## 9. 通过 Telegram 和电子邮件发送洞察和图谱链接"
},
"typeVersion": 1
},
{
"id": "c5072e2a-0848-43b9-bbc5-88c99947fece",
"name": "便签10",
"type": "n8n-nodes-base.stickyNote",
"position": [
-660,
-880
],
"parameters": {
"color": 7,
"width": 1260,
"height": 600,
"content": "## 知识图谱类型"
},
"typeVersion": 1
},
{
"id": "c2f7946d-a08d-4c63-93fc-0296adad0e86",
"name": "Gmail",
"type": "n8n-nodes-base.gmail",
"onError": "continueRegularOutput",
"position": [
2800,
200
],
"webhookId": "9ecdabd6-c4bc-4bff-81c9-14ba07a2b947",
"parameters": {
"sendTo": "your_own_email_2912319@email.com",
"message": "=Hello\n\nHere is a visual knowledge graph summary of your emails as of {{$now.toString().split('T')[0]}}: \nhttps://infranodus.com/your_user_name/{{ $('Assign Processing Settings').item.json[\"Graph Name\"] }}/edit\n\nTopical summary:\n{{ $('InfraNodus AI Summary & Graph Link').item.json.aiAdvice[0].text }}\n\nResearch questions:\n{{ $json.aiAdvice[0].text }}\n\n",
"options": {},
"subject": "=Email Summary as of {{$now.toString().split('T')[0]}}",
"emailType": "text"
},
"credentials": {
"gmailOAuth2": {
"id": "w7b4H8WpgY9Oit56",
"name": "Gmail supadelicious"
}
},
"typeVersion": 2.1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "d35db610-8926-4980-834f-662656aa7f75",
"connections": {
"Classify Emails": {
"main": [
[
{
"node": "Text field present?",
"type": "main",
"index": 0
}
]
]
},
"Schedule Trigger": {
"main": [
[
{
"node": "Assign Processing Settings",
"type": "main",
"index": 0
}
]
]
},
"User submits form": {
"main": [
[
{
"node": "Assign Processing Settings",
"type": "main",
"index": 0
}
]
]
},
"Text field present?": {
"main": [
[
{
"node": "Aggregate from full email texts",
"type": "main",
"index": 0
}
],
[
{
"node": "Aggregate from email snippets",
"type": "main",
"index": 0
}
]
]
},
"Was label provided?": {
"main": [
[
{
"node": "Filter emails by label",
"type": "main",
"index": 0
}
],
[
{
"node": "Should analyze snippets?",
"type": "main",
"index": 0
}
]
]
},
"Filter emails by label": {
"main": [
[
{
"node": "Should analyze snippets from filtered emails?",
"type": "main",
"index": 0
}
]
]
},
"Type of graph to build": {
"main": [
[
{
"node": "InfraNodus Build a Social Knowledge Graph",
"type": "main",
"index": 0
}
],
[
{
"node": "InfraNodus Build a Text Knowledge Graph",
"type": "main",
"index": 0
}
]
]
},
"Get Full Message Content": {
"main": [
[
{
"node": "Should use AI to filter emails further?",
"type": "main",
"index": 0
}
]
]
},
"Google Gemini Chat Model": {
"ai_languageModel": [
[
{
"node": "Classify Emails",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Should analyze snippets?": {
"main": [
[
{
"node": "Should use AI to filter emails further?",
"type": "main",
"index": 0
}
],
[
{
"node": "Get Full Message Content",
"type": "main",
"index": 0
}
]
]
},
"Assign Processing Settings": {
"main": [
[
{
"node": "Get Messages by Search Criteria",
"type": "main",
"index": 0
}
]
]
},
"Aggregate from email snippets": {
"main": [
[
{
"node": "Clean text and organize into statements",
"type": "main",
"index": 0
}
]
]
},
"InfraNodus Question Generator": {
"main": [
[
{
"node": "Send an insight question via Telegram",
"type": "main",
"index": 0
},
{
"node": "Send the graph link and summary via Telegram",
"type": "main",
"index": 0
},
{
"node": "Gmail",
"type": "main",
"index": 0
}
]
]
},
"Aggregate from full email texts": {
"main": [
[
{
"node": "Clean text and organize into statements",
"type": "main",
"index": 0
}
]
]
},
"Get Messages by Search Criteria": {
"main": [
[
{
"node": "Was label provided?",
"type": "main",
"index": 0
}
]
]
},
"Message text or snippet present?": {
"main": [
[
{
"node": "Classify Emails",
"type": "main",
"index": 0
}
]
]
},
"Wait before generating questions": {
"main": [
[
{
"node": "InfraNodus AI Summary & Graph Link",
"type": "main",
"index": 0
}
]
]
},
"When clicking ‘Test workflow’": {
"main": [
[
{
"node": "Assign Processing Settings",
"type": "main",
"index": 0
}
]
]
},
"InfraNodus AI Summary & Graph Link": {
"main": [
[
{
"node": "InfraNodus Question Generator",
"type": "main",
"index": 0
}
]
]
},
"Send an insight question via Telegram": {
"main": [
[]
]
},
"Clean text and organize into statements": {
"main": [
[
{
"node": "Type of graph to build",
"type": "main",
"index": 0
}
]
]
},
"InfraNodus Build a Text Knowledge Graph": {
"main": [
[
{
"node": "Wait before generating questions",
"type": "main",
"index": 0
}
]
]
},
"Should use AI to filter emails further?": {
"main": [
[
{
"node": "Message text or snippet present?",
"type": "main",
"index": 0
}
],
[
{
"node": "Text field present?",
"type": "main",
"index": 0
}
]
]
},
"InfraNodus Build a Social Knowledge Graph": {
"main": [
[
{
"node": "Wait before generating questions",
"type": "main",
"index": 0
}
]
]
},
"Send the graph link and summary via Telegram": {
"main": [
[]
]
},
"Should analyze snippets from filtered emails?": {
"main": [
[
{
"node": "Should use AI to filter emails further?",
"type": "main",
"index": 0
}
],
[
{
"node": "Get Full Message Content",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
高级 - 其他, 人工智能
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
在可视化参考库中探索n8n节点
在可视化参考库中探索n8n节点
If
Ftp
Set
+93
113 节点I versus AI
其他
标记接收邮件,构建知识图谱,通过Telegram通知
使用Gemini AI自动化Gmail标记并构建InfraNodus知识图谱,通过Telegram发送提醒
Code
Wait
Gmail
+8
28 节点InfraNodus
其他
API架构提取器
API架构提取器
If
Set
Code
+22
88 节点Polina Medvedieva
工程
(Duc)深度研究市场模板
集成PerplexityAI研究和OpenAI内容的多层级WordPress博客生成器
If
Set
Xml
+28
132 节点Daniel Ng
人工智能
潜在客户开发与邮件工作流
使用Google Maps、SendGrid和AI自动化B2B潜在客户开发与邮件营销
If
Set
Code
+21
141 节点Ezema Kingsley Chibuzo
潜在客户开发
LinkedIn和X病毒内容自动引擎
使用AI生成和发布自动创建LinkedIn和X的病毒内容
If
Set
Wait
+26
156 节点Diptamoy Barman
内容创作
工作流信息
难度等级
高级
节点数量38
分类2
节点类型16
作者
InfraNodus
@infranodusI'm Dmitry, the founder of InfraNodus — an AI text network analysis tool. I'm passionate about networks and data visualization and its ability to reveal what everyone else is missing and to highlight different perspectives. I'm sharing the n8n templates that make use of this unique capability of InfraNodus for multiple scenarios.
外部链接
在 n8n.io 查看 →
分享此工作流