APIs & Integrations

tljthatrocks
Member

Multiple webhook requests with the same payload except attemptNumber

I created an app with Webhook that subscribes for "contact.creation" event. Everything is working fine for about 4 months but in the past few days, my server endpoint has been receiving duplicate event payloads for the same objectId, eventId, subscriptionType and occurredAt. I noticed that the attemptNumber is increasing from 0 to 9. So it looks like HubSpot is doing multiple attempts to send the same "contact.creation" event for the same lead. Everything in the payload is the same except the "attemptNumber".

 

Why is this happening? Can someone help please.

 

Thanks!

0 Upvotes
7 Replies 7
tljthatrocks
Member

Multiple webhook requests with the same payload except attemptNumber

The weird thing is I only encountered this issue recently and never before in that 4 months span. If HubSpot was timing out the webhook requests due to the delay I added, then I should have encountered this issue 4 months ago. Why only now?

 

Btw, I have fixed this issue by doing an asynchronous call to the Contacts API and then returning the Hubspot Webhook request right away without waiting for the Contact API request to finish.

 

But I'm still curious why suddently Hubspot was timing out the webhook requests only recently.

0 Upvotes
dennisedson
HubSpot Product Team
HubSpot Product Team

Multiple webhook requests with the same payload except attemptNumber

Hey @tljthatrocks 

Glad you found the issue and it is strange that it just started occurring.

I will check in internally to see if I can get any more information, but I am not holding my breath.  Will post here if I do get something useful.

0 Upvotes
tljthatrocks
Member

Multiple webhook requests with the same payload except attemptNumber

Thanks @dennisedson. To add, even if the timeouts were happening recently, it appeared to be random. Some requests were working fine and some not. I couldn't find any pattern why those failed requests were failing.

0 Upvotes
priyajose
Participant

Multiple webhook requests with the same payload except attemptNumber

I am also facing the same issue. Some events are triggered properly but for some  multiple request are sent by webhook 

0 Upvotes
tljthatrocks
Member

Multiple webhook requests with the same payload except attemptNumber

I  think I found the root cause of the issue. My Webhook endpoint takes about 10 seconds to finish. I think HubSpot has a timeout of 5 seconds? My webhook takes that long because I'm setting a delay of 7 seconds to wait for HubSpot to populate the hs_analytics_source_data_1 and hs_analytics_source_data_2 properties before I call the Contacts API after retrieving the objectId from the webhook request. WIthout the delay, those 2 properties are empty. Please see my thread that I posted 4 months ago about this delay.

 

https://community.hubspot.com/t5/APIs-Integrations/hs-analytics-source-data-1-and-hs-analytics-sourc...

 

 

 

 

0 Upvotes
dennisedson
HubSpot Product Team
HubSpot Product Team

Multiple webhook requests with the same payload except attemptNumber

Hi @tljthatrocks 

Are you still experiencing this issue?  Is it just one contact record?

0 Upvotes
tljthatrocks
Member

Multiple webhook requests with the same payload except attemptNumber

It happens on multiple contacts. When I checked the Webhooks Monitoring, it shows the requests failed but without HTTP status code. It just shows "Failure" in the Webhook event details. I checked the logs on my server but didn't find any related errors.

0 Upvotes