From 8b23d341b4f61de04f7f9c817b3fbb4f35e91e6d Mon Sep 17 00:00:00 2001 From: Hiroyasu Nishiyama Date: Tue, 25 Jan 2022 21:04:43 +0900 Subject: [PATCH] add support for env var access of GROUP_ID & GROUP_NAME --- .../node_modules/@node-red/runtime/lib/flows/Flow.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/packages/node_modules/@node-red/runtime/lib/flows/Flow.js b/packages/node_modules/@node-red/runtime/lib/flows/Flow.js index 62ec10ce3..3538a9d30 100644 --- a/packages/node_modules/@node-red/runtime/lib/flows/Flow.js +++ b/packages/node_modules/@node-red/runtime/lib/flows/Flow.js @@ -424,6 +424,17 @@ class Flow { */ getGroupEnvSetting(node, group, name) { if (group) { + if (name === "GROUP_NAME") { + return [{ + val: group.name + }, null]; + } + if (name === "GROUP_ID") { + return [{ + val: group.id + }, null]; + } + if (group.credentials === undefined) { group.credentials = credentials.get(group.id) || {}; }