Wrap nodes in a function

Is there a way of wrapping a set of nodes into a function? Imagine you have 5 nodes that go to a website and scrap some content, and you want to use the result of that on other flows. Create a node that does all that, and then call it. Just like a function in any programming language.

Thanks!

I'll answer my own question :upside_down_face:. Found the answer on https://nodered.org/docs/user-guide/editor/workspace/subflows

Take a look at subflows - you can select a number of nodes then go to the hamburger menu and select the 'Subflow' option