feat(Execute Workflow Trigger Node): Reintroduce binary data on Workflow Triggers (#15259)

This commit is contained in:
Charlie Kolb
2025-05-15 08:40:42 +02:00
committed by GitHub
parent f906dbaf63
commit 218007e625
2 changed files with 6 additions and 4 deletions

View File

@@ -212,14 +212,15 @@ export class ExecuteWorkflowTrigger implements INodeType {
} else {
const newParams = getFieldEntries(this);
const newKeys = new Set(newParams.fields.map((x) => x.name));
const itemsInSchema: INodeExecutionData[] = inputData.map((row, index) => ({
const itemsInSchema: INodeExecutionData[] = inputData.map(({ json, binary }, index) => ({
json: {
...Object.fromEntries(newParams.fields.map((x) => [x.name, FALLBACK_DEFAULT_VALUE])),
// Need to trim to the expected schema to support legacy Execute Workflow callers passing through all their data
// which we do not want to expose past this node.
..._.pickBy(row.json, (_value, key) => newKeys.has(key)),
..._.pickBy(json, (_value, key) => newKeys.has(key)),
},
index,
binary,
}));
return [itemsInSchema];