# Is there any option to get "config" details in a function node?

**URL:** <https://discourse.nodered.org/t/is-there-any-option-to-get-config-details-in-a-function-node/64332>\
**Category:** General\
**Tags:** function-node\
**Created:** [24 June 2022 18:37 UTC](https://discourse.nodered.org/t/is-there-any-option-to-get-config-details-in-a-function-node/64332 "2022-06-24T18:37:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![aswink](https://avatars.discourse-cdn.com/v4/letter/a/ecc23a/32.png) [@aswink](https://discourse.nodered.org/u/aswink)\
**Post date:** [24 June 2022 18:37 UTC](https://discourse.nodered.org/t/is-there-any-option-to-get-config-details-in-a-function-node/64332/1 "2022-06-24T18:37:09Z")

</div>

Hello All,

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/4/0488b213111142c39f8cd1cbe95715706486158d.png)  
I have a configuration in my flow like this, is there any way to get the saved "configuration" in a normal function node? In this case I wanted to get the "share" path(Just like context global.get() or flow.get())

Thanks in advance  
Aswin

---

<div class="post-metadata">

**Author:** ![marcus-j-davies](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marcus-j-davies/32/103435_2.png) [@marcus-j-davies](https://discourse.nodered.org/u/marcus-j-davies)\
**Post date:** [24 June 2022 18:40 UTC](https://discourse.nodered.org/t/is-there-any-option-to-get-config-details-in-a-function-node/64332/2 "2022-06-24T18:40:05Z")

</div>

To my knowledge there isn't - at least, I have never needed to.  
This can be seen as a security concern if so, if config nodes have credential info for example.

I of course could be entirerly wrong here.

---

<div class="post-metadata">

**Author:** ![UnborN](https://avatars.discourse-cdn.com/v4/letter/u/4491bb/32.png) [@UnborN](https://discourse.nodered.org/u/UnborN)\
**Post date:** [24 June 2022 21:35 UTC](https://discourse.nodered.org/t/is-there-any-option-to-get-config-details-in-a-function-node/64332/3 "2022-06-24T21:35:39Z")

</div>

Hello .. maybe you can utilize Node-red's [HTTP Admin API](https://nodered.org/docs/api/admin/methods/) and request the whole flow structure  
and from there filter() the Config node you want .. its easier if you give it a meaningful name and filter based on that. A bit unorthodox but it can work.

**Example Flow: ( change to your Node-red IP or 127.0.0.1 in the http request node and here my config node is named: myConfigName )**

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/9/3912fc48f30720dcfff220260c9eec9778e48792.png)

```auto
[{"id":"f76721acb741bb55","type":"inject","z":"54efb553244c241f","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":180,"y":1720,"wires":[["9b63df0395b4bce0"]]},{"id":"b3cbefec92b59701","type":"http request","z":"54efb553244c241f","name":"","method":"GET","ret":"obj","paytoqs":"ignore","url":"https://192.168.0.7:1880/flows","tls":"","persist":false,"proxy":"","authType":"","senderr":false,"headers":[],"x":510,"y":1720,"wires":[["99b1314d6141b27e"]]},{"id":"7a3aafde7c3132d0","type":"debug","z":"54efb553244c241f","name":"debug 1","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":820,"y":1720,"wires":[]},{"id":"9b63df0395b4bce0","type":"function","z":"54efb553244c241f","name":"","func":"// only needed if nr runs on https with self signed cert ?\nmsg.rejectUnauthorized = false;\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":340,"y":1720,"wires":[["b3cbefec92b59701"]]},{"id":"99b1314d6141b27e","type":"function","z":"54efb553244c241f","name":"filter ","func":"// replace string with your config node's name\n\nmsg.payload = msg.payload.filter(el => el.name === \"myConfigName\")\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":670,"y":1720,"wires":[["7a3aafde7c3132d0"]]}]

```

---

<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:** [23 August 2022 21:36 UTC](https://discourse.nodered.org/t/is-there-any-option-to-get-config-details-in-a-function-node/64332/4 "2022-08-23T21:36:28Z")

</div>

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