I need to have a form in a hubspot page that creates a trial account in our app. This trial account is created by sending a post request to our API.
Is it possible to create a hubspot form and add some JS/jQuery functionality on submit? I could not find any docs about this.
To sum up, the flow should be:
Form appears in a hubspot page → user fills in the fields and clicks submit → form collects contact data and then sends a post request, with a json body, to our api to create this trial account → redirect to our app on success
Any help appreciated
Regards
Hey, @CArribas
Thanks for reaching out! Let’s see if we can the conversation started — @mangelet @Ismail @dannio @DanielSanchez @Kevin-C, do you have any experience with what @CArribas is describing?
Thank you! — Jaycee
Hey @CArribas
Thanks @Jaycee_Lewis
If you’re using a Hubspot form, which I would suggest you could:
- listen for the form onFormSubmit event and collect the information from the body
- Then listen for the onFormSumbmitted event, this will tell you that the form has successfully submitted
- Then POST the data captured from the first event mentioned to your endpoint
- Finally, redirect
Another option might be a custom coded workflow action or webhook action.
Zapier is also an option but this would be my last choice
Hope this gets you going!
Hey @Kevin-C ,
can we use webhook to send data to our api endpoint when submitting hubspot form .
If yes, then
I am facing the problem , I am not getting the Data ops option in my dashboard .
can you please tell, how can we send data to our api endpoint from the hubspot form when submitting the form .