# Expose subflow template name as default subflow property (\`NR\_SUBFLOW\_TEMPLATE\_NAME\`)

**URL:** <https://discourse.nodered.org/t/expose-subflow-template-name-as-default-subflow-property-nr-subflow-template-name/99454>\
**Category:** Feature Requests\
**Created:** [19 October 2025 20:20 UTC](https://discourse.nodered.org/t/expose-subflow-template-name-as-default-subflow-property-nr-subflow-template-name/99454 "2025-10-19T20:20:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gdvine](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gdvine/32/101799_2.png) [@gdvine](https://discourse.nodered.org/u/gdvine)\
**Post date:** [19 October 2025 20:20 UTC](https://discourse.nodered.org/t/expose-subflow-template-name-as-default-subflow-property-nr-subflow-template-name/99454/1 "2025-10-19T20:20:53Z")

</div>

`NR_SUBFLOW_NAME` returns blank string if the instance name is empty.

This is quite inconvenient and encourages drift as it requires one to set a subflow property manually to the same name as the template if a dev wants to use the subflow's name somewhere but doesn't want to have to define a name for every single instance of it. The flow name is exposed to runtime, so this is a hole in functionality imo. My system tracks runs through various subflows and having to define a subflow property manually mirroring the subflow template name introduces desynchronization risk between the strings used.

FR: Introduce built-in subflow property `NR_SUBFLOW_TEMPLATE_NAME` (or some other property name as determined by the dev).

What I actually need is a "currently active subflow name" (instance, or if none, then template), but given that `NR_SUBFLOW_NAME` strictly returns the instance name, it seems cleaner simply to introduce a new, discrete default subflow property in Node-RED.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [18 December 2025 20:21 UTC](https://discourse.nodered.org/t/expose-subflow-template-name-as-default-subflow-property-nr-subflow-template-name/99454/2 "2025-12-18T20:21:05Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
