Webhook / API Input
Fetches HTTP payload or Webhook response into workflow
Overview
Fetches an external HTTP payload (`GET` or `POST`) from the configured Endpoint URL into the workflow and outputs the response body as raw UTF-8 Bytes alongside the HTTP status code string. If the network request fails (for example, due to CORS restrictions, offline mode, or an unreachable host) or if no live fetch is possible, the node seamlessly falls back to encoding the configured Mock Response string as UTF-8 bytes with status "200 (Mock Fallback)".
Because of this built-in fallback behavior, workflows using HTTP / Webhook Input remain reproducible offline and in automated tests.
When to Use
- Fetching remote public keys, JWKS payloads, certificate bundles, or challenge tokens from an HTTP endpoint during protocol prototyping.
- Simulating an external API response offline using the Mock Response parameter.
Parameter Configuration
| Parameter (ID) | Type & Default | Visibility Condition | Description & Options |
|---|---|---|---|
Endpoint URLurl |
textDefault: https://httpbin.org/get |
Always visible | Target HTTP/HTTPS endpoint URL to request when the node executes. |
HTTP Methodmethod |
selectDefault: GET |
Always visible | HTTP request method (GET or POST).
|
Mock Response (Offline / Fallback)mockResponse |
textareaDefault: {"status":"ok","source":"mock-api"} |
Always visible | Fallback response payload (encoded as UTF-8 bytes) emitted whenever the live HTTP request fails or when operating offline. |
Port I/O Specification
See Ports & Connections for general wiring rules, data type colors, and dynamic port creation.
Input Ports
Port Nature: Fixed Input Ports (2 total).
| Port Name | Port ID | Data Type | Required | Visibility Condition | Description |
|---|---|---|---|---|---|
URL Override |
url |
String |
Optional | Always visible | |
Request Body |
body |
Any |
Optional | Always visible |
Output Ports
Port Nature: Fixed Output Ports (2 total).
| Port Name | Port ID | Data Type | Visibility Condition | Description |
|---|---|---|---|---|
Response Bytes |
data |
Bytes |
Always visible | Response body encoded as a raw UTF-8 Uint8Array. |
HTTP Status |
status |
Int |
Always visible | HTTP status code string (e.g., "200" on live success or "200 (Mock Fallback)" when the fallback payload is used). |
Error Cases
This node has no runtime failure cases (errorProfile: none) and always succeeds for any valid typed input.
Examples
Simulating an API Challenge Payload
Provide a JSON challenge payload with offline fallback.
- Set Endpoint URL to your test endpoint and Mock Response to
{"challenge":"01020304"}. - Connect
Response Datato Bytes to String or a Script node for parsing.