Skip to main content
The response node sends an HTTP response to the client and terminates the flow. Every HTTP-triggered flow should have at least one response node.

Configuration

{
  "id": "success_response",
  "type": "response",
  "config": {
    "status": 200,
    "headers": {
      "X-Request-ID": "{{request_id}}"
    },
    "body": {
      "success": true,
      "data": "{{transformed_data.output}}"
    }
  }
}

Config Fields

FieldTypeRequiredDefaultDescription
statusnumberNoautoHTTP status code
headersobjectNo-Response headers
bodyanyNo-Response body

Default Status Codes

If status is not specified, it defaults based on the request method:
MethodDefault Status
GET200 OK
POST201 Created
PUT200 OK
PATCH200 OK
DELETE204 No Content

Output

The response node stores its output in context:
{
  "status": 200,
  "headers": { ... },
  "body": { ... }
}

Behavior

When a response node executes:
  1. The response is sent to the client
  2. The flow is marked as done
  3. No subsequent nodes execute (except finally blocks in try nodes)

Examples

Success Response

{
  "id": "respond",
  "type": "response",
  "config": {
    "status": 200,
    "body": {
      "success": true,
      "data": "{{fetch_data.output.body}}"
    }
  }
}

Created Response (POST)

{
  "id": "created",
  "type": "response",
  "config": {
    "status": 201,
    "body": {
      "id": "{{create_user.output.body.id}}",
      "message": "User created successfully"
    }
  }
}

No Content Response (DELETE)

{
  "id": "deleted",
  "type": "response",
  "config": {
    "status": 204
  }
}

Error Response

{
  "id": "not_found",
  "type": "response",
  "config": {
    "status": 404,
    "body": {
      "error": "not_found",
      "message": "User not found"
    }
  }
}

With Custom Headers

{
  "id": "respond_with_headers",
  "type": "response",
  "config": {
    "status": 200,
    "headers": {
      "X-Request-ID": "{{request_id}}",
      "X-Processing-Time": "{{processing_time}}ms",
      "Cache-Control": "max-age=3600"
    },
    "body": "{{data}}"
  }
}

Paginated Response

{
  "id": "paginated",
  "type": "response",
  "config": {
    "status": 200,
    "body": {
      "data": "{{fetch_items.output.body.items}}",
      "pagination": {
        "page": "{{request.query.page | default:1}}",
        "per_page": 20,
        "total": "{{fetch_items.output.body.total}}",
        "has_more": "{{fetch_items.output.body.has_more}}"
      }
    }
  }
}

Transformed Response

{
  "id": "formatted_response",
  "type": "response",
  "config": {
    "status": 200,
    "body": {
      "user": "{{user | pick:id:name:email}}",
      "stats": {
        "posts": "{{posts | count}}",
        "followers": "{{followers | count}}"
      },
      "recent_activity": "{{activity | slice:5}}"
    }
  }
}

Multiple Response Nodes

Flows often have multiple response nodes for different outcomes:
[
  {
    "id": "check_auth",
    "type": "condition",
    "config": {
      "conditions": [
        { "if": "{{auth.valid}} == true", "then": ["process"] }
      ],
      "else": ["unauthorized"]
    }
  },
  {
    "id": "unauthorized",
    "type": "response",
    "config": {
      "status": 401,
      "body": { "error": "Unauthorized" }
    }
  },
  {
    "id": "process",
    "type": "http",
    "config": { "url": "..." }
  },
  {
    "id": "check_result",
    "type": "condition",
    "config": {
      "conditions": [
        { "if": "{{process.output.success}} == true", "then": ["success"] }
      ],
      "else": ["error"]
    }
  },
  {
    "id": "success",
    "type": "response",
    "config": {
      "status": 200,
      "body": { "success": true, "data": "{{process.output.body}}" }
    }
  },
  {
    "id": "error",
    "type": "response",
    "config": {
      "status": 500,
      "body": { "error": "Processing failed" }
    }
  }
]

Common Status Codes

CodeMeaningUse Case
200OKSuccessful GET, PUT, PATCH
201CreatedSuccessful POST that creates a resource
204No ContentSuccessful DELETE
400Bad RequestInvalid input
401UnauthorizedMissing or invalid auth
403ForbiddenInsufficient permissions
404Not FoundResource doesn’t exist
422Unprocessable EntityValidation failed
500Internal Server ErrorUnexpected error

vs Abort Node

ResponseAbort
Normal flow terminationError termination
Any status codeError status codes
Success or error responsesOnly error responses
Standard way to end a flowStop on critical errors
Use response for normal responses (success or handled errors). Use abort to immediately stop on unexpected errors.