HubSpot Webhook Workflow POST Issue (3rd party app integration)

forms
contacts

#1

I am trying to use a HTTP POST request Webhook in a workflow to send contact form data to a 3rd party lead management application (Velocify). The problem is that the data is automatically converted to JSON when the data is exported, and this format is not accepted by Velocify.

The data appears to be sending correctly in JSON using a RequestBin test: https://requestb.in/1f9ygvt1?inspect. Here is the workflow in question (sending POST requests to both Velocify and RequestBin to test): https://app.hubspot.com/workflows/431136/flow/2384812/. Both POST requests go through successfully to the target URL, but the contact form data doesn’t make it to Velocify due to the incompatible format.

Is there any way to have this data be sent in HTTP POST format without being converted to JSON? If not, what would be the easiest way to have the data converted back from JSON to HTTP POST and then pushed along to Velocify in that format?

Thanks!


#2

Hi @apex,

Workflow webhook actions will always send the contact data as JSON. You might consider writing some simple middleware to accept the webhook requests, convert it to the format you need, and then send that request to Velocify.


#3

Hey @Derek_Gervais,

Thanks for the response! I figured that would be the easiest way. Velocify ended up saying they could set it up on their side to accept JSON, so I’m letting them do that.

For future reference, though, is there a way to write that middleware in HubSpot, or would it have to be done on an external site? Obviously it would be better to keep everything in HubSpot for simplicity, security, and fewer possible points of failure, but I’m just curious if it is possible or not.


#4

Hi @apex,

There isn’t currently a way to run server-side scripts on HubSpot; you would need to use a third party service.


#5

You need a middleware program to parse the webhook payload and format it to your needs.
Sometimes Zapier can do the job, otherwise, you need some coding.

Cheers