NodesCore
Map Data
Transform each workflow item into a new JSON shape.
Map Data
Description
MapData maps each input item to a new output JSON value. Use it to normalize payloads, add derived fields, or prepare data for the next node.
MapData keeps inbound binaries by default. That makes it a good fit for JSON reshaping steps that still need to preserve attachments such as uploaded files, OCR inputs, or email attachments.
Examples
Basic usage: add a derived status field
new MapData("Mark invoice as ready", (item) => ({
...item.json,
status: "ready",
}));Example input:
{
"invoiceId": "inv_42",
"amount": 799
}Example output:
{
"invoiceId": "inv_42",
"amount": 799,
"status": "ready"
}Advanced usage: reshape nested input for downstream APIs
new MapData("Prepare CRM payload", (item) => ({
customerId: item.json.customer.id,
customerName: item.json.customer.name,
total: item.json.invoice.total,
currency: item.json.invoice.currency,
}));The reshaped JSON becomes the new item.json, while inbound binaries still flow through by default.
Disable binary preservation
new MapData(
"Prepare API payload",
(item) => ({
documentId: item.json.id,
filename: item.json.filename,
}),
{
keepBinaries: false,
},
);Use keepBinaries: false when the mapped output should intentionally drop attachments and continue with JSON only.
Example input:
{
"customer": {
"id": "cus_9",
"name": "Acme Corp"
},
"invoice": {
"total": 799,
"currency": "EUR"
}
}Example output:
{
"customerId": "cus_9",
"customerName": "Acme Corp",
"total": 799,
"currency": "EUR"
}