Compare Lists and Identify Common Items and Differences Using Custom Keys
This workflow compares two lists of objects (List A and List B) using a user-specified key (e.g., `email`, `id`, `domain`) and returns: - Items common to both lists (based on the key) - Items only in List A - Items only in List B ### How it works: 1. Accepts a JSON input containing: - `listA`: the first list of items - `listB`: the second list of items - `key`: the field name to use for comparison 2. Performs a field-based comparison using the specified key 3. Returns a structured output: - `common`: items with matching keys (only one version retained) - `onlyInA`: items found only in List A - `onlyInB`: items found only in List B ### Example Input: ```json { "key": "email", "listA": [ { "email": "alice@example.com", "name": "Alice" }, { "email": "bob@example.com", "name": "Bob" } ], "listB": [ { "email": "bob@example.com", "name": "Bobby" }, { "email": "carol@example.com", "name": "Carol" } ] } ``` ### Output: - `common`: `[ { "email": "bob@example.com", "name": "Bob" } ]` - `onlyInA`: `[ { "email": "alice@example.com", "name": "Alice" } ]` - `onlyInB`: `[ { "email": "carol@example.com", "name": "Carol" } ]` ### Use Cases: - Deduplicate data between two sources - Find overlapping records - Identify new or missing entries across systems This workflow is useful for internal data auditing, list reconciliation, transaction reconciliation, or pre-processing sync jobs.
- Platform
- n8n
- Category
- Data & Analytics
- Price
- $4.99
- Creator
- Tenkay
- set
- code
- switch
- stickyNote
- executeWorkflowTrigger
How to import this workflow into n8n
- 1Purchase or download the workflow to get the n8n workflow JSON file.
- 2In your n8n instance, open Workflows and choose "Import from File" (or paste the JSON with Ctrl+V on the canvas).
- 3Open each node marked with a credential warning and connect your own accounts and API keys.
- 4Run the workflow once manually to verify the data flow, then toggle it to Active.
Related Data & Analytics workflows
- Generate AI viral videos with VEO 3 and upload to TikTok$14.99
- Generate a daily multi-asset market report with TwelveData, Groq and Google Sheets$14.99
- Build an OpenAI RAG system with document upload, semantic search and caching$24.99
- Automate Website Content Scraping and SEO Keyword Extraction with GPT-4o-mini and Airtable$14.99
- Process Contact Form Submissions with Validation and MongoDB Storage$14.99
- Add webhook data to a Google Sheet$2.99
Need this deployed? We'll set it up for you.
Our automation experts deploy this workflow in your stack, connect your accounts, and verify it works — or build a custom solution from scratch.