I’m looking for a way to de-duplicate workflow webhooks, to make sure I do not process them twice.
I found several posts about duplicated events but they seem to be talking about regular Webhooks API: E.g.
https://community.hubspot.com/t5/APIs-Integrations/App-triggers-two-webhook-events-for-one-propertyChange/m-p/296277 links Webhooks documentation here: Accounts Dashboard | HubSpot - there is a note in the payloads section:
- NOTE ON UNIQUENESS: We do not guarantee that you will only get a single notification for an event. Though this should be rare, it is possible that we will send you the same notification multiple times.
- eventId : The unique ID of the event that triggered this notification.
It seems that eventId would be the field to use to detect duplicates but I do not get that in the workflow webhook payload, only the contact data.
This is an example of the request I can get:
Only headers seem to be useful for the purpose of de-duplication.
I’ve been looking at “x-hubspot-correlation-id” but I’m not sure if that’s the right thing to use - it looks like it’s only for internal use.
I could also try to use the request signature (“x-hubspot-signature-v3” ) but I suspect its value will be different because the timestamp can change when the request is retried?