Multiple calls from my webhook from one message #7575
-
I have an issue where the chatwoot API is pinging my webhook multiple times (3 times) for one message. When a message is sent from chatwoot, the chatwoot API pings a webhook that pings our internal API to send an SMS through our SMS provider. The problem is that chatwoot is pinging this webhook 3 times instead of once. I have seen a similar issue where this was occurring for WhatsApp inbox and it was resolved Please assist with this. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 12 replies
-
@kelvinogwa could you check/ share the payload of the webhook ? |
Beta Was this translation helpful? Give feedback.
-
Hello @sojan-official. @kelvinogwa and I both work together. {
"account": {"id": 78869, "name": "Xxxx"},
"additional_attributes": {},
"content_attributes": {},
"content_type": "text",
"content": "Test Message To Get Chatwoot Webhook Payload",
"conversation": {
"additional_attributes": {},
"can_reply": True,
"channel": "Channel::Api",
"contact_inbox": {
"id": 62745450,
"contact_id": 63181700,
"inbox_id": 29269,
"source_id": "303f449a-0c38-4789-8089-810211a4c9f6",
"created_at": "2023-07-12T13:14:40.992Z",
"updated_at": "2023-07-12T13:14:40.992Z",
"hmac_verified": False,
"pubsub_token": "SnYUMUuYKXmLgCvTvFPL44Nq",
},
"id": 48,
"inbox_id": 29269,
"messages": [
{
"id": 24753115,
"content": "Test Message To Get Chatwoot Webhook Payload",
"account_id": 78869,
"inbox_id": 29269,
"conversation_id": 48,
"message_type": 1,
"created_at": 1689992769,
"updated_at": "2023-07-22T02:26:09.419Z",
"private": False,
"status": "sent",
"source_id": None,
"content_type": "text",
"content_attributes": {},
"sender_type": "User",
"sender_id": 73621,
"external_source_ids": {},
"additional_attributes": {},
"processed_message_content": "Test Message To Get Chatwoot Webhook Payload",
"sentiment": {},
"conversation": {
"assignee_id": 73621,
"unread_count": 0,
"last_activity_at": 1689992769,
"contact_inbox": {
"source_id": "303f449a-0c38-4789-8089-810211a4c9f6"
},
},
"sender": {
"id": 73621,
"name": "Xxxx Support",
"available_name": "Xxxx Admin",
"avatar_url": "",
"type": "user",
"availability_status": None,
"thumbnail": "",
},
}
],
"labels": [],
"meta": {
"sender": {
"additional_attributes": {},
"custom_attributes": {},
"email": "[email protected]",
"id": 63181700,
"identifier": "7",
"name": "Kel Ouma",
"phone_number": "+254708367015",
"thumbnail": "",
"type": "contact",
},
"assignee": {
"id": 73621,
"name": "Xxxx Support",
"available_name": "Xxxx Admin",
"avatar_url": "",
"type": "user",
"availability_status": None,
"thumbnail": "",
},
"team": None,
"hmac_verified": False,
},
"status": "open",
"custom_attributes": {},
"snoozed_until": None,
"unread_count": 0,
"first_reply_created_at": "2023-07-15T20:28:22.254Z",
"priority": None,
"waiting_since": 0,
"agent_last_seen_at": 1689992769,
"contact_last_seen_at": 0,
"timestamp": 1689992769,
"created_at": 1689167681,
},
"created_at": "2023-07-22T02:26:09.419Z",
"id": 24753115,
"inbox": {"id": 29269, "name": "Xxx xx xx x"},
"message_type": "outgoing",
"private": False,
"sender": {
"id": 73621,
"name": "Xxxx Support",
"email": "[email protected]",
"type": "user",
},
"source_id": None,
"event": "message_created",
} |
Beta Was this translation helpful? Give feedback.
-
Hello @dearkafka are these what you were looking to get? |
Beta Was this translation helpful? Give feedback.
Good evening, gentlemen! I'm late to the party but here goes anyways.
I was facing the same issue with an API integration—I was receiving the same message_created payload twice. However, I remembered that I had configured a webhook trigger for the inbox and another webhook trigger in the integrations menu, under the webhook item. For me, it was enough to disable the 'extra' webhook event, which in my case was the integration webhook, and the duplicate messages stopped arriving. Hope it helps any poor souls stuck on this, and please don't reinstall your chatwoot instance before reading this.