mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-11 12:57:29 -08:00
fix(Execute Workflow Node): Passing the workflow that is supposed to be executed as a paramter (#8614)
This commit is contained in:
parent
49062d169c
commit
b54488ada5
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue