diff --git a/packages/workflow/src/WorkflowDataProxy.ts b/packages/workflow/src/WorkflowDataProxy.ts index ec7224fe48..9110584e56 100644 --- a/packages/workflow/src/WorkflowDataProxy.ts +++ b/packages/workflow/src/WorkflowDataProxy.ts @@ -461,10 +461,14 @@ export class WorkflowDataProxy { get(target, name, receiver) { if (name === 'isProxy') return true; - if ( - typeof process === 'undefined' || // env vars are inaccessible to frontend - process.env.N8N_BLOCK_ENV_ACCESS_IN_NODE === 'true' - ) { + if (typeof process === 'undefined') { + throw new ExpressionError('not accessible via UI, please run node', { + runIndex: that.runIndex, + itemIndex: that.itemIndex, + failExecution: true, + }); + } + if (process.env.N8N_BLOCK_ENV_ACCESS_IN_NODE === 'true') { throw new ExpressionError('access to env vars denied', { causeDetailed: 'If you need access please contact the administrator to remove the environment variable ‘N8N_BLOCK_ENV_ACCESS_IN_NODE‘',