Complete Lookup-Uniq
Complete Lookup-Uniq adds an ID mapping to a lookup and marks a value as processed in a Uniq collection in one step. It is the operation behind the Data Mapping Pattern when you also need the Do-Once Pattern: the moment a record is created in the target system, you record both "this source ID maps to this target ID" and "this record has been handled".
In n8n it lives under the Advanced resource.
When to use it
Use it at the end of a sync branch, right after the target system has returned the new ID. One node call replaces two (Add ID mappings to a lookup, then Add value to a Uniq), and the two writes happen together, so a workflow that stops between them cannot leave a mapping without its processed marker.
Configuration
| Parameter | Type | Required | Description |
|---|---|---|---|
| Lookup Collection Name | String | Yes | Lookup to add the mapping to. Letters, numbers, hyphens and underscores, up to 100 characters. |
| Left Value | String | Yes | The ID or key from the first system. |
| Right Value | String | Yes | The matching ID or key from the second system. |
| Uniq Collection Name | String | Yes | Uniq collection that tracks processed values. Same naming rules as above. |
| Uniq Value | String | Yes | The value to mark as processed, up to 255 characters (an order number, an email, a record ID). |
| Metadata | JSON | No | Under Advanced Settings. Stored with the Uniq value. |
Both collections must exist. Create them with Create a new lookup collection and Create a new Uniq collection, or from the dashboard.
Example
An order arrives from Shopify, is created in the ERP, and the ERP returns SO/1042:
| Parameter | Value |
|---|---|
| Lookup Collection Name | orders |
| Left Value | {{ $json.shopifyOrderId }} |
| Right Value | {{ $json.erpOrderNumber }} |
| Uniq Collection Name | orders-synced |
| Uniq Value | {{ $json.shopifyOrderId }} |
Response
{
"success": true,
"lookupResult": {
"id": "lookup_value123",
"left": "5678901234",
"right": "SO/1042",
"createdAt": "2024-01-01T10:00:00.000Z"
},
"uniqResult": {
"id": "uniq_value456",
"value": "5678901234",
"metadata": {},
"createdAt": "2024-01-01T10:00:00.000Z"
}
}
Errors
If either write fails the node raises an error with the HTTP status from the server, for example 409 when the lookup already holds that left value and the collection does not allow duplicates, or 402 when the licence limit is reached (the message includes the renewal link). With Continue on Fail enabled the item carries an error object with status, message, code and details instead of stopping the workflow.