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
Config Fields
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
status | number | No | auto | HTTP status code |
headers | object | No | - | Response headers |
body | any | No | - | Response body |
Default Status Codes
Ifstatus is not specified, it defaults based on the request method:
| Method | Default Status |
|---|---|
| GET | 200 OK |
| POST | 201 Created |
| PUT | 200 OK |
| PATCH | 200 OK |
| DELETE | 204 No Content |
Output
The response node stores its output in context:Behavior
When a response node executes:- The response is sent to the client
- The flow is marked as done
- No subsequent nodes execute (except
finallyblocks intrynodes)
Examples
Success Response
Created Response (POST)
No Content Response (DELETE)
Error Response
With Custom Headers
Paginated Response
Transformed Response
Multiple Response Nodes
Flows often have multiple response nodes for different outcomes:Common Status Codes
| Code | Meaning | Use Case |
|---|---|---|
| 200 | OK | Successful GET, PUT, PATCH |
| 201 | Created | Successful POST that creates a resource |
| 204 | No Content | Successful DELETE |
| 400 | Bad Request | Invalid input |
| 401 | Unauthorized | Missing or invalid auth |
| 403 | Forbidden | Insufficient permissions |
| 404 | Not Found | Resource doesn’t exist |
| 422 | Unprocessable Entity | Validation failed |
| 500 | Internal Server Error | Unexpected error |
vs Abort Node
| Response | Abort |
|---|---|
| Normal flow termination | Error termination |
| Any status code | Error status codes |
| Success or error responses | Only error responses |
| Standard way to end a flow | Stop on critical errors |
response for normal responses (success or handled errors). Use abort to immediately stop on unexpected errors.
Related
- Abort Node - Stop flow with error
- Transform Node - Prepare response data
- Condition Node - Branch to different responses