🐛 Fix bug with credentials in integrated workflows

This commit is contained in:
Jan Oberhauser 2020-01-20 10:22:12 -06:00
parent b0c6f1cf1b
commit cbf4818fea

View file

@ -9,6 +9,7 @@ import {
Push, Push,
ResponseHelper, ResponseHelper,
WebhookHelpers, WebhookHelpers,
WorkflowCredentials,
WorkflowHelpers, WorkflowHelpers,
} from './'; } from './';
@ -306,6 +307,10 @@ export async function executeWorkflow(workflowInfo: IExecuteWorkflowInfo, additi
const additionalDataIntegrated = await getBase(additionalData.credentials); const additionalDataIntegrated = await getBase(additionalData.credentials);
additionalDataIntegrated.hooks = getWorkflowHooksIntegrated(mode, executionId, workflowData!, { parentProcessMode: additionalData.hooks!.mode }); 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 // Find Start-Node
const requiredNodeTypes = ['n8n-nodes-base.start']; const requiredNodeTypes = ['n8n-nodes-base.start'];
let startNode: INode | undefined; let startNode: INode | undefined;