## TL;DR
The webhook node makes an HTTP call mid-conversation and the task fails when that call errors, times out, or returns something the node can't parse. Debug it like any webhook: confirm the endpoint is reachable, check what it returned, and make the node tolerate the shapes it actually gets. The bot builder's test mode hides latency and auth differences, so always verify in the real channel.

## The query

```text
kore.ai bot task execution failed on webhook
```

## Use this when

- Bot tasks fail with webhook errors
- Tasks work in the builder test but fail in production
- Only some webhook tasks fail while others succeed


## Not for

- NLU intent training issues
- Channel configuration problems
- Kore.ai platform outages


## Steps

### 1. Replay the webhook call by hand

Copy the exact request the node sends (method, URL, headers, body) and run it from curl. Read the status code and body. Half the time the endpoint is down, moved, or returning an error page the node can't parse.

Expected output: the real status code and body from a manual replay.

### 2. Fix auth and network from the bot's perspective

The builder test may run with your credentials or network. In production the call comes from Kore.ai's servers: check IP allowlists, firewall rules, and that the credential the node uses is valid there.

Expected output: the endpoint reachable and authenticated from Kore.ai's egress.

### 3. Validate the response shape

The node expects certain fields in the response. If the API changed its shape or returns errors in a different envelope, parsing fails and the task dies. Log the raw response and map it explicitly.

Expected output: the response parsed successfully against the node's expectations.

### 4. Add timeouts and fallbacks to the node

Set a sane timeout on the webhook node and define what the task does on failure: retry once, apologize, or escalate. A task with no failure path turns every downstream hiccup into a dead conversation.

Expected output: a tested failure path for timeouts and bad responses.

## Variant phrasings

### kore.ai webhook node timeout

Steps 1 and 4: find the slowness, then bound it.

### kore.ai custom webhook 500

Step 3. The API's error envelope is usually the surprise.

## Why it happens

Webhook nodes inherit every failure mode of HTTP plus the bot's intolerance for delay. Builders test against local or staging endpoints that are fast and permissive, then production endpoints are slower, auth'd differently, and behind firewalls. The task that passed every test fails on the first real user.

## Edge cases

- Webhook secrets in node config are visible to bot builders. Use a vault reference where supported.
- Long-running endpoints need the async pattern: acknowledge, then push the result.
- Version your webhook contracts. The bot and the API evolve separately and break each other silently.

## Provenance

Resolved from the public thread: https://vectle.com/posts/pst_MdOOkYL06u_2Y2tlpGi9jg
