Response Node
Last updated
Last updated
The Response node is a fundamental component in workflow design, especially in API workflows, facilitating the transmission of data back to the caller.
Sending Responses: The primary function of the Response node is to send data back to the caller of the workflow.
Integration with API Workflows: It is particularly useful in API workflows where returning data to the requester is essential.
Flow Termination: Adding a Response node effectively terminates the flow above it.
Introduction of Delay Node: Upon adding a Response node in the middle of a flow, a Delay node is automatically appended immediately after it.
Reason: This design choice ensures that anything added after the Delay node will run asynchronously within the workflow.
Configuring the input parameters is just the same as the Set Variable node. Click on the Response Node to open the configuration modal. Define your response attributes by specifying the name, data type, and initial value. Use the "Add Field" button to include multiple response attributes.
There are two ways to add values to these keys: either add static values to the keys or use tokens to fetch the previous node's output values that match the data type as input. The Set Variable node supports the following variable types:
Boolean: For true/false
values. You can either add static values or use tokens to fetch the previous node's output values that match the data type as input.
String: For alphanumeric data, such as names or addresses. You can either add static values or use tokens to fetch the previous node's output values that match the data type as input.
Numeric: For numbers. It could be integers or decimals. You can either add static values or use tokens to fetch the previous node's output values that match the data type as input.
Date: For date values without a time component, in the format YYYY/MM/DD
like this: 2024/07/21
. You can either add static values or use tokens to fetch the previous node's output values that match the data type as input.
DateTime: For date and time values, in the RFC3339
format like this: 2024-08-07T12:46:00+05:30
. You can either add static values or use tokens to fetch the previous node's output values that match the data type as input.
JSON: To input raw JSON data. For detailed steps, refer to the JSON Editor Documentation.
List: To input a list of items, such as numbers, JSON, or any other type. For detailed steps, refer to the List Editor Documentation.
JS Code: To input a custom JS code's executed value. For detailed steps, refer to the JavaScript Editor Documentation.
Formula: To input the executed value of a Formula. For detailed steps, refer to the Formula Editor Documentation.
Click on the Test button to ensure that the data being returned through the Response node is communicated and conforms to the expected format.
Consideration: While using the Response node, it's essential to consider the flow termination behaviour and the introduction of the Delay node for proper workflow management.
After adding a Response Node, the next available node you can add is the Delay Node. The Delay Node is used to introduce a delay after showing the response. This is useful for pacing the flow of the workflow.
The Delay Node allows you to specify a wait time before the workflow proceeds to the next action. This can be useful for creating pauses in the workflow for user interactions or system processing time.
For more details on the Delay Node, refer to the Delay Node Documentation.
To return values from prior nodes, you can access these values using tokens directly in a designated field within the response node. Simply insert the relevant tokens in the desired location inside the response node. This approach simplifies the process of retrieving and utilizing data that was handled in preceding nodes, enabling seamless integration and functionality within your workflow. This method ensures that information flows smoothly from one part of your application to another, enhancing efficiency and coherence in handling complex operations.
You can also transfer tokens between different fields. This means you have the flexibility to utilize tokens from one field within another across the same response node. Here's an example to illustrate
The Response node serves as a vital component in workflow design, facilitating seamless communication between workflows and their callers, particularly in API environments.
Click on + icon and add a response node from the list of available nodes.