APIs & Integrations

Web_Dev
Participant

Webhook response from external system

Hello, I'm very new to Hubspot and I need to create a process to pass the company fields to the external API whenever there is a new company created/updated. 

 

I see some documents suggesting webhook to create subscriptions to the crm object (company in my case) and pass that details to the external system and I already tried creating an app and integrating to the webhook with the company subscription.

 

Here's the url to the application: 

https://app.hubspot.com/developer/8251058/application/226071/webhooks

 

We need to pass the details to the external REST API and external REST API will use Hubspot search API to get the company fields based on passed ObjectID through webhook payload. Now how can I get a response from external API in case of any errors from external API (For example, if the company not found or any property not exist, connections)? How to update those response fields from external API into hubspot custom created properties? Please please advise. 

0 Upvotes
5 Replies 5
Willson
HubSpot Employee
HubSpot Employee

Webhook response from external system

Hey @Web_Dev,

 

In order to assist here, would you be able to elaborate on the following:

Now how can I get a response from external API in case of any errors from external API (For example, if the company not found or any property not exist, connections)

Are you looking to be able to make these errors that you encounter externally, surfaceable via HubSpot? If so, this is not something we'd support. 

 

In order to do this, you would need to have some middleware that would be able to handle the errors and then update accordingly. 

 

As said above, this is my understanding so if I am wrong, any elaboration on the above point would be great!

Product Manager @ HubSpot
0 Upvotes
Web_Dev
Participant

Webhook response from external system

Thank you for your response. 

 

That's something similar we may need. I'm doing a POST calls to the External REST API through Webhook in the Hubspot for any new company created and External REST API will have to do the GET request to the Hubspot Search API based on the ObjectID passed through Webhook. 

 

Once data is retrieved from Hubspot through External REST API, it will pass those properties to our other External Database system and will need to send a response back to the Hubspot that data has been successfully stored in the External Database. 

 

At the point when data is successfully inserted into our External Database or in case any errors, we wanted to inform the company owner in the Hubspot with some response fields (for example, a confirmation number so that they can go to our External Database and track their request based on that confirmation number). 

 

Please advise if that's something feasible in the Hubspot.

0 Upvotes
Web_Dev
Participant

Webhook response from external system

Hello, Can someone please advise on my concern with webhook integration? We need to get this resolve by end of this week. Thanks!

0 Upvotes
Willson
HubSpot Employee
HubSpot Employee

Webhook response from external system

Hey @Web_Dev 

 

To confirm, we do not have any service built-in that would allow you to send status messages to owners. Instead, you'd have to pass this update via say, a custom Contact property

 

Once this property is setup, you can use the Contacts API to update the Contacts property with a value that reflects the status of the update. 

 

I hope this helps!

Product Manager @ HubSpot
0 Upvotes
Web_Dev
Participant

Webhook response from external system

Thanks for the response. We'll try and let you know. 

0 Upvotes