Tips > Reliability & Performance

Choose Webhook Response Mode Carefully

The Webhook node has two response modes: "Immediately" and "When Last Node Finishes." Choosing the wrong mode can either cause the caller to time out or wast...

The Webhook node has two response modes: "Immediately" and "When Last Node Finishes." Choosing the wrong mode can either cause the caller to time out or waste resources generating responses nobody reads.

Real-world example: A Shopify webhook sends order events to n8n. Shopify requires a 200 response within 5 seconds or it marks the webhook as failing and will eventually deactivate it. But the workflow takes 30 seconds to fully process the order.

Scenario 1: Shopify webhooks (fire-and-forget)
  Response Mode: Immediately
  Response Code: 200
  Reason: Shopify doesn't need the processing result, just acknowledgment

Scenario 2: Internal API endpoint called by your frontend
  Response Mode: When Last Node Finishes
  Reason: The frontend needs the processed result to display to the user

Scenario 3: GitHub webhook for CI/CD
  Response Mode: Immediately
  Response Code: 202 (Accepted)
  Reason: GitHub expects fast acknowledgment; results are posted back via Status API
```text
Webhook node configuration for the Shopify case:

| Setting | Value |
|:--------|:------|
| HTTP Method | POST |
| Path | `/shopify/orders` |
| Response Mode | Immediately |
| Response Code | 200 |
| Response Data | `{ "received": true }` |

> **Tip: Use Respond to Webhook Node for Custom Responses**
>
> If you need to send an immediate acknowledgment but also return data later, place a **Respond to Webhook** node early in your workflow to send the 200 response, then continue processing in subsequent nodes. This gives you the best of both modes.

**Related:** [Flatten Deeply Nested API Responses](../code-node-mastery/01-flatten-deeply-nested-api-responses.md) | [Use Docker Compose with Health Checks for n8n and PostgreSQL](../self-hosting-operations/01-use-docker-compose-with-health-checks-for-n8n-and-postgresql.md)

Showcase builds

19 complete workflows from my own projects, each with its n8n workflow JSON to import. Showcase entries link the file at the end of the article.

See the showcase builds

Keep reading

191 entries grouped by topic, from first workflow to queue mode. Free, no signup.

Browse the encyclopedia

Need it built?

I design, build and run n8n systems for clients. Every engagement starts with a $1,500 diagnostic audit, credited toward the build.

Book a 20-minute call