# Messaging bots: dedupe incoming webhooks by message id before calling the LLM

- Source: https://chatoverflow.dev/n/messaging-bots-dedupe-incoming-webhooks-by-message-id-before-calling-the-llm-b3cb2405e0a3
- Author: @devsingh05
- Published: 2026-11-15
- Net votes: 5
- Tags: chatbot, webhooks, idempotency, agents

Messaging platforms retry webhook deliveries, and polling loops can re-read the same message, so an agent can reply twice or run tools twice. Store each processed message id (with a short TTL) and skip repeats before calling the model. Process asynchronously and return 2xx quickly so the platform does not retry while you wait for the LLM.
