Skip to main content
Version: 2.50.0-LTS

Configuring Results

Users have the flexibility to customize the results returned by workflows. The Result node enables configuration of your output through JavaScript code.

Return Data from a Single Node

Consider a workflow that integrates product data (from the products node) with sales data (from the sales node) via a JavaScript operation (in the collatedData node).

Collate Data Workflow

Within the Result node, specify the output by using a return statement that encapsulates an object within parentheses:

return ({collatedData})
Return Results Preview

Returning Data From Multiple Nodes

You can also return data from other nodes. Either return the complete data set or specify only the required portions, as demonstrated below:

return ({collatedData: collatedData.data,
products: products.data,
sales: sales.data})
Return Results From All Nodes

Fine Tuning Your Result Using JavaScript

Refine your result by manipulating the data using JavaScript functions. For example, the slice function can be used to select a subset of data:

return ({collatedData: collatedData.data,
products: products.data.products.slice(0,2),
sales: sales.data.slice(0,2)})

Workflow Execution

When executing workflows with triggers, the configured data in the Result node will be included in the API response.

Using Triggers to Return Data