# Is it possible to compose a new node that comprises of several built-in or other nodes?

**URL:** <https://discourse.nodered.org/t/is-it-possible-to-compose-a-new-node-that-comprises-of-several-built-in-or-other-nodes/48146>\
**Category:** General\
**Created:** [7 July 2021 18:25 UTC](https://discourse.nodered.org/t/is-it-possible-to-compose-a-new-node-that-comprises-of-several-built-in-or-other-nodes/48146 "2021-07-07T18:25:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rudaNode](https://avatars.discourse-cdn.com/v4/letter/r/58f4c7/32.png) [@rudaNode](https://discourse.nodered.org/u/rudaNode)\
**Post date:** [7 July 2021 18:25 UTC](https://discourse.nodered.org/t/is-it-possible-to-compose-a-new-node-that-comprises-of-several-built-in-or-other-nodes/48146/1 "2021-07-07T18:25:42Z")

</div>

I would like to abstract multiple built-in or other nodes that are currently available to create one single composite node. In other words, if these built-in/other nodes have UI information that need to be set, I would like to set those values directly from my composite node. The idea is to delegate the processing of a particular task (that is exposed by these other nodes) to these nodes directly (in my composite node).

For example, I want to monitor files from a directory. When ever a new file appears in the directory, I want to parse the records and create json messages for each record. Yet I want to expose all this functionality as a single composite node.

I want to leverage the built-in components 'watch-directory' node to watch for files, 'file in' node to read the file content and generate message for each record, 'csv' node to transform each record to each json message. Yet I want to hide all of these components under my new composite node to do the actual work.

1. Is this possible with minimal work?
2. Is this a good idea or bad idea?
3. What are the pitfalls?

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [7 July 2021 18:36 UTC](https://discourse.nodered.org/t/is-it-possible-to-compose-a-new-node-that-comprises-of-several-built-in-or-other-nodes/48146/2 "2021-07-07T18:36:20Z")

</div>

The typically way of doing that today would be to create a Subflow that incorporates all of the nodes you want, and use subflow properties to let you customise the configuration of the nodes inside the subflow.

[https://nodered.org/docs/user-guide/editor/workspace/subflows](https://nodered.org/docs/user-guide/editor/workspace/subflows)

---

<div class="post-metadata">

**Author:** ![rudaNode](https://avatars.discourse-cdn.com/v4/letter/r/58f4c7/32.png) [@rudaNode](https://discourse.nodered.org/u/rudaNode)\
**Post date:** [8 July 2021 00:39 UTC](https://discourse.nodered.org/t/is-it-possible-to-compose-a-new-node-that-comprises-of-several-built-in-or-other-nodes/48146/3 "2021-07-08T00:39:44Z")

</div>

This is exactly what I am looking for. Thanks.

---

<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:** [22 July 2021 00:40 UTC](https://discourse.nodered.org/t/is-it-possible-to-compose-a-new-node-that-comprises-of-several-built-in-or-other-nodes/48146/4 "2021-07-22T00:40:24Z")

</div>

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