I've setup a webhook on our deal stages. So as a deal enters a certain column, it should fire a webhook once, however it is being fired 3 times.. Any ideas?
I've found the HubSpot API to be overly excitable with Webhooks. If you don't reply to HuBSpot within milliseconds then HubSpot assumes you weren't listening and tries again (we've all had relationships like that).
So, what we typically do is receive the JSON from the Webhook, pass it to a Job Queue and reply "success" to HubSpot as soon as possible, so we can process the data without HubSpot nagging.
Also, you'll want to check the attemptNumber (see below) in the JSON.
And, you'll also want to check for mutliple objects in the JSON - HubSpot can batch the replies (see below).
I've found the HubSpot API to be overly excitable with Webhooks. If you don't reply to HuBSpot within milliseconds then HubSpot assumes you weren't listening and tries again (we've all had relationships like that).
So, what we typically do is receive the JSON from the Webhook, pass it to a Job Queue and reply "success" to HubSpot as soon as possible, so we can process the data without HubSpot nagging.
Also, you'll want to check the attemptNumber (see below) in the JSON.
And, you'll also want to check for mutliple objects in the JSON - HubSpot can batch the replies (see below).
The stack I use for integrations – that I can't build in HubSpot – includes Laravel (php, mysql) deployed to AWS using Vapor. Vapor converts the Job Queue to use Amazon's infrastructure.
While it's a little opaque I don't have to manage servers so I have more time to play on the fun stuff.
I do have a large Laravel project I wrote a few years ago that is using the built-in jobs. That project is hosted on AWS EC2 Amazon Linux using Beanstalkd as the queue and Supervisor for the worker processes. Works really well. I am not familiar with Vapor.
For these HubSpot integrations I am using Node.js with Express hosted in Docker containers (also hosted in AWS EC2 Amazon Linux) and so I need a queue built for Node.js I see several options but I was hoping someone already using one could save me time with a recommendation.
I'd be interested in what "fun stuff" you are currently playing with 😎
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.