Using HubSpot APIs, how to get the deal stages of all associated deals to a company?

Hey everyone!

I am a bit stuck trying to figure out how to retrieve the deal stage of all deals associated to a company. I am using Zapier webhooks to get the job done.

Initially I thought I could use the following URL and tried to put some parameters to ask it to also bring the deal stage of the found deals but now I am suspecting this might not be the way at all

Would you have any suggestions? Should I write an API over Zapier code? (if so, could you give me an example?)

Thanks in advance!

I’m looking forward to some answers

Hi, I need more context.

Do you have Cusotome Code action available in Workflows?

Where do you want to send this data?

In how many pipelines do you have deals?

Hey Maciek!
Thanks for engaging on this.

I don’t have custom code in workflows unfortunately.

I am using zapier webhooks for this API call.

I don’t want to send this data back to hubspot, but to understand the stages of the associated deals in order to move the status of the property “Lifecycle stage”

My final goal: Whenever a deal associated to a company moves to Closed Won/Lost, I want to check the deal stage of the other associated deals in order to properly update the property “Lifecycle stage”

i.e.: If 1 out of the 3 deals associated to a company goes to the custom stage of “offboarded”, I want to check if any of the remaining 2 deals are still “Won” so I can safely keep the “Lifecycle stage” property as “Customer”. In case all deals go to “Offboarded”, then an automation would move the property to “Ex-customer”

Let me know if I should give more details

thanks!

Hello, everyone!

In the end I achieved the desired logic by using lists membership and branches in a workflow (and cut out all this over engineering hehe.)

If anyone is going through something simmilar, feel free to reach out to me!