2025-08-04 06:49:49 +00:00
---
id: results
title: Configuring Response
---
2025-08-06 05:48:04 +00:00
< div style = {{display:'flex',justifyContent:"start",alignItems:"center",gap:"8px"}} >
< div className = "badge badge--self-hosted heading-badge" >
< span > Self Hosted< / span >
< / div >
< / div >
2025-08-04 06:49:49 +00:00
Users have the flexibility to customize the response returned by workflows. The **Response** node enables configuration of your output through JavaScript code. Each workflow can have multiple response nodes.
## Return Data from a Single Node
2025-08-21 10:42:34 +00:00
2025-08-04 06:49:49 +00:00
Consider a workflow that combines sales data (from the *getSalesData* node) with inventory data (from the *getInventory* node) via a JavaScript operation (in the *generateCSVData* node).
2025-08-21 10:42:34 +00:00
< img className = "screenshot-full img-full" src = "/img/workflows/results/v2/response-nodes-preview.png" alt = "Response Node Preview" / >
2025-08-04 06:49:49 +00:00
Within the **Response** node, specify the output by using a return statement that encapsulates an object within parentheses:
```js
return ({generateCSVData})
```
2025-08-21 10:42:34 +00:00
< img className = "screenshot-full img-full" src = "/img/workflows/results/v2/single-node-response.png" alt = "Single Node Response" / >
2025-08-04 06:49:49 +00:00
## Returning Data From Multiple Nodes
2025-08-21 10:42:34 +00:00
2025-08-04 06:49:49 +00:00
You can also return data from other nodes. Either return the complete data set or specify only the required portions, as demonstrated below:
```js
return
({sales: getSalesData.data,
inventory: getInventory.data,
csv: generateCSVData.data})
```
2025-08-21 10:42:34 +00:00
< img className = "screenshot-full img-full" src = "/img/workflows/results/v2/multi-node-response.png" alt = "Multi Node Response" / >
2025-08-04 06:49:49 +00:00
## Fine Tuning Your Response Using JavaScript
2025-08-21 10:42:34 +00:00
2025-08-04 06:49:49 +00:00
Refine your response by manipulating the data using JavaScript functions. For example, the slice function can be used to select a subset of data:
```js
return
({sales: getSalesData.data.slice(0,5),
inventory: getInventory.data.slice(0,5),
csv: generateCSVData.data})
```
2025-08-21 10:42:34 +00:00
< img className = "screenshot-full img-full" src = "/img/workflows/results/v2/transformed-response.png" alt = "Transformed Response" / >
2025-08-04 06:49:49 +00:00
## Workflow Execution
2025-08-21 10:42:34 +00:00
When executing workflows with triggers, the configured data in the **Response** node will be included in the API response. When triggered inside a ToolJet app, the data will be returned in the same format as a regular query.