学习Supabase存储基础
这是一个File Management、Miscellaneous、Multimodal AI领域的自动化工作流,包含 18 个节点。主要使用 FormTrigger、HttpRequest、ManualTrigger 等节点。 Supabase存储教程:上传、获取、签名和列出文件
- •可能需要目标 API 的认证凭证
使用的节点 (18 个)
{
"id": "EIOmLVu0xM1NA4BP",
"meta": {
"instanceId": "70273a2379644db63ce659827cfd8abac2d0b189210eafa02dd5376e3a62cd1d"
},
"name": "学习 Supabase 存储基础",
"tags": [],
"nodes": [
{
"id": "dcc07b9f-788f-4ea5-9a45-37497ba7319c",
"name": "获取要审阅的文件1",
"type": "n8n-nodes-base.httpRequest",
"position": [
-304,
-416
],
"parameters": {
"url": "=https://uptttiuxuaacxrdofqgm.supabase.co/storage/v1/object/test-n8n/{{ $json['File Name'] }}",
"options": {},
"authentication": "predefinedCredentialType",
"nodeCredentialType": "supabaseApi"
},
"credentials": {
"supabaseApi": {
"id": "UMM6kngXouHxEYn4",
"name": "Supabase account"
}
},
"typeVersion": 4.2
},
{
"id": "1b5e12a0-3f2f-421e-ae03-9f31a40d6bd0",
"name": "上传到Supabase存储",
"type": "n8n-nodes-base.httpRequest",
"position": [
-320,
-784
],
"parameters": {
"url": "=https://uptttiuxuaacxrdofqgm.supabase.co/storage/v1/object/test-n8n/{{ $binary.File.fileName }}",
"method": "POST",
"options": {},
"sendBody": true,
"contentType": "binaryData",
"authentication": "predefinedCredentialType",
"inputDataFieldName": "File",
"nodeCredentialType": "supabaseApi"
},
"credentials": {
"supabaseApi": {
"id": "UMM6kngXouHxEYn4",
"name": "Supabase account"
}
},
"typeVersion": 4.2
},
{
"id": "04a263f5-8de9-466f-bb52-ebf55ff75e37",
"name": "表单提交时",
"type": "n8n-nodes-base.formTrigger",
"position": [
-688,
-784
],
"webhookId": "94a1537a-fe30-4308-88dc-cc03eff2e5a1",
"parameters": {
"options": {
"buttonLabel": "Upload to Supabase Storage"
},
"formTitle": "Supabase Storage File Upload",
"formFields": {
"values": [
{
"fieldType": "file",
"fieldLabel": "File",
"multipleFiles": false
}
]
}
},
"typeVersion": 2.2
},
{
"id": "9a06dcd2-d1fc-466b-a3a8-1f30591e375f",
"name": "上传到YouTube",
"type": "n8n-nodes-base.formTrigger",
"position": [
-720,
-416
],
"webhookId": "1c390524-aec0-48e0-b196-5bb983aed13c",
"parameters": {
"options": {},
"formTitle": "Get File from Storage",
"formFields": {
"values": [
{
"fieldLabel": "File Name"
}
]
}
},
"typeVersion": 2.2
},
{
"id": "72d6ca3b-81ff-43a7-843d-be4d3e542572",
"name": "表单提交时2",
"type": "n8n-nodes-base.formTrigger",
"position": [
-672,
-64
],
"webhookId": "26953730-58b9-4bbc-8ff6-d0adcf20ba4a",
"parameters": {
"options": {},
"formTitle": "Get File from Storage",
"formFields": {
"values": [
{
"fieldLabel": "File Name"
}
]
}
},
"typeVersion": 2.2
},
{
"id": "160ca4a4-7e79-493a-a0da-5c8d6b78ca07",
"name": "获取临时访问签名文件",
"type": "n8n-nodes-base.httpRequest",
"position": [
-240,
-64
],
"parameters": {
"url": "=https://uptttiuxuaacxrdofqgm.supabase.co/storage/v1/object/sign/test-n8n/{{ $json['File Name'] }}",
"method": "POST",
"options": {},
"jsonBody": "{\n \"expiresIn\" : 3600\n}",
"sendBody": true,
"specifyBody": "json",
"authentication": "predefinedCredentialType",
"nodeCredentialType": "supabaseApi"
},
"credentials": {
"supabaseApi": {
"id": "UMM6kngXouHxEYn4",
"name": "Supabase account"
}
},
"typeVersion": 4.2
},
{
"id": "23718644-32eb-4351-b32e-4071bbeb0492",
"name": "列出所有对象",
"type": "n8n-nodes-base.httpRequest",
"position": [
-240,
336
],
"parameters": {
"url": "=https://uptttiuxuaacxrdofqgm.supabase.co/storage/v1/object/list/test-n8n",
"method": "POST",
"options": {},
"jsonBody": "{\n \"prefix\": \"\",\n \"limit\": 20,\n \"offset\": 0,\n \"sortBy\": {\n \"column\": \"name\",\n \"order\": \"asc\"\n }\n}",
"sendBody": true,
"specifyBody": "json",
"authentication": "predefinedCredentialType",
"nodeCredentialType": "supabaseApi"
},
"credentials": {
"supabaseApi": {
"id": "UMM6kngXouHxEYn4",
"name": "Supabase account"
}
},
"typeVersion": 4.2
},
{
"id": "1fa36875-d26f-4bc4-b692-92e8ce0a1bc6",
"name": "当点击\"执行工作流\"时",
"type": "n8n-nodes-base.manualTrigger",
"position": [
-672,
336
],
"parameters": {},
"typeVersion": 1
},
{
"id": "2e21cf08-8100-4059-88ac-d87a2d1ff0e3",
"name": "便签",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1536,
-400
],
"parameters": {
"width": 608,
"height": 512,
"content": "## 更新/创建策略以访问该资源。(注意:基于密钥我们已创建策略)"
},
"typeVersion": 1
},
{
"id": "269b106b-b758-4dd4-b75f-3374b7b3bf39",
"name": "便签2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-2080,
-896
],
"parameters": {
"width": 528,
"height": 464,
"content": "## 获取项目 URL"
},
"typeVersion": 1
},
{
"id": "c4051c9c-3145-4a2f-8645-e9ac21007b44",
"name": "便签3",
"type": "n8n-nodes-base.stickyNote",
"position": [
-2080,
144
],
"parameters": {
"width": 528,
"height": 464,
"content": "## 创建 Supabase API 凭证类型的凭证。"
},
"typeVersion": 1
},
{
"id": "7f774520-ee3c-4a83-b79e-330860cb39e6",
"name": "便签4",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1536,
-896
],
"parameters": {
"width": 592,
"height": 480,
"content": "## 获取 API 密钥(匿名密钥)。"
},
"typeVersion": 1
},
{
"id": "d40c816f-e736-4213-8a82-c2b495e3dbc8",
"name": "便利贴5",
"type": "n8n-nodes-base.stickyNote",
"position": [
-2080,
-416
],
"parameters": {
"width": 528,
"height": 544,
"content": "## 在 Supabase 中创建存储桶"
},
"typeVersion": 1
},
{
"id": "d67a1e56-5cd1-4054-8670-0a63a95abe03",
"name": "便签1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-912,
-880
],
"parameters": {
"color": 4,
"width": 928,
"height": 304,
"content": "## 第 1 课 - 上传文件到存储"
},
"typeVersion": 1
},
{
"id": "986ba910-9a34-4256-a968-b65edccbdd7d",
"name": "便签 6",
"type": "n8n-nodes-base.stickyNote",
"position": [
-912,
-512
],
"parameters": {
"color": 4,
"width": 928,
"height": 288,
"content": "## 第 2 课 - 从存储中获取文件"
},
"typeVersion": 1
},
{
"id": "066aaed6-6390-4ddb-ba8f-94f9ef84ee1c",
"name": "便签 7",
"type": "n8n-nodes-base.stickyNote",
"position": [
-912,
-160
],
"parameters": {
"color": 4,
"width": 944,
"height": 288,
"content": "## 第 3 课 - 创建带过期时间的临时文档"
},
"typeVersion": 1
},
{
"id": "a1fdb67e-1ea3-4e82-8b98-9ab05b2a1a57",
"name": "便签8",
"type": "n8n-nodes-base.stickyNote",
"position": [
-912,
224
],
"parameters": {
"color": 4,
"width": 960,
"height": 288,
"content": "## 第 4 课 - 获取存储中所有项目列表"
},
"typeVersion": 1
},
{
"id": "ddf906e8-0e37-477e-9b5a-2ed1e9265058",
"name": "便签 9",
"type": "n8n-nodes-base.stickyNote",
"position": [
-2992,
-896
],
"parameters": {
"color": 3,
"width": 896,
"height": 1632,
"content": "## 使用 n8n 学习 Supabase 存储基础"
},
"typeVersion": 1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "95dabc42-1c4b-4b25-86a6-09b72a439252",
"connections": {
"On form submission": {
"main": [
[
{
"node": "upload_to_supabase_storage",
"type": "main",
"index": 0
}
]
]
},
"On form submission1": {
"main": [
[
{
"node": "fetch_file_to_review1",
"type": "main",
"index": 0
}
]
]
},
"On form submission2": {
"main": [
[
{
"node": "get_sign_file_for_temp_access",
"type": "main",
"index": 0
}
]
]
},
"fetch_file_to_review1": {
"main": [
[]
]
},
"When clicking ‘Execute workflow’": {
"main": [
[
{
"node": "list_all_the_object",
"type": "main",
"index": 0
}
]
]
}
}
}如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
这是一个高级难度的工作流,适用于File Management、Miscellaneous、Multimodal AI等场景。适合高级用户,包含 16+ 个节点的复杂工作流
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
Alok Kumar
@alokkumarI am a Principal Software Engineer based in Ireland with a deep passion for AI and emerging technologies. With extensive experience in designing and implementing scalable software solutions, I focus on leveraging artificial intelligence to solve real-world problems. I enjoy exploring innovative applications of AI, from intelligent automation to data-driven insights, and I’m dedicated to building systems that are both efficient and impactful.
分享此工作流