Get Deal ID for Deal created by the workflow


I have a scenario where I need to create new deal in a workflow that is triggered by user's form submission.


User can submit multiple times, which would result in multiple deals which is the behaviour I'm looking for.


I need to trigger a webhook request to our application and from that get the ID of the deal created by this workflow. How do i achieve this?

2 Replies 2
HubSpot Alumni

Hi @nickgoloborodko,


So I have an idea for this, but I'd love to hear thoughts from others as well. If you have the workflow set up to enroll based on a form submission that allows re-enrollment, then you can create a deal that will be associated to the contact who filled out the form. You can then trigger a webhook send using the instructions in our article here:


There's an object in the payload "num_associated_deals", which will list out the IDs and timestamps of the associated deals for that contact. By finding the most recently created deal through the timestamps, you should be able to find the ID of that deal.


Do you think that would work?


 - Leland

Leland Scanlan

HubSpot Developer Support

I've checked ContactAPI Get by ID response json and I've tried to find "num_associated_deals" object. Maybe this object was renamed or removed? Please, help me to find the alternative way to associate contacts and deals.