Tips > Data, APIs & Webhooks

Respond Immediately, Then Process Asynchronously to Prevent Timeouts

Many webhook senders (Stripe, GitHub, Shopify) expect a response within 5-30 seconds.

Many webhook senders (Stripe, GitHub, Shopify) expect a response within 5-30 seconds. If your workflow takes longer -- calling multiple APIs, processing files, running LLM calls -- the sender will time out and retry, creating duplicate processing. The fix: respond with 200 immediately, then continue processing.

Real-world example: A Shopify order webhook triggers inventory checks across 3 warehouses, shipping rate calculations, and a confirmation email. Total processing: 15-45 seconds. Shopify times out at 5 seconds.

Workflow structure:

[Webhook Node] --> [Respond to Webhook: 200] --> [HTTP Request: Warehouse 1]
  (Response Mode:                                        |
   "Using Respond                                   [HTTP Request: Warehouse 2]
   to Webhook Node")                                     |
                                                    [HTTP Request: Warehouse 3]
                                                         |
                                                    [Calculate Shipping]
                                                         |
                                                    [Send Confirmation Email]
```text
Webhook node configuration:

```json
{
  "httpMethod": "POST",
  "path": "shopify/orders",
  "responseMode": "responseNode"
}
```text
Respond to Webhook node (placed immediately after Webhook):

```json
{
  "respondWith": "json",
  "responseCode": 200,
  "responseBody": "={{ { \"received\": true } }}"
}
```text
The caller gets `200 OK` in milliseconds. All the heavy processing runs after the response is sent. Shopify will not retry, and your workflow has unlimited time to complete.

**Related:** [Set a Unique Encryption Key and Back It Up](../security-best-practices/01-set-a-unique-encryption-key-and-back-it-up.md) | [Use the HTTP Request Node as a Universal Connector](../integration-patterns/01-use-the-http-request-node-as-a-universal-connector.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