Skip to content

The open alternative to Salesforce, designed for AI.

fix(ai-agent-node) - agent node execution error (#20534)

Etienne3d90b3882bcc
diff --git a/packages/twenty-server/src/modules/workflow/workflow-executor/workflow-actions/ai-agent/ai-agent.workflow-action.ts b/packages/twenty-server/src/modules/workflow/workflow-executor/workflow-actions/ai-agent/ai-agent.workflow-action.ts
index 11cec77b201..5676037004d 100644
--- a/packages/twenty-server/src/modules/workflow/workflow-executor/workflow-actions/ai-agent/ai-agent.workflow-action.ts
+++ b/packages/twenty-server/src/modules/workflow/workflow-executor/workflow-actions/ai-agent/ai-agent.workflow-action.ts
@@ -48,7 +48,7 @@ export class AiAgentWorkflowAction implements WorkflowAction {
}
const { agentId, prompt } = step.settings.input;
- const workspaceId = context.workspaceId as string;
+ const workspaceId = runInfo.workspaceId;
let agent: AgentEntity | null = null;