All guides

Original explainer

n8n webhook responses: choose single-response and item behavior

Configure response data and status codes, then distinguish transport success from a successful business result.

AI Nav CityWritten / Updated Sources checked

An HTTP 200 response does not establish that an AI task produced the required result. Define a response contract for a synthetic classification endpoint and select its n8n response mode. You need access to Webhook and Respond to Webhook and knowledge of the caller. No endpoint was opened or request sent for this page.

Action and acceptance sequence

  1. Connect the response path

    Configure Webhook to use Respond to Webhook.[1]

  2. Choose response data

    Distinguish the first item, all items and a custom object.[1]

  3. Assess caller results

    Check HTTP status, JSON shape and business status together.[1]

Check each stage separately; the final section states execution scope.

Define the caller contract

The original contract returns an object with request_id: demo-request, status: completed and result.category: billing. It is an expected shape, not a completed task. The caller should check all three fields alongside HTTP status. If multiple results are allowed, decide whether the response is an array or an object containing results.[1]

Connect the response node

Set Webhook Respond to Using Respond to Webhook node and place the response node after result generation. The response node runs once, and expressions use the first incoming item. First Incoming Item returns its JSON, All Incoming Items returns all JSON items, and JSON uses the object defined in Response Body. Select deliberately so multiple inputs do not accidentally become a first-item-only response.[1]

Separate status codes from workflow paths

Add Option includes Response Code and Response Headers. The docs describe a standard 200 message when a workflow finishes without running the response node, a 500 message when an error occurs before the first response, and no second response from later response nodes. Inspect whether each branch reaches the response node; one 200 does not prove your custom object was returned.[1]

Check successful and failed samples

On your test endpoint, inspect successful, missing-result and early-failure paths, recording status, Content-Type and the raw body. Reject responses that violate the contract as successful business results. Only synthetic response fields were checked offline. No webhook, network request or model was run. Configure authentication and privacy separately before publishing an endpoint.[1]

Article sources

Original editorial content; official descriptions and checking suggestions are distinguished.

  1. n8n · Official sources
    View details