NodeCrypto Help

Webhook / API Input

Category: Input/Output Data ยท Node Type ID: input-webhook-api

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

Parameter Configuration

Parameter (ID)Type & DefaultVisibility ConditionDescription & Options
Endpoint URL
url
text
Default: https://httpbin.org/get
Supports Variable Reference ($var: string)
Always visible Target HTTP/HTTPS endpoint URL to request when the node executes.
HTTP Method
method
select
Default: GET
Always visible HTTP request method (GET or POST).
  • GET: GET
  • POST: POST
Mock Response (Offline / Fallback)
mockResponse
textarea
Default: {"status":"ok","source":"mock-api"}
Supports Variable Reference ($var: string)
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 NamePort IDData TypeRequiredVisibility ConditionDescription
URL Override url String Optional Always visible
Request Body body Any Optional Always visible

Output Ports

Port Nature: Fixed Output Ports (2 total).

Port NamePort IDData TypeVisibility ConditionDescription
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.

  1. Set Endpoint URL to your test endpoint and Mock Response to {"challenge":"01020304"}.
  2. Connect Response Data to Bytes to String or a Script node for parsing.