Outlook和Notion知识库
高级
这是一个自动化工作流,包含 32 个节点。主要使用 If, Merge, Notion, SplitOut, NotionTrigger 等节点。 使用Pinecone和GPT-4从Outlook和Notion构建AI就绪知识库
前置要求
- •Notion API Key
- •OpenAI API Key
- •Pinecone API Key
使用的节点 (32)
分类
-
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"id": "xA9J9DImm49HURF3",
"meta": {
"instanceId": "6f81894254c2852bfe28b07fc1f6652b03481706dd714d6609cc88e8521956d2",
"templateCredsSetupCompleted": true
},
"name": "Outlook 和 Notion 知识库",
"tags": [],
"nodes": [
{
"id": "72f3f684-2c5f-4660-8adb-19174e82ef32",
"name": "Microsoft Outlook 触发器",
"type": "n8n-nodes-base.microsoftOutlookTrigger",
"position": [
544,
208
],
"parameters": {
"output": "raw",
"filters": {
"foldersToInclude": [
"AQMkADAwATMwMAItMmYwYS01YjkyLTAwAi0wMAoALgAAAxOU_onpis9NmFJuGkXBI8UBAGQVofbxt59GpSnWTziHe9kABPqpFlEAAAA="
]
},
"options": {
"downloadAttachments": true
},
"pollTimes": {
"item": [
{
"mode": "everyMinute"
}
]
}
},
"credentials": {
"microsoftOutlookOAuth2Api": {
"id": "Xszt4lrcCVADugZs",
"name": "Microsoft Outlook account"
}
},
"typeVersion": 1
},
{
"id": "82792010-19d2-491d-927e-610ab1cccb28",
"name": "获取多条消息",
"type": "n8n-nodes-base.microsoftOutlook",
"position": [
752,
208
],
"webhookId": "62988410-1616-4217-8ef2-0107e7677407",
"parameters": {
"output": "raw",
"options": {},
"filtersUI": {
"values": {
"filters": {
"custom": "=conversationId eq '{{ $json.conversationId }}'"
}
}
},
"operation": "getAll",
"returnAll": true
},
"credentials": {
"microsoftOutlookOAuth2Api": {
"id": "Xszt4lrcCVADugZs",
"name": "Microsoft Outlook account"
}
},
"typeVersion": 2
},
{
"id": "256a55fc-6625-4388-9389-94184848c544",
"name": "Pinecone Vector Store",
"type": "@n8n/n8n-nodes-langchain.vectorStorePinecone",
"position": [
1216,
208
],
"parameters": {
"mode": "insert",
"options": {
"pineconeNamespace": "emails"
},
"pineconeIndex": {
"__rl": true,
"mode": "list",
"value": "n8n",
"cachedResultName": "n8n"
},
"embeddingBatchSize": 50
},
"credentials": {
"pineconeApi": {
"id": "4rb1dBTjp60vz23a",
"name": "PineconeApi account"
}
},
"typeVersion": 1.3
},
{
"id": "3c1cfd55-b6e1-4adf-8ee1-c25b5202018b",
"name": "Embeddings Cohere",
"type": "@n8n/n8n-nodes-langchain.embeddingsCohere",
"position": [
1168,
384
],
"parameters": {
"modelName": "embed-multilingual-v3.0"
},
"credentials": {
"cohereApi": {
"id": "Mfs4k8hXGehRHvHh",
"name": "CohereApi account"
}
},
"typeVersion": 1
},
{
"id": "d8a46692-2af5-477c-acb1-1b6390c0c359",
"name": "默认数据加载器",
"type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
"position": [
1312,
400
],
"parameters": {
"options": {},
"jsonData": "={{ $json.body.content }}",
"jsonMode": "expressionData",
"textSplittingMode": "custom"
},
"typeVersion": 1.1
},
{
"id": "bda4ca91-117f-4527-b25d-c85908e50892",
"name": "递归字符文本分割器",
"type": "@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter",
"position": [
1392,
544
],
"parameters": {
"options": {},
"chunkOverlap": 100
},
"typeVersion": 1
},
{
"id": "ba74aea5-ec1c-4f63-92d8-98d6bb65805b",
"name": "Notion 触发器",
"type": "n8n-nodes-base.notionTrigger",
"position": [
160,
-16
],
"parameters": {
"simple": false,
"pollTimes": {
"item": [
{
"mode": "everyMinute"
}
]
},
"databaseId": {
"__rl": true,
"mode": "list",
"value": "6ec8b622-d5bf-4c6a-80d9-7d668494f82b",
"cachedResultUrl": "https://www.notion.so/6ec8b622d5bf4c6a80d97d668494f82b",
"cachedResultName": "test database"
}
},
"credentials": {
"notionApi": {
"id": "6dqyQ9MMtK9ou9ab",
"name": "Notion account"
}
},
"typeVersion": 1
},
{
"id": "7dcc8513-8db2-4f86-828f-35d02df20276",
"name": "Pinecone Vector Store1",
"type": "@n8n/n8n-nodes-langchain.vectorStorePinecone",
"position": [
160,
192
],
"parameters": {
"mode": "insert",
"options": {
"pineconeNamespace": "knkowledgebase"
},
"pineconeIndex": {
"__rl": true,
"mode": "list",
"value": "n8n",
"cachedResultName": "n8n"
},
"embeddingBatchSize": 50
},
"credentials": {
"pineconeApi": {
"id": "4rb1dBTjp60vz23a",
"name": "PineconeApi account"
}
},
"typeVersion": 1.3
},
{
"id": "fb314465-be01-4153-ae6b-21c20b24bff2",
"name": "Cohere 嵌入1",
"type": "@n8n/n8n-nodes-langchain.embeddingsCohere",
"position": [
112,
368
],
"parameters": {
"modelName": "embed-multilingual-v3.0"
},
"credentials": {
"cohereApi": {
"id": "Mfs4k8hXGehRHvHh",
"name": "CohereApi account"
}
},
"typeVersion": 1
},
{
"id": "8eb8639d-ef28-46e9-ab53-a1f80439e7d0",
"name": "默认数据加载器1",
"type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
"position": [
256,
384
],
"parameters": {
"options": {},
"jsonData": "={{ $json.plain_text }}",
"jsonMode": "expressionData",
"textSplittingMode": "custom"
},
"typeVersion": 1.1
},
{
"id": "11de6d57-20fc-4992-91e5-86bdb33ce145",
"name": "递归字符文本分割器1",
"type": "@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter",
"position": [
352,
544
],
"parameters": {
"options": {},
"chunkOverlap": 100
},
"typeVersion": 1
},
{
"id": "8ac03efa-6af8-4139-837d-05adc99f1c79",
"name": "移除重复项",
"type": "n8n-nodes-base.removeDuplicates",
"position": [
960,
208
],
"parameters": {
"compare": "selectedFields",
"options": {},
"fieldsToCompare": "body.content"
},
"typeVersion": 2
},
{
"id": "8a1a6569-f578-4037-8464-728a52ea0d3e",
"name": "拆分输出",
"type": "n8n-nodes-base.splitOut",
"position": [
1312,
-16
],
"parameters": {
"options": {},
"fieldToSplitOut": "paragraph.text"
},
"typeVersion": 1
},
{
"id": "36e5c0f6-7c24-442c-95c2-f88d23c1c83f",
"name": "获取多个子块",
"type": "n8n-nodes-base.notion",
"position": [
368,
-16
],
"parameters": {
"blockId": {
"__rl": true,
"mode": "id",
"value": "={{ $json.id }}"
},
"resource": "block",
"operation": "getAll",
"returnAll": true,
"simplifyOutput": false,
"fetchNestedBlocks": true
},
"credentials": {
"notionApi": {
"id": "6dqyQ9MMtK9ou9ab",
"name": "Notion account"
}
},
"typeVersion": 2.2
},
{
"id": "8015c6e9-7cd8-4e09-86ee-206cae5e2ab6",
"name": "如果",
"type": "n8n-nodes-base.if",
"position": [
576,
-16
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "79a2b3f0-09f8-42b5-911d-85a27d04f121",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.type }}",
"rightValue": "synced_block"
}
]
}
},
"typeVersion": 2.2
},
{
"id": "d4780200-8ee0-4fe4-bbaf-defac32f558f",
"name": "获取多个子块1",
"type": "n8n-nodes-base.notion",
"position": [
848,
-144
],
"parameters": {
"blockId": {
"__rl": true,
"mode": "id",
"value": "={{ $json.synced_block.synced_from.block_id }}"
},
"resource": "block",
"operation": "getAll",
"returnAll": true,
"simplifyOutput": false,
"fetchNestedBlocks": true
},
"credentials": {
"notionApi": {
"id": "6dqyQ9MMtK9ou9ab",
"name": "Notion account"
}
},
"typeVersion": 2.2
},
{
"id": "d81a6b16-36dd-4b3a-b1f8-937bf0a6f67a",
"name": "移除重复项1",
"type": "n8n-nodes-base.removeDuplicates",
"position": [
1520,
-16
],
"parameters": {
"compare": "selectedFields",
"options": {},
"fieldsToCompare": "plain_text"
},
"typeVersion": 2
},
{
"id": "c66e5310-f1b7-4591-9f62-a3c10b12d494",
"name": "合并",
"type": "n8n-nodes-base.merge",
"position": [
1104,
-16
],
"parameters": {},
"typeVersion": 3.2
},
{
"id": "437d367e-b497-4a47-974a-ca2e992723b7",
"name": "便签",
"type": "n8n-nodes-base.stickyNote",
"position": [
512,
192
],
"parameters": {
"width": 1056,
"height": 496,
"content": ""
},
"typeVersion": 1
},
{
"id": "284ec18f-19dc-4168-b209-19b9f4869ad6",
"name": "便签1",
"type": "n8n-nodes-base.stickyNote",
"position": [
560,
448
],
"parameters": {
"color": 5,
"width": 496,
"height": 208,
"content": "## Outlook 知识库"
},
"typeVersion": 1
},
{
"id": "8e739795-7835-4739-ba22-b55aa7cdb646",
"name": "AI 代理",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
1744,
432
],
"parameters": {
"options": {
"systemMessage": "You are a helpful assistant. Your role is to answer the customer questions based on the knowledge base you have access to through the tools you have. If you don't find the answer in the knowledge base or previous emails don't come up with answer just tell the customer that you don't have this information."
}
},
"typeVersion": 2.2
},
{
"id": "6d9a6b4c-6ba1-4c2f-9dbd-a7ee2c7ae881",
"name": "当收到聊天消息时",
"type": "@n8n/n8n-nodes-langchain.chatTrigger",
"position": [
1696,
208
],
"webhookId": "97cff992-376f-49c6-8b57-34236a096e5d",
"parameters": {
"options": {}
},
"typeVersion": 1.3
},
{
"id": "85c8d7d3-e978-49f1-b4c5-ed0fcd9922af",
"name": "Pinecone Vector Store2",
"type": "@n8n/n8n-nodes-langchain.vectorStorePinecone",
"position": [
2000,
640
],
"parameters": {
"mode": "retrieve-as-tool",
"options": {
"pineconeNamespace": "knowledgebase"
},
"pineconeIndex": {
"__rl": true,
"mode": "list",
"value": "n8n",
"cachedResultName": "n8n"
},
"toolDescription": "use this tool to look at your knowledge base."
},
"credentials": {
"pineconeApi": {
"id": "4rb1dBTjp60vz23a",
"name": "PineconeApi account"
}
},
"typeVersion": 1.3
},
{
"id": "2e1dad6b-adc1-43df-ab9a-af763fdb6021",
"name": "Embeddings Cohere2",
"type": "@n8n/n8n-nodes-langchain.embeddingsCohere",
"position": [
1936,
784
],
"parameters": {
"modelName": "embed-multilingual-v3.0"
},
"credentials": {
"cohereApi": {
"id": "Mfs4k8hXGehRHvHh",
"name": "CohereApi account"
}
},
"typeVersion": 1
},
{
"id": "ce453bb0-fdb7-4170-9a15-2a3a154e12cb",
"name": "Pinecone Vector Store3",
"type": "@n8n/n8n-nodes-langchain.vectorStorePinecone",
"position": [
1744,
640
],
"parameters": {
"mode": "retrieve-as-tool",
"options": {
"pineconeNamespace": "emails"
},
"pineconeIndex": {
"__rl": true,
"mode": "list",
"value": "n8n",
"cachedResultName": "n8n"
},
"toolDescription": "use this tool to look at similar emails."
},
"credentials": {
"pineconeApi": {
"id": "4rb1dBTjp60vz23a",
"name": "PineconeApi account"
}
},
"typeVersion": 1.3
},
{
"id": "7329af25-ba0d-445d-9318-fb63991a19e9",
"name": "OpenAI 聊天模型",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
1632,
640
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4.1-mini"
},
"options": {}
},
"credentials": {
"openAiApi": {
"id": "6ljetIXS9Oig1w9v",
"name": "OpenAi cred"
}
},
"typeVersion": 1.2
},
{
"id": "e0aee61b-469e-40cb-b609-8e4f641cecc8",
"name": "便签2",
"type": "n8n-nodes-base.stickyNote",
"position": [
1584,
192
],
"parameters": {
"color": 4,
"width": 688,
"height": 736,
"content": ""
},
"typeVersion": 1
},
{
"id": "39399055-a8e4-4dd7-8ac2-e46868d9aa6a",
"name": "便签3",
"type": "n8n-nodes-base.stickyNote",
"position": [
1936,
208
],
"parameters": {
"color": 5,
"width": 272,
"height": 208,
"content": "## 客户支持代理"
},
"typeVersion": 1
},
{
"id": "17553913-1e31-4bbd-8acb-3d8586761814",
"name": "便签4",
"type": "n8n-nodes-base.stickyNote",
"position": [
160,
-240
],
"parameters": {
"color": 5,
"width": 496,
"height": 192,
"content": "## Notion 知识库"
},
"typeVersion": 1
},
{
"id": "31ff5834-459d-4081-a20f-3c3965469c4d",
"name": "便签5",
"type": "n8n-nodes-base.stickyNote",
"position": [
64,
-256
],
"parameters": {
"color": 3,
"width": 816,
"height": 960,
"content": ""
},
"typeVersion": 1
},
{
"id": "044d57f3-cb61-4f1c-a584-fc1b2aed3c59",
"name": "### 需要帮助?",
"type": "n8n-nodes-base.stickyNote",
"position": [
880,
-256
],
"parameters": {
"color": 3,
"width": 800,
"height": 432,
"content": ""
},
"typeVersion": 1
},
{
"id": "a7a7243c-19b4-4006-a8a0-3c28e542e66f",
"name": "简单记忆",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"position": [
1712,
784
],
"parameters": {},
"typeVersion": 1.3
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "0f6bfeb3-c551-41ef-9cce-351a0ce86f09",
"connections": {
"If": {
"main": [
[
{
"node": "Get many child blocks1",
"type": "main",
"index": 0
}
],
[
{
"node": "Merge",
"type": "main",
"index": 1
}
]
]
},
"Merge": {
"main": [
[
{
"node": "Split Out",
"type": "main",
"index": 0
}
]
]
},
"Split Out": {
"main": [
[
{
"node": "Remove Duplicates1",
"type": "main",
"index": 0
}
]
]
},
"Simple Memory": {
"ai_memory": [
[
{
"node": "AI Agent",
"type": "ai_memory",
"index": 0
}
]
]
},
"Notion Trigger": {
"main": [
[
{
"node": "Get many child blocks",
"type": "main",
"index": 0
}
]
]
},
"Embeddings Cohere": {
"ai_embedding": [
[
{
"node": "Pinecone Vector Store",
"type": "ai_embedding",
"index": 0
}
]
]
},
"Get many messages": {
"main": [
[
{
"node": "Remove Duplicates",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "AI Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Remove Duplicates": {
"main": [
[
{
"node": "Pinecone Vector Store",
"type": "main",
"index": 0
}
]
]
},
"Embeddings Cohere1": {
"ai_embedding": [
[
{
"node": "Pinecone Vector Store1",
"type": "ai_embedding",
"index": 0
}
]
]
},
"Embeddings Cohere2": {
"ai_embedding": [
[
{
"node": "Pinecone Vector Store2",
"type": "ai_embedding",
"index": 0
},
{
"node": "Pinecone Vector Store3",
"type": "ai_embedding",
"index": 0
}
]
]
},
"Remove Duplicates1": {
"main": [
[
{
"node": "Pinecone Vector Store1",
"type": "main",
"index": 0
}
]
]
},
"Default Data Loader": {
"ai_document": [
[
{
"node": "Pinecone Vector Store",
"type": "ai_document",
"index": 0
}
]
]
},
"Default Data Loader1": {
"ai_document": [
[
{
"node": "Pinecone Vector Store1",
"type": "ai_document",
"index": 0
}
]
]
},
"Get many child blocks": {
"main": [
[
{
"node": "If",
"type": "main",
"index": 0
}
]
]
},
"Get many child blocks1": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 0
}
]
]
},
"Pinecone Vector Store2": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Pinecone Vector Store3": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Microsoft Outlook Trigger": {
"main": [
[
{
"node": "Get many messages",
"type": "main",
"index": 0
}
]
]
},
"When chat message received": {
"main": [
[
{
"node": "AI Agent",
"type": "main",
"index": 0
}
]
]
},
"Recursive Character Text Splitter": {
"ai_textSplitter": [
[
{
"node": "Default Data Loader",
"type": "ai_textSplitter",
"index": 0
}
]
]
},
"Recursive Character Text Splitter1": {
"ai_textSplitter": [
[
{
"node": "Default Data Loader1",
"type": "ai_textSplitter",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
高级
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
在可视化参考库中探索n8n节点
在可视化参考库中探索n8n节点
If
Ftp
Set
+93
113 节点I versus AI
其他
基于AI的MIS代理
基于AI的管理信息系统代理
If
Set
Code
+29
129 节点Kumar Shivam
客户支持
AI智能助手:与Supabase存储和Google Drive文件对话
AI智能助手:与Supabase存储和Google Drive文件对话
If
Set
Wait
+20
62 节点Mark Shcherbakov
工程
AI邮件自动回复系统 - 邮箱RAG智能代理
AI邮件自动回复系统 - 邮箱RAG智能代理
If
Set
Gmail
+18
34 节点LukaszB
客户支持
⚡AI驱动的YouTube播放列表和视频摘要与分析v2
AI YouTube播放列表与视频分析聊天机器人
If
Set
Code
+20
72 节点dmr
其他
基于AI的WhatsApp支持机器人(Google Sheets工单创建)
基于AI的WhatsApp支持机器人(Google Sheets工单创建)
Set
Xml
Code
+20
35 节点Zain Khan
客服机器人
工作流信息
难度等级
高级
节点数量32
分类-
节点类型17
作者
Yasser Sami
@yassersamiAI Automation Architect building smart workflows with n8n. I help businesses save time by automating processes, connecting apps, and integrating AI. My focus is on creating efficient, reliable systems that streamline operations and reduce manual work.
外部链接
在 n8n.io 查看 →
分享此工作流