Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.docpipe.ai/llms.txt

Use this file to discover all available pages before exploring further.

The transform node reshapes data produced by upstream nodes. Choose a mode to match your use case: convert data to a standard format, map fields into a new structure, or write a custom script.

When to use transform

  • You need the output in a specific format: CSV for a data warehouse, Excel for a finance team, XML for a legacy integration. Use Format mode.
  • The downstream system expects a different field shape than extract produced. Use Schema transform mode to remap names and nesting.
  • You need to compute derived values (totals, normalized currencies, days overdue) that shouldn’t have come from the AI. Use Script mode to do the math deterministically.
  • Skip transform when the extract output already matches the downstream schema. A pass-through transform adds runtime without value.

Mode

Select the top-level Mode to switch between transform behaviors:
ModeDescription
FormatConvert data to CSV, JSON, XML, or Excel
Schema transformMap input fields to a new output structure using field mapping and template expressions
ScriptWrite a custom script to transform data

Configuration

Format mode

FieldTypeRequiredDescription
Output formatselectYesTarget format: CSV, JSON, XML, or Excel
JSON pathstringNoJSONPath expression to select a subset of the input data
DelimiterstringNoColumn delimiter for CSV output. Defaults to ,
Include headersbooleanNoInclude column headers in CSV output. Defaults to true
Pretty printbooleanNoFormat JSON/XML output with indentation. Defaults to false
Sheet namestringNoWorksheet name for Excel output
Root elementstringNoRoot element name for XML output

Schema transform mode

FieldTypeRequiredDescription
Field mappingsmapping editorYesDefine output fields by mapping input field paths to output keys
Use > as the separator for nested field paths. For example, invoice > total refers to the total property inside the invoice object. The editor validates field references against the upstream node’s output schema and provides autocomplete suggestions as you type. You can use template expressions inside mapping values to concatenate fields, apply transformations, or insert literal text.

Script mode

FieldTypeRequiredDescription
Scriptcode editorYesThe script to execute. Reference upstream nodes by name, e.g. extract.payload.field
The script runs in an isolated environment. Each upstream node is exposed as a JS global with the same shape as {{nodeName}} in templates (success, payload, metadata, error). Return a value from the script to pass it to the next node.
// Combine an upstream extract with a variable node
return {
  customer: extract.payload.email,
  threshold: Number(vars.payload.amountLimit),
  flagged: extract.payload.amount > vars.payload.amountLimit
};

Inputs and outputs

Allowed inputs: Extract, review, route, merge. Output: Data converted, mapped, or transformed according to the configured mode.

Extract action

Extract structured data before transforming

Callback output

Deliver transformed data via webhook

Email output

Send transformed data via email

Review action

Review data before transforming