Skip to content
// One item per converted workflow, shaped for the n8n API (it rejects id, active and pinData).
return $input.first().json.scenarios.map((x) => ({ json: { name: x.name, body: { name: x.workflow.name, nodes: x.workflow.nodes, connections: x.workflow.connections, settings: x.workflow.settings } } }));