Aprende la sincronización de datos: Tutorial de auditoría de inventario de almacén
Este es unEngineeringflujo de automatización del dominio deautomatización que contiene 17 nodos.Utiliza principalmente nodos como Set, SplitOut, ManualTrigger, CompareDatasets. Tutorial de auditoría de inventario de almacén: aprender sincronización de datos
- •No hay requisitos previos especiales, puede importar y usarlo directamente
Nodos utilizados (17)
Categoría
{
"meta": {
"instanceId": "e409ea34548a2afe2dffba31130cd1cf2e98ebe2afaeed2a63caf2a0582d1da0"
},
"nodes": [
{
"id": "6164f1ea-1e44-4f94-8c69-c064b477c53d",
"name": "Iniciar Auditoría",
"type": "n8n-nodes-base.manualTrigger",
"position": [
-544,
2768
],
"parameters": {},
"typeVersion": 1
},
{
"id": "d6038f48-07a8-40b2-b4c5-00985932ec81",
"name": "Nota Adhesiva1",
"type": "n8n-nodes-base.stickyNote",
"position": [
80,
2336
],
"parameters": {
"color": 5,
"width": 400,
"height": 680,
"content": "### The Auditor's Report\n\nThis is the **Compare Datasets** node, our Auditor.\n\n**How it works:**\n1. **Fields to Match:** It uses the `product_id` as a unique \"barcode\" to identify the same item in both warehouses.\n2. **Source of Truth:** We've told it that if an item is **different**, it should **Use Input A Version**. This means Warehouse A's data is always correct.\n\n\n**The Four Outputs:**\nThe Auditor produces a report with four categories, which correspond to the four outputs of this node."
},
"typeVersion": 1
},
{
"id": "d191a3b6-13e5-460e-a5a8-87d0c50fe31b",
"name": "Nota Adhesiva2",
"type": "n8n-nodes-base.stickyNote",
"position": [
512,
2368
],
"parameters": {
"color": 6,
"width": 384,
"height": 400,
"content": "### ✅ All Good (Do Nothing)\n\n**What this means:** The Auditor found that this item (the 'Keyboard') is exactly the same in both Warehouse A and Warehouse B.\n\n**Action:** No action is needed! The data is already in sync."
},
"typeVersion": 1
},
{
"id": "b03f0d8c-7177-4069-8869-347e079c42bf",
"name": "➕ Agregar a Almacén B",
"type": "n8n-nodes-base.noOp",
"position": [
640,
2192
],
"parameters": {},
"typeVersion": 1
},
{
"id": "dbfb3df3-e494-411c-975c-14edccaa7a8e",
"name": "Almacén A (Fuente de Verdad)",
"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": "✅ Todo Correcto (No Hacer Nada)",
"type": "n8n-nodes-base.noOp",
"position": [
640,
2592
],
"parameters": {},
"typeVersion": 1
},
{
"id": "8f1f09a5-cf83-4ec4-90f5-85fd30bff3d6",
"name": "🔄 Actualizar en Almacén B",
"type": "n8n-nodes-base.noOp",
"position": [
640,
3024
],
"parameters": {},
"typeVersion": 1
},
{
"id": "1572db04-7da7-4d64-835b-a98aca3ef4bc",
"name": "❌ Eliminar de Almacén B",
"type": "n8n-nodes-base.noOp",
"position": [
640,
3424
],
"parameters": {},
"typeVersion": 1
},
{
"id": "a8f72c77-c484-46bf-a08d-05973c99b93d",
"name": "El Auditor",
"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": "Almacén B (Para Sincronizar)",
"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": "Nota Adhesiva9",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1040,
2336
],
"parameters": {
"width": 688,
"height": 612,
"content": "### Tutorial: The Data Auditor (Compare Datasets)\n\nWelcome! This workflow will teach you how to use one of the most powerful nodes for data synchronization: **Compare Datasets**.\n\n**The Analogy: Auditing Two Warehouses**\n- **Warehouse A:** Our main, \"source of truth\" warehouse. This is the master list of what we *should* have.\n- **Warehouse B:** A second, remote warehouse. We need to make sure its inventory matches Warehouse A.\n- **The Compare Datasets Node:** This is the **Auditor** with a clipboard, checking both lists to find differences.\n\n\n**How to use this tutorial:**\n1. Click **\"Execute Workflow\"**.\n2. Click on each of the four output nodes (`NoOp` nodes) to see which items ended up where.\n3. Read the sticky notes to understand why each item was sorted into its specific branch."
},
"typeVersion": 1
},
{
"id": "9b721fda-52d3-4de5-bdde-a58919456135",
"name": "Nota Adhesiva11",
"type": "n8n-nodes-base.stickyNote",
"position": [
512,
1952
],
"parameters": {
"color": 6,
"width": 384,
"height": 400,
"content": "### ➕ Add to Warehouse B\n\n**What this means:** The Auditor found this item (the 'Webcam') in our main Warehouse A, but it's **missing** from Warehouse B.\n\n**Action:** The next step in a real workflow would be to take this item and **create** it in Warehouse B (e.g., add a new row to a Google Sheet or a new item in Notion)."
},
"typeVersion": 1
},
{
"id": "b1dadc19-0dc4-4709-9bc6-9b5a7431db2a",
"name": "Nota Adhesiva12",
"type": "n8n-nodes-base.stickyNote",
"position": [
512,
2784
],
"parameters": {
"color": 6,
"width": 384,
"height": 400,
"content": "### 🔄 Update in Warehouse B\n\n**What this means:** The Auditor found this item (the 'Mouse') in both warehouses, but its details are **different**. (Warehouse A has 150 in stock, but B only has 100).\n\n**Action:** The next step would be to **update** the existing item in Warehouse B with the correct data from Warehouse A."
},
"typeVersion": 1
},
{
"id": "87ad324e-c596-4968-b484-8d778dacba0b",
"name": "Nota Adhesiva13",
"type": "n8n-nodes-base.stickyNote",
"position": [
512,
3200
],
"parameters": {
"color": 6,
"width": 384,
"height": 400,
"content": "### ❌ Remove from Warehouse B\n\n**What this means:** The Auditor found this item (the 'Monitor') in Warehouse B, but it **does not exist** in our main Warehouse A.\n\n**Action:** The next step would be to **delete** this item from Warehouse B, as it's an extra item that shouldn't be there."
},
"typeVersion": 1
},
{
"id": "19538cc0-b536-49c1-9874-af8d237ca71c",
"name": "Nota Adhesiva14",
"type": "n8n-nodes-base.stickyNote",
"position": [
928,
2384
],
"parameters": {
"color": 3,
"width": 540,
"height": 784,
"content": "## Was this helpful? Let me know!\n\nI really hope this template helped you understand how the Compare Datasets node works. Your feedback is incredibly valuable and helps me create better resources for the n8n community.\n\n### **Share Your Thoughts & Ideas**\n\nWhether you have a suggestion, found a typo, or just want to say thanks, I'd love to hear from you!\nHere's a simple n8n form built for this purpose:\n\n#### ➡️ **[Click here to give feedback](https://api.ia2s.app/form/templates/feedback?template=Compare%20Datasets)**\n\n### **Ready to Build Something Great?**\n\nIf you're looking to take your n8n skills or business automation to the next level, I can help.\n\n**🎓 n8n Coaching:** Want to become an n8n pro? I offer one-on-one coaching sessions to help you master workflows, tackle specific problems, and build with confidence.\n#### ➡️ **[Book a Coaching Session](https://api.ia2s.app/form/templates/coaching?template=Compare%20Datasets)**\n\n**💼 n8n Consulting:** Have a complex project, an integration challenge, or need a custom workflow built for your business? Let's work together to create a powerful automation solution.\n#### ➡️ **[Inquire About Consulting Services](https://api.ia2s.app/form/templates/consulting?template=Compare%20Datasets)**\n\n---\n\nHappy Automating!\nLucas Peyrin"
},
"typeVersion": 1
},
{
"id": "a6fca263-dd05-408f-9556-498985daca96",
"name": "Separar Productos (B)",
"type": "n8n-nodes-base.splitOut",
"position": [
-64,
2928
],
"parameters": {
"options": {},
"fieldToSplitOut": "products"
},
"typeVersion": 1
},
{
"id": "9114df4e-e8d6-47d3-811d-dcd416ff667a",
"name": "Separar Productos (A)",
"type": "n8n-nodes-base.splitOut",
"position": [
-64,
2608
],
"parameters": {
"options": {},
"fieldToSplitOut": "products"
},
"typeVersion": 1
}
],
"pinData": {},
"connections": {
"6164f1ea-1e44-4f94-8c69-c064b477c53d": {
"main": [
[
{
"node": "dbfb3df3-e494-411c-975c-14edccaa7a8e",
"type": "main",
"index": 0
},
{
"node": "83decaff-9f4a-4729-ac52-6ce9b4e31be9",
"type": "main",
"index": 0
}
]
]
},
"a8f72c77-c484-46bf-a08d-05973c99b93d": {
"main": [
[
{
"node": "b03f0d8c-7177-4069-8869-347e079c42bf",
"type": "main",
"index": 0
}
],
[
{
"node": "70322c6f-5892-4259-b4ff-97449bd94c39",
"type": "main",
"index": 0
}
],
[
{
"node": "8f1f09a5-cf83-4ec4-90f5-85fd30bff3d6",
"type": "main",
"index": 0
}
],
[
{
"node": "1572db04-7da7-4d64-835b-a98aca3ef4bc",
"type": "main",
"index": 0
}
]
]
},
"9114df4e-e8d6-47d3-811d-dcd416ff667a": {
"main": [
[
{
"node": "a8f72c77-c484-46bf-a08d-05973c99b93d",
"type": "main",
"index": 0
}
]
]
},
"a6fca263-dd05-408f-9556-498985daca96": {
"main": [
[
{
"node": "a8f72c77-c484-46bf-a08d-05973c99b93d",
"type": "main",
"index": 1
}
]
]
},
"83decaff-9f4a-4729-ac52-6ce9b4e31be9": {
"main": [
[
{
"node": "a6fca263-dd05-408f-9556-498985daca96",
"type": "main",
"index": 0
}
]
]
},
"dbfb3df3-e494-411c-975c-14edccaa7a8e": {
"main": [
[
{
"node": "9114df4e-e8d6-47d3-811d-dcd416ff667a",
"type": "main",
"index": 0
}
]
]
}
}
}¿Cómo usar este flujo de trabajo?
Copie el código de configuración JSON de arriba, cree un nuevo flujo de trabajo en su instancia de n8n y seleccione "Importar desde JSON", pegue la configuración y luego modifique la configuración de credenciales según sea necesario.
¿En qué escenarios es adecuado este flujo de trabajo?
Avanzado - Ingeniería
¿Es de pago?
Este flujo de trabajo es completamente gratuito, puede importarlo y usarlo directamente. Sin embargo, tenga en cuenta que los servicios de terceros utilizados en el flujo de trabajo (como la API de OpenAI) pueden requerir un pago por su cuenta.
Flujos de trabajo relacionados recomendados
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.
Compartir este flujo de trabajo