From cbf4818feacae987e3df7925ca088c409f59e452 Mon Sep 17 00:00:00 2001 From: Jan Oberhauser Date: Mon, 20 Jan 2020 10:22:12 -0600 Subject: [PATCH] :bug: Fix bug with credentials in integrated workflows --- packages/cli/src/WorkflowExecuteAdditionalData.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/cli/src/WorkflowExecuteAdditionalData.ts b/packages/cli/src/WorkflowExecuteAdditionalData.ts index d5b471def..fa7f0abc0 100644 --- a/packages/cli/src/WorkflowExecuteAdditionalData.ts +++ b/packages/cli/src/WorkflowExecuteAdditionalData.ts @@ -9,6 +9,7 @@ import { Push, ResponseHelper, WebhookHelpers, + WorkflowCredentials, WorkflowHelpers, } from './'; @@ -306,6 +307,10 @@ export async function executeWorkflow(workflowInfo: IExecuteWorkflowInfo, additi const additionalDataIntegrated = await getBase(additionalData.credentials); additionalDataIntegrated.hooks = getWorkflowHooksIntegrated(mode, executionId, workflowData!, { parentProcessMode: additionalData.hooks!.mode }); + // Get the needed credentials for the current workflow as they will differ to the ones of the + // calling workflow. + additionalDataIntegrated.credentials = await WorkflowCredentials(workflowData!.nodes); + // Find Start-Node const requiredNodeTypes = ['n8n-nodes-base.start']; let startNode: INode | undefined;