Effortlessly Compare and Differentiate Data Lists
detail.loadingPreview
The Data List Comparer workflow streamlines the process of finding commonalities and discrepancies between two datasets. It efficiently identifies items present in both lists, unique to the first list, and unique to the second list, based on a specified key.
About This Workflow
This n8n workflow, named 'comparer', is designed to tackle the common challenge of data reconciliation. It accepts two arrays of data (input_a and input_b) and a crucial key to identify corresponding records. By leveraging a custom JavaScript code node, it intelligently maps and compares items based on this key. The output is neatly categorized into three distinct lists: common (items found in both input_a and input_b), onlyInA (items exclusive to input_a), and onlyInB (items exclusive to input_b). This workflow is invaluable for identifying duplicate entries, tracking changes between data versions, or merging datasets with precision.
Key Features
- Automated Data Comparison: Effortlessly compare two lists of data without manual intervention.
- Key-Based Matching: Precisely matches records using a configurable identifier key.
- Clear Categorization: Outputs distinct lists for common items, items only in the first list, and items only in the second list.
- Input Validation: Includes checks to ensure all required inputs (key, input_a, input_b) are provided before processing.
How To Use
- Trigger Setup: Configure the 'When Executed by Another Workflow' node to receive
input_a(array),input_b(array), andkey(string) as workflow inputs. - Input Validation: The 'Switch' node automatically checks if
key,input_a, orinput_bare missing. If any are missing, it routes to the appropriate 'validation_message' node. - Data Processing: If all inputs are present, the workflow proceeds to the 'Code' node.
- Code Node Configuration: The 'Code' node executes JavaScript logic to:
a. Retrieve
input_a,input_b, andkeyfrom the input. b. Create maps frominput_aandinput_busing the providedkey. c. Iterate through the maps to identify common items, items unique toinput_a, and items unique toinput_b. d. Return the results ascommon,onlyInA, andonlyInBarrays. - Output Interpretation: The output of the 'Code' node will contain the categorized comparison results for use in subsequent workflow steps.
Apps Used
Workflow JSON
{
"id": "fd5e2eec-ec34-4cec-8a65-07a6aa4105cd",
"name": "Effortlessly Compare and Differentiate Data Lists",
"nodes": 5,
"category": "Operations",
"status": "active",
"version": "1.0.0"
}Note: This is a sample preview. The full workflow JSON contains node configurations, credentials placeholders, and execution logic.
Get This Workflow
ID: fd5e2eec-ec34...
About the Author
AI_Workflow_Bot
LLM Specialist
Building complex chains with OpenAI, Claude, and LangChain.
Statistics
Related Workflows
Discover more workflows you might like
Universal CSV to JSON API Converter
Effortlessly transform CSV data into structured JSON with this versatile n8n workflow. Integrate it into any application as a custom API endpoint, supporting various input methods including file uploads and raw text.
Instant WooCommerce Order Notifications via Telegram
When a new order is placed on your WooCommerce store, instantly receive detailed notifications directly to your Telegram chat. Stay on top of your e-commerce operations with real-time alerts, including order specifics and a direct link to view the order.
On-Demand Microsoft SQL Query Execution
This workflow allows you to manually trigger and execute any SQL query against your Microsoft SQL Server database. Perfect for ad-hoc data lookups, administrative tasks, or quick tests, giving you direct control over your database operations.