Process Nodes

Return State

Category
Workflow Control
Node Type
Process

Overview

The Return State Node is the final step of a workflow. It’s used to return the final status, message, and data back to the user or connected system.

Think of it as the “return statement” in a workflow — once this node runs, the process ends and a response is sent.

Description

Send the final response.

This node gathers outputs from previous steps and organizes them into a structured final response. It doesn’t perform any calculations or actions by itself.

Success Response

Return a 200 OK status with the requested data.

Error Response

Return a 400/500 status with an error message.

You can choose what to include in the final response — for example, results from an API call, processed data, or user inputs.

Input Parameters

This node does not take direct inputs. It collects and returns data already generated by previous nodes.

StatusnumberRequired
The HTTP status code to return (e.g., 200, 400, 500).
Example
200
MessagestringRequired
A short note describing the outcome.
Example
"Process completed successfully"
DataobjectOptional
A JSON object containing the final results.
Example
{ "id": "123", "name": "Alice" }
Mapping Data

Use double curly braces {{ }} to reference values from earlier nodes. Example: {{UserInputNode.output.email}} or {{DatabaseNode.output.recordId}}.

Output Parameters

The Return State Node produces the final JSON response.

statusnumberOptional
The status code returned.
Example
200
messagestringOptional
The description message.
Example
"Success"
dataobjectOptional
The payload containing the result data.

Output Type

Output Type: JSON Object

The output is a structured JSON response that marks the end of the workflow. It typically includes a numeric status code, a descriptive message, and an object with the final data.

Example Usage

Example 1: Returning a User Profile

Return user details after registration.

{  "status": 200,  "message": "User found",  "data": {    "name": "{{fetchUser.name}}",    "email": "{{fetchUser.email}}"  }}
{  "status": 200,  "message": "User found",  "data": {    "name": "Jacob Williams",    "email": "jacob@example.com"  }}

Example 2: Returning an Order Summary

Return order confirmation details.

{  "status": 200,  "message": "Order processed successfully",  "data": {    "orderId": "{{OrderNode.output.id}}",    "totalAmount": "{{BillingNode.output.amount}}"  }}
{  "status": 200,  "message": "Order processed successfully",  "data": {    "orderId": "ORD-4582",    "totalAmount": 250.75  }}

How to Use in a No-Code Workflow

1

Add the Node

Add the Return State Node as the final step of your workflow.

2

Define Status

Set the Status code (e.g., 200) and Message (e.g., "Success").

3

Map Data

In the Data field, map the values you want to return using {{nodeId.output.field}}.

4

Run Workflow

Run or test your workflow — this node will output the final JSON response.

Best Practices

  • Always place this node at the end of your workflow.
  • Use meaningful status codes (200 for success, 400 for error).
  • Keep your messages short and descriptive.

Do / Don’t

Do
  • ✔️ Map only the necessary data fields to keep the response clean.
  • ✔️ Test the workflow with both successful and failed cases.
  • ✔️ Use structured JSON for the data field.
Don’t
  • ❌ Don’t place this node inside a loop (it will stop the loop and the workflow).
  • ❌ Don’t leave the data field empty if the user expects a result.
  • ❌ Don’t use this node in the middle of a flow unless you intend to stop execution.

Common Errors

Missing Output ReferenceErrorOptional
Referenced a node that doesn’t exist. Check your `{{ }}` mappings.
Empty ResponseWarningOptional
Data field is empty. Ensure you include at least one field.
Workflow Did Not ReturnErrorOptional
The Return State Node must be the last node in the workflow path.

Example Workflow Integration

Use Case 1: Customer Registration

Register a new user and return their ID.

  1. Input: Collect customer details.
  2. Validation: Check required fields.
  3. Database: Save the record.
  4. Return State: Send final success response.

Workflow Data Flow:

{{database.recordId}} →  {{returnState.data.id}}

Use Case 2: Error Handling

Return an error if validation fails.

  1. Input: Receive data.
  2. If/Else: Check if data is valid.
  3. False Path: Connect to Return State.
    • Status: 400
    • Message: "Invalid Data"
  4. True Path: Continue workflow.