将 Notion 页面作为向量文档存储到 Supabase 中(使用 OpenAI)
中级
这是一个AI领域的自动化工作流,包含 9 个节点。主要使用 Filter, Notion, Summarize, NotionTrigger, EmbeddingsOpenAi 等节点,结合人工智能技术实现智能自动化。 使用OpenAI将Notion页面作为向量文档存储到Supabase
前置要求
- •Notion API Key
- •OpenAI API Key
- •Supabase URL 和 API Key
使用的节点 (9)
分类
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"id": "DvP6IHWymTIVg8Up",
"meta": {
"instanceId": "b9faf72fe0d7c3be94b3ebff0778790b50b135c336412d28fd4fca2cbbf8d1f5",
"templateCredsSetupCompleted": true
},
"name": "将 Notion 页面作为向量文档存储到 Supabase 中(使用 OpenAI)",
"tags": [],
"nodes": [
{
"id": "495609cd-4ca0-426d-8413-69e771398188",
"name": "便签",
"type": "n8n-nodes-base.stickyNote",
"position": [
480,
400
],
"parameters": {
"width": 637.1327972412109,
"height": 1113.7434387207031,
"content": "## 将 Notion 页面作为向量文档存储到 Supabase 中"
},
"typeVersion": 1
},
{
"id": "3f3e65dc-2b26-407c-87e5-52ba3b315fed",
"name": "OpenAI 嵌入",
"type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
"position": [
2200,
760
],
"parameters": {
"options": {}
},
"typeVersion": 1
},
{
"id": "6d2579b8-376f-44c3-82e8-9dc608efd98b",
"name": "令牌分割器",
"type": "@n8n/n8n-nodes-langchain.textSplitterTokenSplitter",
"position": [
2340,
960
],
"parameters": {
"chunkSize": 256,
"chunkOverlap": 30
},
"typeVersion": 1
},
{
"id": "79b3c147-08ca-4db4-9116-958a868cbfd9",
"name": "Notion - 页面添加触发器",
"type": "n8n-nodes-base.notionTrigger",
"position": [
1180,
520
],
"parameters": {
"simple": false,
"pollTimes": {
"item": [
{
"mode": "everyMinute"
}
]
},
"databaseId": {
"__rl": true,
"mode": "list",
"value": "",
"cachedResultUrl": "",
"cachedResultName": ""
}
},
"typeVersion": 1
},
{
"id": "e4a6f524-e3f5-4d02-949a-8523f2d21965",
"name": "Notion - 检索页面内容",
"type": "n8n-nodes-base.notion",
"position": [
1400,
520
],
"parameters": {
"blockId": {
"__rl": true,
"mode": "url",
"value": "={{ $json.url }}"
},
"resource": "block",
"operation": "getAll",
"returnAll": true
},
"typeVersion": 2.2
},
{
"id": "bfebc173-8d4b-4f8f-a625-4622949dd545",
"name": "过滤非文本内容",
"type": "n8n-nodes-base.filter",
"position": [
1620,
520
],
"parameters": {
"options": {},
"conditions": {
"options": {
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "e5b605e5-6d05-4bca-8f19-a859e474620f",
"operator": {
"type": "string",
"operation": "notEquals"
},
"leftValue": "={{ $json.type }}",
"rightValue": "image"
},
{
"id": "c7415859-5ffd-4c78-b497-91a3d6303b6f",
"operator": {
"type": "string",
"operation": "notEquals"
},
"leftValue": "={{ $json.type }}",
"rightValue": "video"
}
]
}
},
"typeVersion": 2
},
{
"id": "b04939f9-355a-430b-a069-b11800066313",
"name": "汇总 - 连接 Notion 块内容",
"type": "n8n-nodes-base.summarize",
"position": [
1920,
520
],
"parameters": {
"options": {
"outputFormat": "separateItems"
},
"fieldsToSummarize": {
"values": [
{
"field": "content",
"separateBy": "\n",
"aggregation": "concatenate"
}
]
}
},
"typeVersion": 1
},
{
"id": "0e64dbb5-20c1-4b90-b818-a1726aaf5112",
"name": "创建元数据并加载内容",
"type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
"position": [
2320,
760
],
"parameters": {
"options": {
"metadata": {
"metadataValues": [
{
"name": "pageId",
"value": "={{ $('Notion - Page Added Trigger').item.json.id }}"
},
{
"name": "createdTime",
"value": "={{ $('Notion - Page Added Trigger').item.json.created_time }}"
},
{
"name": "pageTitle",
"value": "={{ $('Notion - Page Added Trigger').item.json.properties.Page.title[0].text.content }}"
}
]
}
},
"jsonData": "={{ $('Summarize - Concatenate Notion's blocks content').item.json.concatenated_content }}",
"jsonMode": "expressionData"
},
"typeVersion": 1
},
{
"id": "187aba6f-eaed-4427-8d40-b9da025fb37d",
"name": "Supabase 向量存储",
"type": "@n8n/n8n-nodes-langchain.vectorStoreSupabase",
"position": [
2200,
520
],
"parameters": {
"mode": "insert",
"options": {},
"tableName": {
"__rl": true,
"mode": "list",
"value": "",
"cachedResultName": ""
}
},
"typeVersion": 1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "77f6b6f7-d699-4a7e-b3e7-fe8a60bde7ba",
"connections": {
"Token Splitter": {
"ai_textSplitter": [
[
{
"node": "Create metadata and load content",
"type": "ai_textSplitter",
"index": 0
}
]
]
},
"Embeddings OpenAI": {
"ai_embedding": [
[
{
"node": "Supabase Vector Store",
"type": "ai_embedding",
"index": 0
}
]
]
},
"Filter Non-Text Content": {
"main": [
[
{
"node": "Summarize - Concatenate Notion's blocks content",
"type": "main",
"index": 0
}
]
]
},
"Notion - Page Added Trigger": {
"main": [
[
{
"node": "Notion - Retrieve Page Content",
"type": "main",
"index": 0
}
]
]
},
"Notion - Retrieve Page Content": {
"main": [
[
{
"node": "Filter Non-Text Content",
"type": "main",
"index": 0
}
]
]
},
"Create metadata and load content": {
"ai_document": [
[
{
"node": "Supabase Vector Store",
"type": "ai_document",
"index": 0
}
]
]
},
"Summarize - Concatenate Notion's blocks content": {
"main": [
[
{
"node": "Supabase Vector Store",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
中级 - 人工智能
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
实时数据RAG系统
使用Supabase和Notion将大型文档插入向量数据库
Limit
Notion
Supabase
+14
34 节点Mario
构建模块
生产环境:Notion 到向量存储 - 维度 768
Notion与Pinecone向量存储集成
Filter
Notion
Summarize
+5
8 节点Udit Rawat
工程
[模板] AI宠物店 v8
🐶 AI宠物店助手 - 集成GPT-4o、Google日历和WhatsApp/Instagram/Facebook
If
N8n
Set
+38
244 节点Amanda Benks
销售
AI 代理餐厅 [模板]
🤖 WhatsApp、Instagram 和 Messenger 的 AI 餐厅助手
If
N8n
Set
+37
239 节点Amanda Benks
其他
从Screaming Frog网站爬取生成AI就绪的llms.txt文件
从Screaming Frog网站爬取生成AI就绪的llms.txt文件
Set
Filter
Summarize
+7
23 节点Dataki
人工智能
AI驱动的RAG文档处理与聊天机器人 - Google Drive、Supabase、OpenAI
基于Google Drive、Supabase和OpenAI的AI驱动RAG文档处理与聊天机器人
Set
Code
Limit
+19
35 节点Billy Christi
人工智能
工作流信息
难度等级
中级
节点数量9
分类1
节点类型9
作者
Dataki
@datakiI am passionate about transforming complex processes into seamless automations with n8n. My expertise spans across creating ETL pipelines, sales automations, and data & AI-driven workflows. As an avid problem solver, I thrive on optimizing workflows to drive efficiency and innovation.
外部链接
在 n8n.io 查看 →
分享此工作流