Functions
The Execute Function component allows you to manipulate data using JavaScript code.
Similar to other components, it is mandatory to provide a Component name (Figure 1 - 1).
You must also add JavaScript code to the code editor (Figure 1 - 2), with a limit of 3000 characters. If the code exceeds this limit, you can split the logic and use multiple Function components.
A button is available to add variables for use in the automation, allowing you to do so without leaving the Function component settings (Figure 1 - 2).
![Figure 1 - Function component settings](https://files.readme.io/a6d11a5-Figure_1_-_Function_component_settings.png)
Figure 1 - Function component settings
Figure 2 illustrates an example of Function component configuration.
![Figure 2 - Function component configuration example](https://files.readme.io/2599a72-Figure_2_-_Function_component_configuration_example.png)
Figure 2 - Function component configuration example
The Function component has two default exits:
- Success (Figure 3 - 1): triggered when the function executes without errors or when a condition evaluates true.
- Error (Figure 3 - 2): triggered when the function encounters an error during execution or when a condition evaluates to false.
These two exits must be connected to other components.
![Figure 3 - Exits of Function component](https://files.readme.io/ffad900-Figure_3_-_Exits_of_Function_component.png)
Figure 3 - Exits of Function component
Troubleshooting
If you have questions or technical issues, please open a ticket using this form.
Updated 9 months ago