Skip to main content

Data Processing

What this category is for

Use data-processing nodes to transform payloads, run custom logic, and shape data for routing, validation, storage, and final responses.

Node list table

Node typePurposeKey inputsBranch outputs
set_nodeBuild/reshape JSON using expression-based assignments without writing code.Config merge_mode, assignments; optional input base in merge modenone
xml_nodeConvert XML ↔ JSON; optional SOAP Body unwrap for incoming XML.Input data; config operation, optional unwrap_soap_body, root_elementsuccess, error
code_nodeExecute custom JavaScript in a V8 runtime against upstream node outputs.Config code (required), timeout_mssuccess, error

Common patterns

1) Build a response contract

  • Use set_node with merge_mode: replace
  • Assign paths like data, meta.request_id, errors
  • Feed set_node.result into response_node.body

2) Patch existing request body safely

  • set_node with merge_mode: merge
  • base = {{ $json['http_trigger'].request.body }}
  • Add/override only required fields via assignments

3) Lightweight custom business rule

  • Use code_node to compute derived fields (totals, eligibility flags, normalization)
  • On code_node.error, route to error response or fallback branch

4) Parse and map third-party responses

  • http_request_node -> code_node for special parsing
  • Return a compact object from code and pass it to downstream nodes

Common mistakes and how to debug

  • set_node expression errors: invalid expression returns partial output and error in node output. Test each assignment incrementally.
  • Empty path confusion in set_node: empty path spreads an object into root. If expression returns non-object, nothing is merged.
  • code_node timeout: long loops or expensive transforms exceed timeout_ms. Increase timeout or simplify code.
  • Missing upstream data in code_node: runtime context only includes upstream outputs ($json style context). Check node IDs and execution order.
  • Silent type mismatch: downstream nodes may expect object but receive string. Inspect result in node test output before wiring further.