The Execute Function component allows you to manipulate data using JavaScript code.

👍

Available in both Cards and Canvas flows.

❗️

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

Figure 1 - Function component settings

Figure 2 illustrates an example of Function component configuration.

Figure 2 - Function component configuration example

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

Figure 3 - Exits of Function component

📘

Troubleshooting

If you have questions or technical issues, please open a ticket using this form.