node cookbook

N8N Respond to Webhook Node Cookbook

Use Respond to Webhook when a Webhook-triggered workflow needs to control the HTTP response body, status code, headers, or response timing.

Independent third-party notes. n8n is a trademark of its owner and is referenced only for compatibility and troubleshooting context.

Quick Answer

Use Respond to Webhook when a Webhook-triggered workflow needs to control the HTTP response body, status code, headers, or response timing.

Key Facts

Node role
Send a response to an incoming Webhook request.
Best fit
Custom API endpoints, form callbacks, app webhooks, and synchronous response workflows.
Common pairing
Webhook node as the trigger.
Common concern
Caller timeouts can happen if the workflow waits too long before responding.

Recommended Steps

  1. Start the workflow with a Webhook node.
  2. Decide whether the caller needs an immediate response or a response after processing.
  3. Add Respond to Webhook where the response should be sent.
  4. Set status code, headers, and response body as needed.
  5. Test with curl or the external service and inspect the HTTP response.

Verification

  • The caller receives the intended status code.
  • The response body and headers match the integration requirement.
  • The workflow execution still records the incoming payload and downstream result.

Warnings

  • Long workflows can cause callers to time out before they receive the response.
  • Do not return sensitive workflow data unless the endpoint is authenticated and intended to expose it.

Common Mistakes

  • Expecting the Webhook node default response to satisfy a custom API contract.
  • Returning too late after slow downstream processing.
  • Forgetting content-type or status code requirements.
  • Returning internal debug data to external callers.

Examples

Simple JSON response Common pattern for custom webhook endpoints.
Webhook receives request
Set builds response object
Respond to Webhook returns:
status: 200
body: { "ok": true, "received": true }

FAQ

Do I always need Respond to Webhook?

No. Use it when you need control over the response. The default Webhook behavior can be enough for simple triggers.

Why does the caller time out?

The workflow may be doing too much before responding. Respond earlier, then continue processing asynchronously where possible.

Sources