How to use JavaScript code in Albato

How to use JavaScript code in Albato
JavaScript
·
11/29/2022
·
4 min. read

Albato’s new feature - JavaScript code - allows you to run your own custom code. Just enter your code into the automation settings following this step-by-step instruction.

How to add

Open the Automation builder. Pick the automation scenario to add the JavaScript action or create a new one.

Click the Add an action button.

Choose the JavaScript app in the App field.

Click the Add an action button.

unnamed.png

How to set up

First, set up the Input data variable:

  • create a variable
  • set the name
  • specify the value

unnamed (1).png

To add more variables, click on the Add a field button and follow the previous steps.

unnamed (2).png

You can also remove unnecessary variables (fields).

unnamed (4).png

Next, enter your own JS code using the variables that you have created.

unnamed (3).png

Then we set up the Output Data variable - the result of the script.

Set the name for the variable and specify the type.

unnamed (5).png

The Output data setting is a required step. Even if you haven't created new variables in the code, you need to set up this section so that the system understands which fields and values will be used in the next steps.

Save the settings of this step, then you will find these fields in the subsequent steps of the automation scenario.

unnamed (6).png

Please note that Albato is not responsible for the performance of your code. Make sure you really know how to work with JavaScript before using this step.

If the code failed to run for some reason, then the automation log shows an error.

unnamed (7).png

unnamed (8).png


JavaScript
Tools