APIs & Integrations

YakaRaju_G
Member

Want to integrate the sitecore forms with hubspot forms

Hi everyone,

I want to integrate all my sitecore forms to hubspot, because the forms have some customisations and those are not possible in hubspot we want to use those forms and integrate with hubspot crm store the form fill data directly. I am new to this kind of integration part.

Can anyone help in step by step to do that. I have already read the form api documentation but i dint get the move.

Thanks

0 Upvotes
8 Replies 8
Derek_Gervais
HubSpot Alumni
HubSpot Alumni

Want to integrate the sitecore forms with hubspot forms

Hi @YakaRaju_G,

If you’re just starting out, I would recommend getting up to speed with how HTML forms function. w3schools has a great tutorial on them here: https://www.w3schools.com/html/html_forms.asp

Once you’re comfortable submitting a form to your server, I would recommend searching for a guide on making requests in your preferred server side language. Then, you’ll find the HubSpot Developer Docs useful for formatting your request(s).

0 Upvotes
karlonstb
Member

Want to integrate the sitecore forms with hubspot forms

@Derek_Gervais Testing somthing on this topic and was hoping for more insight here.
Currently someone is using the Sitecore forms and they are in Iframe on a website.I am not fully sure but using a HS form on iframe can work or not?I understand this could not work before

If not I was going to look into the other option you mentioned of the sitecore form has to be sent to a server and then HubSpot can rerive this. After the information is sent to the server what steps wld need to be done o the HS end?Is it just to create the same form with the same fields in HS and using this endpoint to pass it into HS?(https://developers.hubspot.com/docs/methods/forms/submit_form) Can you elaborate a little more on after the information is on the server how to get that into HubSpot?

0 Upvotes
karlonstb
Member

Want to integrate the sitecore forms with hubspot forms

Any update on this? @Derek_Gervais 

0 Upvotes
Derek_Gervais
HubSpot Alumni
HubSpot Alumni

Want to integrate the sitecore forms with hubspot forms

Hi @karlonstb ,

 

Apologies, this flew under my radar. If you're submitting to the Forms API, you have to do the following things:

  1. Have a form in HubSpot to submit to
    1. This form (like you said) should mirror the custom form you're using. Put all the fields in your custom form on the HubSpot form
  2. Submit in the correct format
    1. You should use the v3 submission endpoint which accepts a JSON object. Check the doc for more details

If you've done both of those things, all you need to to is make the POST request to the form submission endpoint when your custom form is submitted.

0 Upvotes
karlonstb
Member

Want to integrate the sitecore forms with hubspot forms

@Derek_Gervais 

Thanks. I was reading the link you attached here to the API and was hoping you could clarify the expected next steps(https://developers.hubspot.com/docs/methods/forms/submit_form)


-Information is stored in Sitecore. The next step is for example just providing the following url(with the correct hubid and form id) 

https://forms.hubspot.com/uploads/form/v2/:portal_id/:form_guid

1)What do I need to do in regards to the hs_context parameter? Is that information automatically pulled in?

2)Does the person I am giving this if using Sitecore just uses the url which would have the form id and portal id and that will pass the information into HubSpot?

 

 

0 Upvotes
Derek_Gervais
HubSpot Alumni
HubSpot Alumni

Want to integrate the sitecore forms with hubspot forms

That URL is the endpoint that accepts form submission requests. It's intended to be used in tandem with a custom HTML form; the form submits the values to your external server, and then you can format and pass that data into HubSpot as a form submission. This specific endpoint requires that you use an external server to submit the data to HubSpot; if you want to submit using only client-side Javascript, you should use the v3 endpoint:

https://developers.hubspot.com/docs/methods/forms/submit_form_v3

 

That endpoint doc has some example Javascript that should help with writing the code to submit to HubSpot.

 

Let me try to address some of the specific questions you had here:

  1. The hs_context parameter is not pulled in automatically. You have to grab all the relevant data and create the hs_context parameter programatically.
  2. I'm not sure I understand this question. Whoever you're giving this endpoint to would need to make an HTTP request with the relevant data in order to submit the information to HubSpot. If Sitecore has some built-in functionality to submit data to a particular URL, then that would work. Otherwise, someone needs to write the code to do this.

Additionally, I want to make sure to address something that I feel might not be totally clear:

  1. These endpoints are intended for programatic use; some code needs to be written in order to pass the data to these endpoints. While it's theoretically possible to manually pass data to these endpoints, it's not something I would recommend. 
  2. These endpoints are intended to pass form submission data into HubSpot; they're not intended to accept data beign synced from an external platform. If the raw form submission data is being sent to Sitecore, and then you're pulling the data from Sitecore, you'll likely run into issues constructing the hs_context parameter (among other things). If you need to build an integration to pass data from Sitecore to HubSpot contacts, you should consider using the Contacts API.
0 Upvotes
Derek_Gervais
HubSpot Alumni
HubSpot Alumni

Want to integrate the sitecore forms with hubspot forms

Hi @YakaRaju_G,

I’m not aware of any step-by-step guides, but what you’ll need to do is submit the sitecore form to a script on your server, and then from there submit the information to the HubSpot API. I’d be happy to assist with any questions related to the HubSpot side of that going forward.

0 Upvotes
YakaRaju_G
Member

Want to integrate the sitecore forms with hubspot forms

Hi @Derek_Gervais,

Thank you for your valueable information. But iam am very new to this API things, can you please guide me through the steps for submitting the script to the server first and to hubspot.

Please bear with my questions.

Thanks

0 Upvotes