From b54488ada53a9941f5fd4d3cab8d39bd81b22f4a Mon Sep 17 00:00:00 2001 From: Danny Martini Date: Tue, 13 Feb 2024 12:49:21 +0100 Subject: [PATCH] fix(Execute Workflow Node): Passing the workflow that is supposed to be executed as a paramter (#8614) --- .../nodes-base/nodes/ExecuteWorkflow/GenericFunctions.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/nodes-base/nodes/ExecuteWorkflow/GenericFunctions.ts b/packages/nodes-base/nodes/ExecuteWorkflow/GenericFunctions.ts index b91d6ee4b5..077e4f5001 100644 --- a/packages/nodes-base/nodes/ExecuteWorkflow/GenericFunctions.ts +++ b/packages/nodes-base/nodes/ExecuteWorkflow/GenericFunctions.ts @@ -1,6 +1,6 @@ import { readFile as fsReadFile } from 'fs/promises'; import { NodeOperationError, jsonParse } from 'n8n-workflow'; -import type { IWorkflowBase, IExecuteFunctions, IExecuteWorkflowInfo } from 'n8n-workflow'; +import type { IExecuteFunctions, IExecuteWorkflowInfo } from 'n8n-workflow'; export async function getWorkflowInfo(this: IExecuteFunctions, source: string, itemIndex = 0) { const workflowInfo: IExecuteWorkflowInfo = {}; @@ -29,7 +29,8 @@ export async function getWorkflowInfo(this: IExecuteFunctions, source: string, i workflowInfo.code = jsonParse(workflowJson); } else if (source === 'parameter') { // Read workflow from parameter - workflowInfo.code = this.getNodeParameter('workflowJson', itemIndex) as IWorkflowBase; + const workflowJson = this.getNodeParameter('workflowJson', itemIndex) as string; + workflowInfo.code = jsonParse(workflowJson); } else if (source === 'url') { // Read workflow from url const workflowUrl = this.getNodeParameter('workflowUrl', itemIndex) as string;