学习数据同步:仓库库存审计教程
高级
这是一个Engineering领域的自动化工作流,包含 17 个节点。主要使用 Set、SplitOut、ManualTrigger、CompareDatasets 等节点。 学习数据同步:仓库库存审计教程
前置要求
- •无特殊前置要求,导入即可使用
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"meta": {
"instanceId": "e409ea34548a2afe2dffba31130cd1cf2e98ebe2afaeed2a63caf2a0582d1da0"
},
"nodes": [
{
"id": "6164f1ea-1e44-4f94-8c69-c064b477c53d",
"name": "开始审计",
"type": "n8n-nodes-base.manualTrigger",
"position": [
-544,
2768
],
"parameters": {},
"typeVersion": 1
},
{
"id": "d6038f48-07a8-40b2-b4c5-00985932ec81",
"name": "便签 1",
"type": "n8n-nodes-base.stickyNote",
"position": [
80,
2336
],
"parameters": {
"color": 5,
"width": 400,
"height": 680,
"content": "### 审计报告"
},
"typeVersion": 1
},
{
"id": "d191a3b6-13e5-460e-a5a8-87d0c50fe31b",
"name": "便签 2",
"type": "n8n-nodes-base.stickyNote",
"position": [
512,
2368
],
"parameters": {
"color": 6,
"width": 384,
"height": 400,
"content": "### ✅ 一切正常(无需操作)"
},
"typeVersion": 1
},
{
"id": "b03f0d8c-7177-4069-8869-347e079c42bf",
"name": "➕ 添加到仓库 B",
"type": "n8n-nodes-base.noOp",
"position": [
640,
2192
],
"parameters": {},
"typeVersion": 1
},
{
"id": "dbfb3df3-e494-411c-975c-14edccaa7a8e",
"name": "仓库 A(真相源)",
"type": "n8n-nodes-base.set",
"position": [
-288,
2608
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "12345",
"name": "products",
"type": "array",
"value": "=[\n {\n \"product_id\":\"P-001\",\n \"name\":\"Keyboard\",\n \"stock\":200\n },\n {\n \"product_id\":\"P-002\",\n \"name\":\"Mouse\",\n \"stock\":150\n },\n {\n \"product_id\":\"P-003\",\n \"name\":\"Webcam\",\n \"stock\":75\n }\n]"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "70322c6f-5892-4259-b4ff-97449bd94c39",
"name": "✅ 一切正常(无需操作)",
"type": "n8n-nodes-base.noOp",
"position": [
640,
2592
],
"parameters": {},
"typeVersion": 1
},
{
"id": "8f1f09a5-cf83-4ec4-90f5-85fd30bff3d6",
"name": "🔄 在仓库 B 中更新",
"type": "n8n-nodes-base.noOp",
"position": [
640,
3024
],
"parameters": {},
"typeVersion": 1
},
{
"id": "1572db04-7da7-4d64-835b-a98aca3ef4bc",
"name": "❌ 从仓库 B 中移除",
"type": "n8n-nodes-base.noOp",
"position": [
640,
3424
],
"parameters": {},
"typeVersion": 1
},
{
"id": "a8f72c77-c484-46bf-a08d-05973c99b93d",
"name": "审计员",
"type": "n8n-nodes-base.compareDatasets",
"position": [
224,
2768
],
"parameters": {
"options": {},
"mergeByFields": {
"values": [
{
"field1": "product_id",
"field2": "product_id"
}
]
}
},
"typeVersion": 2.3
},
{
"id": "83decaff-9f4a-4729-ac52-6ce9b4e31be9",
"name": "仓库 B(待同步)",
"type": "n8n-nodes-base.set",
"position": [
-288,
2928
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "27aceae0-8a0b-4fcf-b8a6-fc1f16cc4863",
"name": "products",
"type": "array",
"value": "=[\n {\n \"product_id\":\"P-001\",\n \"name\":\"Keyboard\",\n \"stock\":200\n },\n {\n \"product_id\":\"P-002\",\n \"name\":\"Mouse\",\n \"stock\":100\n },\n {\n \"product_id\":\"P-004\",\n \"name\":\"Monitor\",\n \"stock\":50\n }\n]"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "eb5dbdfb-6780-44ad-b019-a2c0d2b53430",
"name": "便签9",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1040,
2336
],
"parameters": {
"width": 688,
"height": 612,
"content": "### 教程:数据审计员(Compare Datasets)"
},
"typeVersion": 1
},
{
"id": "9b721fda-52d3-4de5-bdde-a58919456135",
"name": "便签11",
"type": "n8n-nodes-base.stickyNote",
"position": [
512,
1952
],
"parameters": {
"color": 6,
"width": 384,
"height": 400,
"content": "### ➕ 添加到仓库 B"
},
"typeVersion": 1
},
{
"id": "b1dadc19-0dc4-4709-9bc6-9b5a7431db2a",
"name": "便签 12",
"type": "n8n-nodes-base.stickyNote",
"position": [
512,
2784
],
"parameters": {
"color": 6,
"width": 384,
"height": 400,
"content": "### 🔄 在仓库 B 中更新"
},
"typeVersion": 1
},
{
"id": "87ad324e-c596-4968-b484-8d778dacba0b",
"name": "便签 13",
"type": "n8n-nodes-base.stickyNote",
"position": [
512,
3200
],
"parameters": {
"color": 6,
"width": 384,
"height": 400,
"content": "### ❌ 从仓库 B 中移除"
},
"typeVersion": 1
},
{
"id": "19538cc0-b536-49c1-9874-af8d237ca71c",
"name": "便签14",
"type": "n8n-nodes-base.stickyNote",
"position": [
928,
2384
],
"parameters": {
"color": 3,
"width": 540,
"height": 784,
"content": "## 这对您有帮助吗?请告诉我!"
},
"typeVersion": 1
},
{
"id": "a6fca263-dd05-408f-9556-498985daca96",
"name": "分离产品 (B)",
"type": "n8n-nodes-base.splitOut",
"position": [
-64,
2928
],
"parameters": {
"options": {},
"fieldToSplitOut": "products"
},
"typeVersion": 1
},
{
"id": "9114df4e-e8d6-47d3-811d-dcd416ff667a",
"name": "分离产品 (A)",
"type": "n8n-nodes-base.splitOut",
"position": [
-64,
2608
],
"parameters": {
"options": {},
"fieldToSplitOut": "products"
},
"typeVersion": 1
}
],
"pinData": {},
"connections": {
"Start Audit": {
"main": [
[
{
"node": "Warehouse A (Source of Truth)",
"type": "main",
"index": 0
},
{
"node": "Warehouse B (To be Synced)",
"type": "main",
"index": 0
}
]
]
},
"The Auditor": {
"main": [
[
{
"node": "➕ Add to Warehouse B",
"type": "main",
"index": 0
}
],
[
{
"node": "✅ All Good (Do Nothing)",
"type": "main",
"index": 0
}
],
[
{
"node": "🔄 Update in Warehouse B",
"type": "main",
"index": 0
}
],
[
{
"node": "❌ Remove from Warehouse B",
"type": "main",
"index": 0
}
]
]
},
"Split Out Prducts (A)": {
"main": [
[
{
"node": "The Auditor",
"type": "main",
"index": 0
}
]
]
},
"Split Out Prducts (B)": {
"main": [
[
{
"node": "The Auditor",
"type": "main",
"index": 1
}
]
]
},
"Warehouse B (To be Synced)": {
"main": [
[
{
"node": "Split Out Prducts (B)",
"type": "main",
"index": 0
}
]
]
},
"Warehouse A (Source of Truth)": {
"main": [
[
{
"node": "Split Out Prducts (A)",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
这是一个高级难度的工作流,适用于Engineering等场景。适合高级用户,包含 16+ 个节点的复杂工作流
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
带等待节点的长运行工作流状态管理系统
带等待节点的长运行工作流状态管理系统
If
Set
Code
+10
42 节点Lucas Peyrin
Engineering
学习工作流逻辑:合并、IF和Switch操作
学习工作流逻辑:合并、IF和Switch操作
If
Set
Merge
+4
22 节点Lucas Peyrin
Engineering
🎓 使用并行处理优化速度关键工作流(扇出-扇入)
🎓 使用并行处理(扇出/扇入)优化速度关键工作流
If
Set
Code
+10
34 节点Lucas Peyrin
Engineering
🧑🎓 通过渐进式表达式挑战掌握数据访问技术
🧑🎓 通过渐进式表达式挑战掌握数据访问技术
If
Set
Html
+4
62 节点Lucas Peyrin
Engineering
使用Gemini RAG管道构建文档专家聊天机器人
使用Gemini RAG管道构建文档专家聊天机器人
Set
Html
Filter
+16
48 节点Lucas Peyrin
Internal Wiki
使用正则表达式和 AI 发现隐藏的网站 API 端点
使用正则表达式和人工智能发现隐藏的网站API端点
If
Set
Html
+19
58 节点Yulia
Engineering
工作流信息
难度等级
高级
节点数量17
分类1
节点类型6
作者
Lucas Peyrin
@lucaspeyrinInnovative builder with a passion for crafting automation solutions that solve real-world challenges. From streamlining workflows to driving efficiency, my work empowers teams and individuals to achieve more with less effort. Experienced in developing scalable tools and strategies that deliver results with n8n, supabase and cline.
外部链接
在 n8n.io 上查看 →
分享此工作流