Data Lookup
Retrieves a value from a provided dictionary or map based on a specific key.
Looks up a key or dotted path in a dictionary with lodash get and routes to found with the value added as lookup_result, or to miss with the payload unchanged.
This operator is used for simple reference data enrichment. It takes a static or dynamic source map and attempts to find a match for the input key.
Use Cases:
- Enrichment: looking up a "Country Name" from a "Country Code" (e.g., "US" -> "United States").
- Mapping: Translating status codes (e.g., 200 -> "OK").
- Authorization: Checking if a User ID exists in an "Admin List".
How it works
- Resolves the config:
{{ }}insourceandkey_templateare evaluated by the Expression Engine. - Fails when
key_templateis missing or resolves to an empty value. - Converts the key to a string and reads it with
_.get(source, key): dotted paths and indexes such asregions.north[0]work. JSONata is not used. - Any value other than
undefined(includingnull) counts as found: returns the payload pluslookup_resultthroughfound. - Otherwise returns the payload unchanged through
miss. Both setmeta{ found, key }.
In a workflow
The node as it appears in a workflow file (draft_nodes[]), and the envelope of a successful run.
{
"node_id": "node-country-name",
"label": "Country name",
"operator_slug": "data.lookup",
"operator_version": "1.0.0",
"config": {
"source": {
"US": "United States",
"CO": "Colombia",
"MX": "Mexico"
},
"key_template": "{{ $json.country_code }}"
}
}{
"ok": true,
"data": {
"country_code": "US",
"lookup_result": "United States"
},
"meta": {
"found": true,
"key": "US"
},
"port": "found"
}Configuration
-
sourceobject Required -
Key-Value pairs to search within (e.g., {"US": "United States"}).
-
key_templatestring Required Accepts expressions -
Key or dotted path looked up in the dictionary (lodash get). Use {{ }} to derive it from the payload, e.g. {{ $json.country_code }}. JSONata is not supported.
Its configuration shows the shared execution settings, but this node does not apply retries (retryOnFail, maxTries) yet. continueOnFail is not applied by any node.
Behaviour in the code
What the implementation does with these keys beyond what the schema says.
-
key_template - Text without
{{ }}is taken as a literal key. To read the key from the payload write{{ $json.country_code }}. -
source - Defaults to
{}when missing, so every lookup misses. It can be a{{ }}that returns an object from an earlier node.
Output ports
found default The key exists in source.
{
"country_code": "US",
"lookup_result": "United States"
}miss The key does not exist in source.
{
"country_code": "BR"
}error key_template is empty.
{
"ok": false,
"errors": [
"Key template is required"
],
"port": "error"
}In expressions
What a later node can read from this node's output with $("Data Lookup").item.json.<path> (write your node's label instead of Data Lookup). Editor marks the paths the workflow editor suggests under Previous Nodes (the output contract); Worker marks the paths the worker really returns through found, from the output shown in Ports.
| Expression | Editor | Worker |
|---|---|---|
$("Data Lookup").item.json.valueThe retrieved value from the dictionary. | — | |
$("Data Lookup").item.json.found | — | |
$("Data Lookup").item.json.country_code | — | |
$("Data Lookup").item.json.lookup_result | — |
— Editor: The editor suggests it, but the worker does not return it: it reads as undefined.
— Worker: The worker returns it but the editor does not suggest it: write it by hand. Keys inside objects can depend on your data or configuration (for example one key per label).
Errors
| Message | Port | Cause and fix |
|---|---|---|
Key template is required | error | key_template is missing, or its {{ }} resolved to undefined, null, "", 0 or false. |
Input contract
-
payloadobject Optional -
Context for key resolution.
Output contract
-
valueany Optional -
The retrieved value from the dictionary.
-
foundboolean Optional
Contracts (JSON Schema)
The definition exactly as the orchestrator declares it. All is the whole *.definition.js; compare it with the sections above to spot differences between the documentation and the schema. Use it to validate a node before you publish.
{
"slug": "data.lookup",
"name": "Data Lookup",
"category": "data",
"version": "1.0.0",
"description": "Retrieves a value from a provided dictionary or map based on a specific key.\n\n This operator is used for simple reference data enrichment. It takes a static or dynamic source map and attempts to find a match for the input key.\n\n **Use Cases:**\n - **Enrichment:** looking up a \"Country Name\" from a \"Country Code\" (e.g., \"US\" -> \"United States\").\n - **Mapping:** Translating status codes (e.g., 200 -> \"OK\").\n - **Authorization:** Checking if a User ID exists in an \"Admin List\".",
"capabilities": [
"enrichment",
"map",
"dictionary"
],
"config_schema": {
"type": "object",
"required": [
"source",
"key_template"
],
"properties": {
"source": {
"type": "object",
"title": "Dictionary / Map",
"description": "Key-Value pairs to search within (e.g., {\"US\": \"United States\"})."
},
"key_template": {
"type": "string",
"title": "Key Expression",
"format": "expression",
"description": "Key or dotted path looked up in the dictionary (lodash get). Use {{ }} to derive it from the payload, e.g. {{ $json.country_code }}. JSONata is not supported."
},
"execution": {
"type": "object",
"title": "Execution Settings",
"properties": {
"alwaysOutputData": {
"type": "boolean",
"title": "Always Output Data",
"description": "Always output data, even on error (if configured).",
"default": false
},
"retryOnFail": {
"type": "boolean",
"title": "Retry On Fail",
"description": "Retry the execution if it fails.",
"default": false
},
"maxTries": {
"type": "integer",
"title": "Max Retries",
"description": "Number of retries.",
"default": 3,
"displayOptions": {
"show": {
"retryOnFail": [
true
]
}
}
},
"waitBetweenTries": {
"type": "integer",
"title": "Wait Between Retries (ms)",
"default": 1000,
"displayOptions": {
"show": {
"retryOnFail": [
true
]
}
}
},
"continueOnFail": {
"type": "boolean",
"title": "Continue On Fail",
"description": "Do not crash workflow on error.",
"default": false
},
"timeout_ms": {
"type": "integer",
"title": "Timeout (ms)",
"description": "Max execution time for this node before it is killed, in milliseconds. Honored by long-running operators (e.g. OCR/extraction, inline code). Default 300000 (5 min).",
"default": 300000
}
}
}
}
},
"input_contract_schema": {
"type": "object",
"properties": {
"payload": {
"type": "object",
"description": "Context for key resolution."
}
}
},
"output_contract_schema": {
"type": "object",
"description": "The found value or original payload.",
"properties": {
"value": {
"type": "any",
"description": "The retrieved value from the dictionary."
},
"found": {
"type": "boolean"
}
}
},
"ports": [
{
"port_id": "found",
"label": "Found",
"is_default": true,
"description": "Key exists in dictionary."
},
{
"port_id": "miss",
"label": "Missing",
"description": "Key not found."
},
{
"port_id": "error",
"label": "Error"
}
],
"execution_mode": "sync",
"tags": [
"map",
"dictionary",
"lookup"
],
"is_stateful": false,
"publisher": {
"identity": "org_link_loom",
"profile": {
"name": "Link Loom",
"verified": true,
"url": "https://me.veripass.com/link-loom",
"logo_url": null
}
}
}{
"type": "object",
"required": [
"source",
"key_template"
],
"properties": {
"source": {
"type": "object",
"title": "Dictionary / Map",
"description": "Key-Value pairs to search within (e.g., {\"US\": \"United States\"})."
},
"key_template": {
"type": "string",
"title": "Key Expression",
"format": "expression",
"description": "Key or dotted path looked up in the dictionary (lodash get). Use {{ }} to derive it from the payload, e.g. {{ $json.country_code }}. JSONata is not supported."
},
"execution": {
"type": "object",
"title": "Execution Settings",
"properties": {
"alwaysOutputData": {
"type": "boolean",
"title": "Always Output Data",
"description": "Always output data, even on error (if configured).",
"default": false
},
"retryOnFail": {
"type": "boolean",
"title": "Retry On Fail",
"description": "Retry the execution if it fails.",
"default": false
},
"maxTries": {
"type": "integer",
"title": "Max Retries",
"description": "Number of retries.",
"default": 3,
"displayOptions": {
"show": {
"retryOnFail": [
true
]
}
}
},
"waitBetweenTries": {
"type": "integer",
"title": "Wait Between Retries (ms)",
"default": 1000,
"displayOptions": {
"show": {
"retryOnFail": [
true
]
}
}
},
"continueOnFail": {
"type": "boolean",
"title": "Continue On Fail",
"description": "Do not crash workflow on error.",
"default": false
},
"timeout_ms": {
"type": "integer",
"title": "Timeout (ms)",
"description": "Max execution time for this node before it is killed, in milliseconds. Honored by long-running operators (e.g. OCR/extraction, inline code). Default 300000 (5 min).",
"default": 300000
}
}
}
}
}{
"type": "object",
"properties": {
"payload": {
"type": "object",
"description": "Context for key resolution."
}
}
}{
"type": "object",
"description": "The found value or original payload.",
"properties": {
"value": {
"type": "any",
"description": "The retrieved value from the dictionary."
},
"found": {
"type": "boolean"
}
}
}[
{
"port_id": "found",
"label": "Found",
"is_default": true,
"description": "Key exists in dictionary."
},
{
"port_id": "miss",
"label": "Missing",
"description": "Key not found."
},
{
"port_id": "error",
"label": "Error"
}
]Execution
- Execution
sync- Stateful
- No
- Retries (
retryOnFail) - No
- Capabilities
enrichmentmapdictionary- Tags
mapdictionarylookup
Notes and limits
- The output key is
lookup_result; thevalueandfoundfields of the output contract are not produced (foundexists only inmeta). metais recorded in the run steps only: downstream nodes receivedataas their payload and cannot readmetathrough$jsonor$("Node").- When the envelope has no
data(ordatais falsy), the engine stores the whole envelope as the node output: onerrorthe next node receives{ ok: false, errors: [...], port: "error" }as its payload.
Reviewed against the orchestrator code · 31e874b · 2026-11-26