# Add own functions to node red by using functionGlobalContext

**URL:** <https://discourse.nodered.org/t/add-own-functions-to-node-red-by-using-functionglobalcontext/17312>\
**Category:** General\
**Created:** [30 October 2019 08:35 UTC](https://discourse.nodered.org/t/add-own-functions-to-node-red-by-using-functionglobalcontext/17312 "2019-10-30T08:35:03Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![kuema](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/kuema/32/6542_2.png) [@kuema](https://discourse.nodered.org/u/kuema)\
**Post date:** [30 October 2019 08:41 UTC](https://discourse.nodered.org/t/add-own-functions-to-node-red-by-using-functionglobalcontext/17312/2 "2019-10-30T08:41:23Z")

</div>

If you search the forum, you will find that there are some solutions to your problem available already.

> [@Importing function from another node](https://discourse.nodered.org/t/importing-function-from-another-node/15885):
>
> Hi everyone, i want to import a function from another node. For example i have two nodes. One node e.g. the 'hello-world-node' prints "hello world" to a txt-file. The other node, 'fake-hello-world-node', should do the same as the 'hello-world-node' but the second node just import the functionality from the first node. Is this possible?

> [@Where to define class to use in multiple nodes](https://discourse.nodered.org/t/where-to-define-class-to-use-in-multiple-nodes/15808):
>
> Hi, I'm using node-red for some time now and just started to create custom nodes. Because of good documentation I was able to get pretty far up till now. I created 3 custom nodes so far. These are passing json objects. To create these objects I use multiple classes. This works fine as long as the class definition is inside the .js file. But I whould like to use these class definitions in multiple nodes. Copying them to the single file seems to be worst idea wink So is there any clever wa…

---

_[View the full topic](https://discourse.nodered.org/t/add-own-functions-to-node-red-by-using-functionglobalcontext/17312)._
