Adding arguments for Code Actions
You can add function arguments to make code actions reusable. Additionally, you can implement multiple arguments for a single cloud action by adding parameters and values for the same action.

Arguments in Code Action
Rules for adding the arguments
Each rule, along with its description, is given below:
Rule | Description |
---|---|
Data type | A code action argument should always be a string. |
Argument names | Argument names should be validated. An argument name must comply with JavaScript naming. |
Number of Arguments | The maximum number of arguments is 30. |
Title | The title should be unique for each Reply Action. The maximum length of the title is 30 characters. |
Value Limit | The Maximum limit for the value is 5000. The payload.args object is {} (empty) by default. This prevents additional null checks. |
Adding Arguments to the Code Action
To add multiple arguments:
- Select ACTION to trigger the Reply Action.
- Select the applicable action from the Choose the action drop-down menu.
Note: You cannot add Arguments for Webhooks. - Select EDIT to add the arguments.
- Select ADD ARGUMENT.
- In the ARGUMENTS, enter the Title and Value.
- Select the Required check box to make this argument a mandatory field.
- Select ADD ARGUMENT to add multiple arguments.
- Select SAVE to update the arguments.
Example
As an example, we created a flow to buy a product like the iPhone. You can add multiple iPhone models as arguments in the code action.

When you configure a Code Action argument, it is available on execution inside the code action within the payload.args object
.
The example action code is given below:
Updated 11 days ago