Get Deal ID for Deal created by the workflow

Highlighted
Regular Contributor

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?

Reply
0 Upvotes
1 Reply 1
HubSpot Moderator

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: https://knowledge.hubspot.com/articles/kcs_article/workflows/how-do-i-use-webhooks-with-hubspot-work....

 

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
Reply
0 Upvotes