diff --git a/packages/cli/src/WorkflowExecuteAdditionalData.ts b/packages/cli/src/WorkflowExecuteAdditionalData.ts index d5b471def9..fa7f0abc0a 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;