JavaScript Function

NicoChat now allows your users to carry out complex flow logic using the JavaScript action. Users can write JavaScript code to build various complex flows and formulas that NicoChat does not yet support natively.

2026-08-12

Selecting the JavaScript action node

Create an Action node block, click on Advanced Actions and select the JavaScript Function node.

JavaScript Function Node

A JavaScript function works exactly like a function. All parameters are first parsed in the JavaScript block before they can be used. The top part of the action is used for the input.

Parameter Name: add the name of the variable you are parsing.

Parameter Value: add the Contact Field you want to parse into the JavaScript function.

Test Value: add a test value that can be used here to run tests.

The function block supports multiple JavaScript libraries.

These JavaScript libraries extend the functionality of the native function block.

In the function block, you can write your JavaScript code.

After writing the code, you always need to return the value, because the function block works like a regular function.

Note: native JavaScript methods that require a browser, such as console.log, do not work in the JavaScript Function node.

You can map the results of your code to update certain Contact Fields.

Note: when handling JSONs, all of them need to be parsed before being used inside the code.