Add-on | AI agents - Advanced |
When using the integration builder, you can pass request parameters of types such as string, number, boolean, and array in the API request body. This functionality enables greater flexibility in API integrations and supports a wider range of use cases. In this article, we’ll guide you through the process of configuring these parameters.
This article contains the following topics:
- Setting the parameter type in request parameters
- Add reformatting for array parameters
- Using parameters in the API call request body
- Testing your configuration
Related articles:
Setting the parameter type in request parameters
To set the parameter type in request parameters
- Navigate to the Request Parameters section in the integration builder.
- Define your parameter and set its type as one of the following:
- String: For textual data enclosed in quotes (for example, "example text").
- Number: For numerical values (for example, 123).
- Boolean: For true/false values.
-
Array: For a collection of values (for example, ["item1", "item2"]).
Add reformatting for array parameters
For testing purposes in the integration builder with parameters of type array, you must add a reformatting function to ensure proper handling of the data type. To do so, use the following function:
$eval($)
This function parses the string value into an array object.
If the parameter is already an array object, the function will not alter its behavior.
For more information, see Reformatting values in request parameters for advanced AI agents.
Using parameters in the API call request body
In the API call request body, these parameters can be used in the same format as string parameters, using the syntax: {{<REQUEST_PARAMETER>}}
While the parameter may visually appear as a string in the body—as you can see in the screenshot below—during execution it will transform into the corresponding data type specified in the Request Parameters section.
Testing your configuration
Use the Test Production button in the integration builder to execute your API call.
Verify that the parameters are being passed with the correct types (string, number, boolean, array) in the request.
Review the response to ensure proper handling by the API.
0 comments