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
llm_nodeSend a prompt to any LLM (OpenAI, Anthropic, Azure, Gemini, Groq, OpenRouter, Ollama, OpenAI-compatible, Bedrock, Vertex, or the Zerq AI Gateway): summarise, classify, extract, draft. Optional JSON output.Config provider, credentials_id, model, response_format; inputs system, prompt or messagessuccess, error
agent_nodeAI agent: an LLM that calls HTTP tools in a loop until it answers, with optional chat memory per session.Config: model settings as llm_node, tools, max_iterations, memory; inputs system, prompt, session_idsuccess, 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

Extract fields from free text with a model​

  • llm_node with response_format: json and a system prompt that names the fields
  • prompt = {{ $json['http_trigger'].request.body.message }}
  • Use {{ $json['llm_node'].json.<field> }} downstream; route error to a fallback. See LLM Node

Answer questions with live data​

  • agent_node with a get_order-style HTTP tool and chat memory keyed by the chat ID
  • Route success to a response_node with {{ $json['agent_node'].text }}. See AI Agent Node

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.