无代码:将多个二进制文件转换为Base64
中级
这是一个自动化工作流,包含 8 个节点。主要使用 Set, SplitOut, Aggregate, Compression, HttpRequest 等节点。 无需自定义代码将多个二进制文件转换为Base64 JSON数组
前置要求
- •可能需要目标 API 的认证凭证
分类
-
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"id": "BuinUkUBR1JKQBbz",
"meta": {
"instanceId": "8981479cb588889c05b145eaed421551d37a4fff11ab279d3f4744a6577c6002"
},
"name": "无代码:将多个二进制文件转换为 Base64",
"tags": [],
"nodes": [
{
"id": "ab159fb7-fa70-43e2-bcf2-fc9928d4e334",
"name": "开始",
"type": "n8n-nodes-base.manualTrigger",
"position": [
0,
272
],
"parameters": {},
"typeVersion": 1
},
{
"id": "bf134357-6efe-45f8-a5c1-577fcd397902",
"name": "解压演示网站",
"type": "n8n-nodes-base.compression",
"position": [
448,
272
],
"parameters": {},
"typeVersion": 1.1
},
{
"id": "36767516-08c4-43d0-b18d-83e58f833753",
"name": "下载演示网站",
"type": "n8n-nodes-base.httpRequest",
"position": [
224,
272
],
"parameters": {
"url": "https://github.com/n8n-io/n8n-demo-website/archive/refs/heads/main.zip",
"options": {
"response": {
"response": {
"responseFormat": "file"
}
}
}
},
"typeVersion": 4.2
},
{
"id": "71498fdd-2ea1-4e42-8554-5244be68acbc",
"name": "分离文件",
"type": "n8n-nodes-base.splitOut",
"position": [
672,
272
],
"parameters": {
"options": {},
"fieldToSplitOut": "$binary"
},
"typeVersion": 1
},
{
"id": "011458d6-28a3-4a32-982a-2622eb85023d",
"name": "将文件编码为 Base64",
"type": "n8n-nodes-base.extractFromFile",
"position": [
896,
272
],
"parameters": {
"options": {
"keepSource": "binary"
},
"operation": "binaryToPropery",
"binaryPropertyName": "={{ $binary.keys()[0] }}"
},
"typeVersion": 1
},
{
"id": "aa0ccbcc-a237-4107-b41f-413a8eece2b1",
"name": "为文件添加路径",
"type": "n8n-nodes-base.set",
"position": [
1120,
272
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "5bf261ef-b89b-40d0-82d4-1dfef62b5c1d",
"name": "path",
"type": "string",
"value": "={{ $binary[$binary.keys()[0]].directory ? $binary[$binary.keys()[0]].directory + '/' : ''}}{{ $binary[$binary.keys()[0]].fileName }}"
},
{
"id": "3a05fbc1-31c6-4491-865b-3a5f59474f23",
"name": "data",
"type": "string",
"value": "={{ $json.data }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "bae79c09-1977-4ed5-ac0f-5e668fbd62bf",
"name": "聚合输出",
"type": "n8n-nodes-base.aggregate",
"position": [
1344,
272
],
"parameters": {
"options": {},
"aggregate": "aggregateAllItemData",
"destinationFieldName": "files"
},
"typeVersion": 1
},
{
"id": "bd118a52-fe0c-4a9f-89fa-44871859e832",
"name": "便签",
"type": "n8n-nodes-base.stickyNote",
"position": [
0,
-352
],
"parameters": {
"width": 1440,
"height": 576,
"content": "## 无代码:将多个二进制文件转换为 Base64"
},
"typeVersion": 1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "3a7d7269-81e0-4c71-a9c4-7f02076dd9fb",
"connections": {
"Start": {
"main": [
[
{
"node": "Download Demo Website",
"type": "main",
"index": 0
}
]
]
},
"Split Out Files": {
"main": [
[
{
"node": "Encode Files to Base64",
"type": "main",
"index": 0
}
]
]
},
"Add Path to Files": {
"main": [
[
{
"node": "Aggregate Output",
"type": "main",
"index": 0
}
]
]
},
"Unzip Demo Website": {
"main": [
[
{
"node": "Split Out Files",
"type": "main",
"index": 0
}
]
]
},
"Download Demo Website": {
"main": [
[
{
"node": "Unzip Demo Website",
"type": "main",
"index": 0
}
]
]
},
"Encode Files to Base64": {
"main": [
[
{
"node": "Add Path to Files",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
中级
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
使用Qdrant、Mistral.ai和OpenAI构建税法助手
使用Qdrant、Mistral.ai和OpenAI构建税法助手
Set
Wait
Filter
+18
38 节点Jimleuk
财务
Page2Image:将 PDF 转换为 PNG 工作流(支持多页)
使用PDF.co API将PDF转换为PNG(支持多页)
Set
Html
Limit
+8
25 节点Ludwig
构建模块
基于Voyage-Context-3嵌入和MongoDB Atlas的文档问答系统
基于Voyage-Context-3嵌入和MongoDB Atlas的文档问答系统
Set
Code
Wait
+18
53 节点Jimleuk
工程
在可视化参考库中探索n8n节点
在可视化参考库中探索n8n节点
If
Ftp
Set
+93
113 节点I versus AI
其他
视觉RAG与图像嵌入,使用Cohere Command-A和Embed v4
视觉RAG与图像嵌入,使用Cohere Command-A和Embed v4
If
Set
Split Out
+16
38 节点Jimleuk
文档提取
自托管n8n?考虑使用以下选项之一上传到Notion!
使用JavaScript代码将多个文件转换为Base64
Code
Compression
Http Request
+2
5 节点Viktor Klepikovskyi
文件管理