Run code
The Run code action allows you to execute a JavaScript script. Most of the operations are allowed to perform complex operations and data transformations in a simple way.
Note: Importing libraries, dealing with files, blobs and proxies, using
constructor,fetchorevaland doing HTTP requests is not allowed.
The Run code action can also be used for specific cryptography requirements by using tools from the Forge library. For more details, see Run Code action using Forge cryptography library.
Action input

The following table describes the fields in the Run code action input:
| Field | Description | Required | |
|---|---|---|---|
| Inputs | Provide data by using the Add button to provide as many Id and Value properties as needed. Use the Minus icon button to delete added pairs. | No | |
| ID | Enter a name for the variable. | Yes | |
| Value | Enter or select from the Suggestions drop-down a value for the variable. You can use Liquid. | Yes | |
| Code | Enter the JavaScript script you want to run. | Yes |
Note: Inputs are declared as global variables and they can be overridden in the code.
Test action
To test the action without triggering the complete flow, follow these steps:
- Select the Test action button to open the Test action dialog. If you have added any Inputs, the Id and Value pairs will appear here.

- Select the Test button to execute the script and see the output.

Action output

The following table describes the properties in the Run code action output:
| Property | Description |
|---|---|
| Logs | Shows any logged elements in the code. |
| DurationInMs | Shows how many milliseconds the code took to execute. |
| MemoryConsumedMb | Shows the memory consumed. |
| Result | Shows the returned value. |
Action limits
See Service limits for details about the limits that apply to the Run code action.