Compare lists and identify common items & differences using custom keys
$20/month : Unlimited workflows
2500 executions/month
THE #1 IN WEB SCRAPING
Scrape any website without limits
HOSTINGER 🎉 Early Black Friday Deal
DISCOUNT 20% Try free
DISCOUNT 20%
Self-hosted n8n
Unlimited workflows - from $4.99/mo
#1 hub for scraping, AI & automation
6000+ actors - $5 credits/mo
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:
- Accepts a JSON input containing:
listA: the first list of itemslistB: the second list of itemskey: the field name to use for comparison
- Performs a field-based comparison using the specified key
- Returns a structured output:
common: items with matching keys (only one version retained)onlyInA: items found only in List AonlyInB: items found only in List B
Example Input:
{
"key": "email",
"listA": [
{ "email": "[email protected]", "name": "Alice" },
{ "email": "[email protected]", "name": "Bob" }
],
"listB": [
{ "email": "[email protected]", "name": "Bobby" },
{ "email": "[email protected]", "name": "Carol" }
]
}
Output:
common:[ { "email": "[email protected]", "name": "Bob" } ]onlyInA:[ { "email": "[email protected]", "name": "Alice" } ]onlyInB:[ { "email": "[email protected]", "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.