Skip to content

Commit 0fa571e

Browse files
committed
fix(envvars): restore workflowUserId fallback for scheduled execution env var resolution
1 parent b0cb95b commit 0fa571e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

apps/sim/lib/workflows/executor/execution-core.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,10 @@ export async function executeWorkflowCore(
325325

326326
const mergedStates = mergeSubblockStateWithValues(blocks)
327327

328-
const personalEnvUserId = metadata.sessionUserId || metadata.userId
328+
const personalEnvUserId =
329+
metadata.isClientSession && metadata.sessionUserId
330+
? metadata.sessionUserId
331+
: metadata.workflowUserId || metadata.userId
329332

330333
if (!personalEnvUserId) {
331334
throw new Error('Missing execution actor for environment resolution')

0 commit comments

Comments
 (0)