If you want to learn more about Custom Code Node, refer here.
Create your Functions
You can create your own functions to be used in the node by providing three things:- Code for the function
- Input fields
- Output fields.
1
Navigate
In the Cobalt dashboard, navigate to
Functions
under Advanced in the side menu.2
Create function
Click on 
+ Create Function
button and provide its Name.
3
Write function
Write your function and also define the input and output parameters that you require.
Once done, click on
Create
.You can also use JavaScript Libraries supported by Cobalt in the function code. Refer here to check the list of supported libraries.
Once a function is created, you can also edit it as required by selecting that function from
Functions
.Supported JavaScript Libraries & Usage
The full list for the supported npm modules that can be used to write your own internal function is below. If you don’t see the module that you want, contact us and we will get that added. How to use Libraries To know how you can use these external libraries in your Internal Code function, refer to the examples below for axios and lodash.Pre-defined Library functions
You can also use some pre-defined functions, also known as Library functions offered by Cobalt. These functions show up in the Functions node by default and can’t be edited. Few of the library functions are:- Find element in array,
- Encrypt string,
- Get current date; & many more.
