diff --git a/packages/nodes-base/nodes/ExecuteWorkflow.node.ts b/packages/nodes-base/nodes/ExecuteWorkflow.node.ts index 1ce92965fd..ec1c161a0d 100644 --- a/packages/nodes-base/nodes/ExecuteWorkflow.node.ts +++ b/packages/nodes-base/nodes/ExecuteWorkflow.node.ts @@ -1,5 +1,3 @@ -import { OptionsWithUri } from 'request'; - import { readFile as fsReadFile, } from 'fs'; @@ -9,9 +7,7 @@ const fsReadFileAsync = promisify(fsReadFile); import { IExecuteFunctions } from 'n8n-core'; import { - ILoadOptionsFunctions, INodeExecutionData, - INodePropertyOptions, INodeType, INodeTypeDescription, IExecuteWorkflowInfo, @@ -69,9 +65,9 @@ export class ExecuteWorkflow implements INodeType { // source:database // ---------------------------------- { - displayName: 'Workflow', + displayName: 'Workflow ID', name: 'workflowId', - type: 'options', + type: 'string', displayOptions: { show: { source: [ @@ -79,9 +75,6 @@ export class ExecuteWorkflow implements INodeType { ], }, }, - typeOptions: { - loadOptionsMethod: 'getWorkflows', - }, default: '', required: true, description: 'The workflow to execute.', @@ -153,31 +146,6 @@ export class ExecuteWorkflow implements INodeType { ] }; - methods = { - loadOptions: { - async getWorkflows(this: ILoadOptionsFunctions): Promise { - const options: OptionsWithUri = { - method: 'GET', - uri: this.getRestApiUrl() + '/workflows', - json: true - }; - - const returnData: INodePropertyOptions[] = []; - - const responseData = await this.helpers.request!(options); - for (const workflowData of responseData.data) { - returnData.push({ - name: workflowData.name, - value: workflowData.id, - }); - } - - return returnData; - } - }, - }; - - async execute(this: IExecuteFunctions): Promise { const items = this.getInputData(); const source = this.getNodeParameter('source', 0) as string;