rob.lee.333
08/12/2025, 12:17 AMAI Evy
08/12/2025, 12:17 AMAI Evy
08/12/2025, 12:18 AMcall_analyzed webhook should trigger once when call analysis is complete [(1) ]() . However, duplicate webhook events can occur due to several factors.
For duplicate call_analyzed events specifically, you should check your conversation flow for duplicate triggers, including nested or reused nodes [(2) ]() . Additionally, ensure only one webhook listener is tied to that event .
The webhook system has a retry mechanism - if your endpoint doesn't return a success status (2xx) within 10 seconds, the webhook will be retried up to 3 times [(1) ]() . This could cause duplicates if your endpoint is slow to respond or returns non-2xx status codes.
To prevent duplicates in your workflow:
1. Implement idempotency - Use the call_id from the webhook payload to deduplicate events on your end
2. Ensure fast response - Return a 2xx status code quickly from your webhook endpoint
3. Review your conversation flow - Check for duplicate call_analyzed triggers in your agent configuration [(2) ]()
The webhook payload includes a unique call_id that you can use to track whether you've already processed that specific call analysis [(1) ]() .
If you continue experiencing this issue after checking these factors, you may need to review your Retell dashboard or logs to identify which parts of your flow are triggering each event [(2) ]() .AI Evy
08/12/2025, 12:18 AMAI Evy
08/12/2025, 12:18 AMrob.lee.333
08/12/2025, 12:19 AMrob.lee.333
08/12/2025, 12:26 AMrob.lee.333
08/12/2025, 12:27 AMAI Evy
08/12/2025, 12:27 AMAI Evy
08/12/2025, 12:27 AMcall_analyzed webhook should help. The key is ensuring your webhook endpoint returns a successful status code (2xx) promptly .
A few additional considerations:
1. Response timing - Make sure your endpoint responds within the 10-second timeout window
2. Status codes - Ensure you're returning a 2xx status code, not just any response
3. Idempotency - Even with proper responses, consider implementing deduplication using the unique call_id from the webhook payload as a safety measure
The fact that you're seeing exactly 2 events 10 seconds apart suggests the retry mechanism is likely the cause. Your webhook response fix should resolve this issue by preventing the retry attempts.AI Evy
08/12/2025, 12:27 AMAI Evy
08/12/2025, 12:27 AMrob.lee.333
08/12/2025, 12:28 AMAI Evy
08/12/2025, 12:28 AMAI Evy
08/12/2025, 12:29 AMjavascript
app.post("/webhook", (req: Request, res: Response) => {
if (
!Retell.verify(
JSON.stringify(req.body) ,
process.env.RETELL_API_KEY,
req.headers["x-retell-signature"] as string,
)
) {
console.error("Invalid signature") ;
return;
}
const {event, call} = req.body;
// process the webhook
// Acknowledge the receipt of the event
res.status(204) .send() ;
}) ;
[(2) ]()
For inbound call webhooks, you can return a 200 status code with JSON content when you want to accept the call:
json
{
"call_inbound": {
"override_agent_id": "agent_12345"
}
}
[(3) ]()
Or return a 200 status code without the override_agent_id to reject the call .
The key points are:
- Return any 2xx status code (200, 201, 204, etc.) [(1) ]()
- For call event webhooks, no response body is needed - just the status code
- Respond within 10 seconds to avoid retries
- Status 204 (No Content) is commonly used since no body is expected [(2) ]()AI Evy
08/12/2025, 12:29 AMAI Evy
08/12/2025, 12:29 AM