From 1bed5a264e0610a6e059fe5e2ed5015df223e944 Mon Sep 17 00:00:00 2001 From: Henry Heng Date: Thu, 17 Jul 2025 18:32:09 +0100 Subject: [PATCH] Bugfix/empty vars (#4892) * update workspaceId to vars * fix vars and duplicated response --- .../components/nodes/agentflow/ExecuteFlow/ExecuteFlow.ts | 3 ++- packages/server/src/queue/PredictionQueue.ts | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/components/nodes/agentflow/ExecuteFlow/ExecuteFlow.ts b/packages/components/nodes/agentflow/ExecuteFlow/ExecuteFlow.ts index b1f62bb9..edc72053 100644 --- a/packages/components/nodes/agentflow/ExecuteFlow/ExecuteFlow.ts +++ b/packages/components/nodes/agentflow/ExecuteFlow/ExecuteFlow.ts @@ -181,7 +181,8 @@ class ExecuteFlow_Agentflow implements INode { if (selectedFlowId === options.chatflowid) throw new Error('Cannot call the same agentflow!') let headers: Record = { - 'Content-Type': 'application/json' + 'Content-Type': 'application/json', + 'flowise-tool': 'true' } if (chatflowApiKey) headers = { ...headers, Authorization: `Bearer ${chatflowApiKey}` } diff --git a/packages/server/src/queue/PredictionQueue.ts b/packages/server/src/queue/PredictionQueue.ts index af91d8fb..10cc125f 100644 --- a/packages/server/src/queue/PredictionQueue.ts +++ b/packages/server/src/queue/PredictionQueue.ts @@ -87,7 +87,9 @@ export class PredictionQueue extends BaseQueue { return await executeCustomNodeFunction({ appDataSource: this.appDataSource, componentNodes: this.componentNodes, - data: executeCustomFunctionData.data + data: executeCustomFunctionData.data, + workspaceId: executeCustomFunctionData.workspaceId, + orgId: executeCustomFunctionData.orgId }) }